From 71864460685a2bc24a1db14defa6a8e2404da90b Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Thu, 18 Jun 2026 16:21:58 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20negodata/front:=20=ED=98=91=EC=83=81?= =?UTF-8?q?=EB=8C=80=ED=99=94=20=EC=B9=B4=EB=93=9C=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EB=A0=8C=EB=8D=94=20+=20=EA=B2=AC=EC=A0=81=EC=83=81=EC=84=B8?= =?UTF-8?q?=20=ED=97=A4=EB=8D=94=C2=B7=ED=85=8C=EC=9D=B4=EB=B8=94=20UI=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 협상대화: 사용 카드 번호/멘트(Slate 서식본)/와일드 조건·메모 표시, SlateRenderer 밑줄·헥스색·{변수} 치환 보정, 말풍선 우측정렬·발신자 아바타 제거 - 견적상세 헤더: DB 컬럼명 라벨 제거, 견적정보/(진행상태+세팅)/상품(이미지) 2열 재배치, 협상카드 탭에 사용 카드 수 표시 - DataTable 행 패딩 축소, 협력사명 아바타 제거, 카드관리 본인 카드 안내문 - orval 재생성(QuotationCardData 신규 필드) Co-Authored-By: Claude Opus 4.8 (1M context) --- negodata/front/package-lock.json | 525 ++--- negodata/front/package.json | 4 + negodata/front/src/api/generated/auth/auth.ts | 517 +++-- negodata/front/src/api/generated/card/card.ts | 740 +++---- .../src/api/generated/default/default.ts | 193 +- .../front/src/api/generated/enums/enums.ts | 177 +- negodata/front/src/api/generated/item/item.ts | 1478 ++++++-------- ... => bodyUploadItemImageV1ItemImagePost.ts} | 2 +- .../front/src/api/generated/model/cardData.ts | 18 +- .../api/generated/model/chatMessageData.ts | 8 +- .../src/api/generated/model/errorInfo.ts | 6 +- .../generated/model/hTTPValidationError.ts | 2 +- .../front/src/api/generated/model/index.ts | 495 ++--- .../front/src/api/generated/model/itemData.ts | 32 +- .../api/generated/model/listCardsParams.ts | 26 +- .../api/generated/model/listItemsParams.ts | 34 +- .../generated/model/listQuotationsParams.ts | 50 +- .../generated/model/listSuppliersParams.ts | 34 +- .../api/generated/model/quotationCardData.ts | 20 +- ...ename.ts => quotationCardDataCondition.ts} | 2 +- ...Post.ts => quotationCardDataEditScript.ts} | 4 +- .../generated/model/quotationCardDataMemo.ts | 8 + .../model/quotationCardDataNumber.ts | 8 + .../src/api/generated/model/quotationData.ts | 23 +- .../generated/model/quotationSettingData.ts | 6 +- .../src/api/generated/model/reqCreateCard.ts | 12 +- .../src/api/generated/model/reqCreateItem.ts | 28 +- .../api/generated/model/reqCreateQuotation.ts | 8 +- .../api/generated/model/reqCreateSupplier.ts | 10 +- .../src/api/generated/model/reqUpdateCard.ts | 14 +- .../src/api/generated/model/reqUpdateItem.ts | 34 +- .../model/reqUpdateQuotationSetting.ts | 6 +- .../api/generated/model/reqUpdateSupplier.ts | 12 +- .../front/src/api/generated/model/resCard.ts | 6 +- .../src/api/generated/model/resCardCard.ts | 2 +- .../src/api/generated/model/resCardList.ts | 8 +- .../src/api/generated/model/resCheckCodes.ts | 4 +- .../api/generated/model/resCreateAccount.ts | 4 +- .../api/generated/model/resCreateQuotation.ts | 8 +- .../model/resCreateQuotationAsyncJob.ts | 2 +- .../model/resCreateQuotationQuotation.ts | 2 +- .../src/api/generated/model/resDeleteCard.ts | 4 +- .../src/api/generated/model/resDeleteItem.ts | 4 +- .../api/generated/model/resDeleteQuotation.ts | 4 +- .../model/resDeleteQuotationSetting.ts | 4 +- .../api/generated/model/resDeleteSupplier.ts | 4 +- .../front/src/api/generated/model/resEnums.ts | 6 +- .../src/api/generated/model/resEnumsEnums.ts | 4 +- .../src/api/generated/model/resExcelUpload.ts | 17 - .../front/src/api/generated/model/resItem.ts | 6 +- .../api/generated/model/resItemCategories.ts | 6 +- .../src/api/generated/model/resItemImage.ts | 19 + .../generated/model/resItemImageFilename.ts | 8 + .../generated/model/resItemImageImageUrl.ts | 8 + ...esExcelUploadMsg.ts => resItemImageMsg.ts} | 2 +- .../api/generated/model/resItemImageSize.ts | 8 + .../src/api/generated/model/resItemItem.ts | 2 +- .../src/api/generated/model/resItemList.ts | 8 +- .../front/src/api/generated/model/resLogin.ts | 4 +- .../generated/model/resLowestPriceResult.ts | 4 +- .../generated/model/resLowestPriceTrigger.ts | 4 +- .../front/src/api/generated/model/resMe.ts | 12 +- .../src/api/generated/model/resMeCompany.ts | 2 +- .../src/api/generated/model/resQuotation.ts | 6 +- .../api/generated/model/resQuotationCards.ts | 8 +- .../api/generated/model/resQuotationList.ts | 8 +- .../generated/model/resQuotationQuotation.ts | 2 +- .../api/generated/model/resQuotationResult.ts | 14 +- .../generated/model/resQuotationSessions.ts | 8 +- .../generated/model/resQuotationSetting.ts | 6 +- .../model/resQuotationSettingList.ts | 6 +- .../model/resQuotationSettingSetting.ts | 2 +- .../api/generated/model/resQuotationStatus.ts | 6 +- .../api/generated/model/resRefreshToken.ts | 4 +- .../src/api/generated/model/resSessionChat.ts | 8 +- .../src/api/generated/model/resSupplier.ts | 6 +- .../api/generated/model/resSupplierList.ts | 8 +- .../generated/model/resSupplierSupplier.ts | 2 +- .../src/api/generated/model/sessionData.ts | 10 +- .../src/api/generated/model/supplierData.ts | 14 +- .../api/generated/model/validationError.ts | 4 +- .../quotation-setting/quotation-setting.ts | 543 +++--- .../src/api/generated/quotation/quotation.ts | 1705 ++++++----------- .../src/api/generated/supplier/supplier.ts | 943 ++++----- .../front/src/api/mutator/custom-fetch.ts | 10 +- negodata/front/src/app/provider.tsx | 2 + .../front/src/components/ImageDropzone.tsx | 147 +- .../front/src/components/SlateRenderer.tsx | 73 +- .../front/src/components/layout/Layout.tsx | 134 +- .../src/components/layout/PageToolbar.tsx | 2 +- .../front/src/components/ui/data-table.tsx | 237 ++- .../cards/components/CardFormModal.tsx | 317 --- .../cards/components/CardFormSheet.tsx | 311 +++ .../features/cards/components/CardTable.tsx | 37 +- .../cards/editor/CardScriptEditor.tsx | 82 + .../cards/editor/CardScriptToolbar.tsx | 111 ++ .../front/src/features/cards/editor/index.ts | 4 + .../front/src/features/cards/editor/slate.ts | 144 ++ .../cards/editor/useCardScriptEditor.ts | 10 + .../src/features/cards/editor/variables.ts | 22 + .../src/features/cards/hooks/useCards.ts | 11 +- negodata/front/src/features/cards/types.ts | 10 - .../partners/components/PartnerTable.tsx | 10 +- .../products/components/ProductFormSheet.tsx | 14 + .../components/QuotationDetailDrawer.tsx | 254 ++- .../quotations/components/QuotationTable.tsx | 36 +- .../quotations/hooks/useQuotations.ts | 9 +- .../front/src/features/quotations/types.ts | 5 +- negodata/front/src/lib/confirm.tsx | 71 + negodata/front/src/lib/useOverlayParams.ts | 35 + negodata/front/src/pages/cards.tsx | 38 +- negodata/front/src/pages/partners.tsx | 39 +- negodata/front/src/pages/products.tsx | 44 +- negodata/front/src/pages/quotation.tsx | 24 +- 114 files changed, 4731 insertions(+), 5537 deletions(-) rename negodata/front/src/api/generated/model/{bodyUploadItemsExcelV1ItemUploadExcelPost.ts => bodyUploadItemImageV1ItemImagePost.ts} (69%) rename negodata/front/src/api/generated/model/{resExcelUploadReceivedFilename.ts => quotationCardDataCondition.ts} (67%) rename negodata/front/src/api/generated/model/{bodyUploadSuppliersExcelV1SupplierUploadExcelPost.ts => quotationCardDataEditScript.ts} (58%) create mode 100644 negodata/front/src/api/generated/model/quotationCardDataMemo.ts create mode 100644 negodata/front/src/api/generated/model/quotationCardDataNumber.ts delete mode 100644 negodata/front/src/api/generated/model/resExcelUpload.ts create mode 100644 negodata/front/src/api/generated/model/resItemImage.ts create mode 100644 negodata/front/src/api/generated/model/resItemImageFilename.ts create mode 100644 negodata/front/src/api/generated/model/resItemImageImageUrl.ts rename negodata/front/src/api/generated/model/{resExcelUploadMsg.ts => resItemImageMsg.ts} (72%) create mode 100644 negodata/front/src/api/generated/model/resItemImageSize.ts delete mode 100644 negodata/front/src/features/cards/components/CardFormModal.tsx create mode 100644 negodata/front/src/features/cards/components/CardFormSheet.tsx create mode 100644 negodata/front/src/features/cards/editor/CardScriptEditor.tsx create mode 100644 negodata/front/src/features/cards/editor/CardScriptToolbar.tsx create mode 100644 negodata/front/src/features/cards/editor/index.ts create mode 100644 negodata/front/src/features/cards/editor/slate.ts create mode 100644 negodata/front/src/features/cards/editor/useCardScriptEditor.ts create mode 100644 negodata/front/src/features/cards/editor/variables.ts create mode 100644 negodata/front/src/lib/confirm.tsx create mode 100644 negodata/front/src/lib/useOverlayParams.ts diff --git a/negodata/front/package-lock.json b/negodata/front/package-lock.json index 889612c..996f37f 100644 --- a/negodata/front/package-lock.json +++ b/negodata/front/package-lock.json @@ -14,7 +14,6 @@ "@hookform/resolvers": "^5.4.0", "@tailwindcss/vite": "^4.1.14", "@tanstack/react-query": "^5.62.0", - "@tanstack/react-router": "^1.170.15", "@vitejs/plugin-react": "^5.0.4", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -27,6 +26,10 @@ "react-hook-form": "^7.79.0", "react-router": "^7.17.0", "shadcn": "^4.11.0", + "slate": "^0.118.1", + "slate-dom": "^0.119.0", + "slate-history": "^0.113.1", + "slate-react": "^0.119.0", "sonner": "^2.0.7", "tailwind-merge": "^3.6.0", "tw-animate-css": "^1.4.0", @@ -36,8 +39,6 @@ "zustand": "^5.0.14" }, "devDependencies": { - "@tanstack/router-cli": "^1.167.17", - "@tanstack/router-plugin": "^1.168.18", "@types/express": "^4.17.21", "@types/node": "^22.14.0", "@types/react": "^19.2.17", @@ -1456,6 +1457,12 @@ "jsep": "^0.4.0||^1.0.0" } }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", + "license": "Apache-2.0" + }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz", @@ -3533,19 +3540,6 @@ "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, - "node_modules/@tanstack/history": { - "version": "1.162.0", - "resolved": "https://registry.npmjs.org/@tanstack/history/-/history-1.162.0.tgz", - "integrity": "sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA==", - "license": "MIT", - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, "node_modules/@tanstack/query-core": { "version": "5.101.0", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.101.0.tgz", @@ -3572,269 +3566,6 @@ "react": "^18 || ^19" } }, - "node_modules/@tanstack/react-router": { - "version": "1.170.15", - "resolved": "https://registry.npmjs.org/@tanstack/react-router/-/react-router-1.170.15.tgz", - "integrity": "sha512-GawYz7HEjj8rTUUDoT/SemDEVm63pZUO+2mOcXHY9Jl3EwMS5gFBnPu/2UvcrwRm1jN1k79fokc0d4aFmrLatg==", - "license": "MIT", - "dependencies": { - "@tanstack/history": "1.162.0", - "@tanstack/react-store": "^0.9.3", - "@tanstack/router-core": "1.171.13", - "isbot": "^5.1.22" - }, - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": ">=18.0.0 || >=19.0.0", - "react-dom": ">=18.0.0 || >=19.0.0" - } - }, - "node_modules/@tanstack/react-store": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@tanstack/react-store/-/react-store-0.9.3.tgz", - "integrity": "sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg==", - "license": "MIT", - "dependencies": { - "@tanstack/store": "0.9.3", - "use-sync-external-store": "^1.6.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/@tanstack/router-cli": { - "version": "1.167.17", - "resolved": "https://registry.npmjs.org/@tanstack/router-cli/-/router-cli-1.167.17.tgz", - "integrity": "sha512-kws9PNdspkHbeZG6aLDjjpgH/hg7Q565BdSW9hHrjKmXPq/at7OKxQnA76aw9dJiJqy9OmST2RdOKlMEog43+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tanstack/router-generator": "1.167.17", - "chokidar": "^5.0.0", - "yargs": "^17.7.2" - }, - "bin": { - "tsr": "bin/tsr.cjs" - }, - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/router-cli/node_modules/chokidar": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", - "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^5.0.0" - }, - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@tanstack/router-cli/node_modules/readdirp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", - "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@tanstack/router-core": { - "version": "1.171.13", - "resolved": "https://registry.npmjs.org/@tanstack/router-core/-/router-core-1.171.13.tgz", - "integrity": "sha512-+NOwEj1kO/6IGmpHRIZHasYxYWpyBQGNIZAST9aNrk9Q3YlU9SgqVnl1pbLa9qAKfeNdXQIRve0RQb/0kyDeDA==", - "license": "MIT", - "dependencies": { - "@tanstack/history": "1.162.0", - "cookie-es": "^3.0.0", - "seroval": "^1.5.4", - "seroval-plugins": "^1.5.4" - }, - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/router-generator": { - "version": "1.167.17", - "resolved": "https://registry.npmjs.org/@tanstack/router-generator/-/router-generator-1.167.17.tgz", - "integrity": "sha512-xtB9tB2Ws0tWR6Pi7nc3Qk9IYgoh1mQCKWjHqIl9tf6BNUpKoqniJoPAQ4+LGrK8FeZYU0o0p/qlZEyj9FAulA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.5", - "@tanstack/router-core": "1.171.13", - "@tanstack/router-utils": "1.162.2", - "@tanstack/virtual-file-routes": "1.162.0", - "jiti": "^2.7.0", - "magic-string": "^0.30.21", - "prettier": "^3.5.0", - "zod": "^4.4.3" - }, - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/router-plugin": { - "version": "1.168.18", - "resolved": "https://registry.npmjs.org/@tanstack/router-plugin/-/router-plugin-1.168.18.tgz", - "integrity": "sha512-MofS28/axfnfnhOD2RSgJEaU882aX5RsAzhGz5Vc4XhAmvCjy919u9JrNs4QsTWFbTD1P7IJ8WFlFVsrg0pStg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", - "@tanstack/router-core": "1.171.13", - "@tanstack/router-generator": "1.167.17", - "@tanstack/router-utils": "1.162.2", - "chokidar": "^5.0.0", - "unplugin": "^3.0.0", - "zod": "^4.4.3" - }, - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "@rsbuild/core": ">=1.0.2 || ^2.0.0", - "@tanstack/react-router": "^1.170.15", - "vite": ">=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0", - "vite-plugin-solid": "^2.11.10 || ^3.0.0-0", - "webpack": ">=5.92.0" - }, - "peerDependenciesMeta": { - "@rsbuild/core": { - "optional": true - }, - "@tanstack/react-router": { - "optional": true - }, - "vite": { - "optional": true - }, - "vite-plugin-solid": { - "optional": true - }, - "webpack": { - "optional": true - } - } - }, - "node_modules/@tanstack/router-plugin/node_modules/chokidar": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", - "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^5.0.0" - }, - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@tanstack/router-plugin/node_modules/readdirp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", - "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@tanstack/router-utils": { - "version": "1.162.2", - "resolved": "https://registry.npmjs.org/@tanstack/router-utils/-/router-utils-1.162.2.tgz", - "integrity": "sha512-hTWqJtqIFFdvuCl8WXNyrodp2L9zo2G37xKRrcVmVRWpAB2h+U1LuRAfS4tsFTiWOIoE/B+WDVFB8JpoEdw6jQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/generator": "^7.28.5", - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", - "ansis": "^4.1.0", - "babel-dead-code-elimination": "^1.0.12", - "diff": "^8.0.2", - "pathe": "^2.0.3", - "tinyglobby": "^0.2.15" - }, - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/store": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@tanstack/store/-/store-0.9.3.tgz", - "integrity": "sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/virtual-file-routes": { - "version": "1.162.0", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-file-routes/-/virtual-file-routes-1.162.0.tgz", - "integrity": "sha512-uhOeFyxLcU41HzvrxsGpiWdcMbScY1EDgbZ5K7DVRMYInbLYWAC0EA/kx9wXAoSM8q82bUG2hRl8+EAjE6XAbA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.19" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, "node_modules/@ts-morph/common": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz", @@ -4243,16 +3974,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/ansis": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.3.1.tgz", - "integrity": "sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -4411,19 +4132,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-dead-code-elimination": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/babel-dead-code-elimination/-/babel-dead-code-elimination-1.0.12.tgz", - "integrity": "sha512-GERT7L2TiYcYDtYk1IpD+ASAYXjKbLTDPhBtYj7X1NuRMDTMtAx9kyBenub1Ev41lo91OHCKdmP+egTDmfQ7Ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" - } - }, "node_modules/balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", @@ -4839,6 +4547,12 @@ "dev": true, "license": "MIT" }, + "node_modules/compute-scroll-into-view": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz", + "integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==", + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4882,12 +4596,6 @@ "node": ">= 0.6" } }, - "node_modules/cookie-es": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-3.1.1.tgz", - "integrity": "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==", - "license": "MIT" - }, "node_modules/cookie-signature": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", @@ -5236,6 +4944,19 @@ "node": ">=8" } }, + "node_modules/direction": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz", + "integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==", + "license": "MIT", + "bin": { + "direction": "cli.js" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/dotenv": { "version": "17.4.2", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", @@ -6839,6 +6560,12 @@ "node": ">=0.10.0" } }, + "node_modules/is-hotkey": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-hotkey/-/is-hotkey-0.2.0.tgz", + "integrity": "sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==", + "license": "MIT" + }, "node_modules/is-in-ssh": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", @@ -6957,6 +6684,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-promise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", @@ -7166,15 +6902,6 @@ "dev": true, "license": "MIT" }, - "node_modules/isbot": { - "version": "5.1.42", - "resolved": "https://registry.npmjs.org/isbot/-/isbot-5.1.42.tgz", - "integrity": "sha512-/SXsVh7KpPRISrD4ffrGSxnTLlUBzEQUfWIusaJPrpJ93FW1P0YEZri5vAUkFsA0m2HRUhQRQadk2wJ+EeKowQ==", - "license": "Unlicense", - "engines": { - "node": ">=18" - } - }, "node_modules/isexe": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz", @@ -7684,7 +7411,6 @@ "version": "4.18.1", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", - "dev": true, "license": "MIT" }, "node_modules/lodash.isempty": { @@ -8823,13 +8549,6 @@ "node": ">=8" } }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -8937,22 +8656,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/prettier": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz", - "integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/pretty-ms": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz", @@ -9598,6 +9301,15 @@ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "license": "MIT" }, + "node_modules/scroll-into-view-if-needed": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", + "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", + "license": "MIT", + "dependencies": { + "compute-scroll-into-view": "^3.0.2" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -9646,27 +9358,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/seroval": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.4.tgz", - "integrity": "sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/seroval-plugins": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.5.4.tgz", - "integrity": "sha512-S0xQPhUTefAhNvNWFg0c1J8qJArHt5KdtJ/cFAofo06KD1MVSeFWyl4iiu+ApDIuw0WhjpOfCdgConOfAnLgkw==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "seroval": "^1.0" - } - }, "node_modules/serve-static": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", @@ -9977,6 +9668,88 @@ "node": ">=8" } }, + "node_modules/slate": { + "version": "0.118.1", + "resolved": "https://registry.npmjs.org/slate/-/slate-0.118.1.tgz", + "integrity": "sha512-6H1DNgnSwAFhq/pIgf+tLvjNzH912M5XrKKhP9Frmbds2zFXdSJ6L/uFNyVKxQIkPzGWPD0m+wdDfmEuGFH5Tg==", + "license": "MIT", + "dependencies": { + "immer": "^10.0.3", + "tiny-warning": "^1.0.3" + } + }, + "node_modules/slate-dom": { + "version": "0.119.0", + "resolved": "https://registry.npmjs.org/slate-dom/-/slate-dom-0.119.0.tgz", + "integrity": "sha512-foc8a2NkE+1SldDIYaoqjhVKupt8RSuvHI868rfYOcypD4we5TT7qunjRKJ852EIRh/Ql8sSTepXgXKOUJnt1w==", + "license": "MIT", + "dependencies": { + "@juggle/resize-observer": "^3.4.0", + "direction": "^1.0.4", + "is-hotkey": "^0.2.0", + "is-plain-object": "^5.0.0", + "lodash": "^4.17.21", + "scroll-into-view-if-needed": "^3.1.0", + "tiny-invariant": "1.3.1" + }, + "peerDependencies": { + "slate": ">=0.99.0" + } + }, + "node_modules/slate-dom/node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==", + "license": "MIT" + }, + "node_modules/slate-history": { + "version": "0.113.1", + "resolved": "https://registry.npmjs.org/slate-history/-/slate-history-0.113.1.tgz", + "integrity": "sha512-J9NSJ+UG2GxoW0lw5mloaKcN0JI0x2IA5M5FxyGiInpn+QEutxT1WK7S/JneZCMFJBoHs1uu7S7e6pxQjubHmQ==", + "license": "MIT", + "dependencies": { + "is-plain-object": "^5.0.0" + }, + "peerDependencies": { + "slate": ">=0.65.3" + } + }, + "node_modules/slate-react": { + "version": "0.119.0", + "resolved": "https://registry.npmjs.org/slate-react/-/slate-react-0.119.0.tgz", + "integrity": "sha512-snHqhQ1NkZXyuqG4JTxywRg1accho/hnioM2JIYqziaQQcgfqLi2Pe1AHL82WIC1pLWdzPjy2O7drnSbO0DBsQ==", + "license": "MIT", + "dependencies": { + "@juggle/resize-observer": "^3.4.0", + "direction": "^1.0.4", + "is-hotkey": "^0.2.0", + "lodash": "^4.17.21", + "scroll-into-view-if-needed": "^3.1.0", + "tiny-invariant": "1.3.1" + }, + "peerDependencies": { + "react": ">=18.2.0", + "react-dom": ">=18.2.0", + "slate": ">=0.114.0", + "slate-dom": ">=0.116.0" + } + }, + "node_modules/slate-react/node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==", + "license": "MIT" + }, + "node_modules/slate/node_modules/immer": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz", + "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/sonner": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz", @@ -10311,6 +10084,12 @@ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", "license": "MIT" }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -11109,21 +10888,6 @@ "node": ">= 0.8" } }, - "node_modules/unplugin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.0.0.tgz", - "integrity": "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.5", - "picomatch": "^4.0.3", - "webpack-virtual-modules": "^0.6.2" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -11369,13 +11133,6 @@ "dev": true, "license": "BSD-2-Clause" }, - "node_modules/webpack-virtual-modules": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", - "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", - "dev": true, - "license": "MIT" - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", diff --git a/negodata/front/package.json b/negodata/front/package.json index 37ae676..51ffdc0 100644 --- a/negodata/front/package.json +++ b/negodata/front/package.json @@ -30,6 +30,10 @@ "react-hook-form": "^7.79.0", "react-router": "^7.17.0", "shadcn": "^4.11.0", + "slate": "^0.118.1", + "slate-dom": "^0.119.0", + "slate-history": "^0.113.1", + "slate-react": "^0.119.0", "sonner": "^2.0.7", "tailwind-merge": "^3.6.0", "tw-animate-css": "^1.4.0", diff --git a/negodata/front/src/api/generated/auth/auth.ts b/negodata/front/src/api/generated/auth/auth.ts index 17948a4..1ce886e 100644 --- a/negodata/front/src/api/generated/auth/auth.ts +++ b/negodata/front/src/api/generated/auth/auth.ts @@ -4,7 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useMutation, useQuery } from "@tanstack/react-query"; +import { + useMutation, + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -17,8 +20,8 @@ import type { UseMutationOptions, UseMutationResult, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; import type { HTTPValidationError, @@ -27,361 +30,299 @@ import type { ResCreateAccount, ResLogin, ResMe, - ResRefreshToken, -} from ".././model"; + ResRefreshToken +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * id/pw 로 로그인하고 JWT 토큰을 발급한다. * @summary 로그인 */ -export const login = (reqLogin: ReqLogin, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/auth/login`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqLogin, - signal, - }); -}; +export const login = ( + reqLogin: ReqLogin, + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {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>, - TError, - { data: ReqLogin }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqLogin }, - TContext -> => { - const mutationKey = ["login"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqLogin } - > = (props) => { - const { data } = props ?? {}; +export const getLoginMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqLogin}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqLogin}, TContext> => { - return login(data); - }; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type LoginMutationResult = NonNullable< - Awaited> ->; -export type LoginMutationBody = ReqLogin; -export type LoginMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqLogin}> = (props) => { + const {data} = props ?? {}; + + return login(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type LoginMutationResult = NonNullable>> + export type LoginMutationBody = ReqLogin + export type LoginMutationError = void | HTTPValidationError + + /** * @summary 로그인 */ -export const useLogin = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqLogin }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqLogin }, - TContext -> => { - const mutationOptions = getLoginMutationOptions(options); +export const useLogin = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqLogin}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqLogin}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getLoginMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * 새 계정을 생성한다. * @summary 계정 생성 */ export const createAccount = ( - reqCreateAccount: ReqCreateAccount, - signal?: AbortSignal, + reqCreateAccount: ReqCreateAccount, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/auth/create`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCreateAccount, - signal, - }); -}; + + + return customFetch( + {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>, - TError, - { data: ReqCreateAccount }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateAccount }, - TContext -> => { - const mutationKey = ["createAccount"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCreateAccount } - > = (props) => { - const { data } = props ?? {}; +export const getCreateAccountMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateAccount}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCreateAccount}, TContext> => { - return createAccount(data); - }; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CreateAccountMutationResult = NonNullable< - Awaited> ->; -export type CreateAccountMutationBody = ReqCreateAccount; -export type CreateAccountMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCreateAccount}> = (props) => { + const {data} = props ?? {}; + + return createAccount(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CreateAccountMutationResult = NonNullable>> + export type CreateAccountMutationBody = ReqCreateAccount + export type CreateAccountMutationError = void | HTTPValidationError + + /** * @summary 계정 생성 */ -export const useCreateAccount = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateAccount }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCreateAccount }, - TContext -> => { - const mutationOptions = getCreateAccountMutationOptions(options); +export const useCreateAccount = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateAccount}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCreateAccount}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getCreateAccountMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * refresh 토큰으로 access 토큰을 재발급한다. * @summary 액세스 토큰 갱신 */ -export const refreshToken = (signal?: AbortSignal) => { - return customFetch({ - url: `/v1/auth/refresh_token`, - method: "POST", - signal, - }); -}; +export const refreshToken = ( + + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/auth/refresh_token`, method: 'POST', signal + }, + options); + } + -export const getRefreshTokenMutationOptions = < - TError = void, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - void, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - void, - TContext -> => { - const mutationKey = ["refreshToken"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - void - > = () => { - return refreshToken(); - }; +export const getRefreshTokenMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,void, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,void, TContext> => { - return { mutationFn, ...mutationOptions }; -}; +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}; -export type RefreshTokenMutationResult = NonNullable< - Awaited> ->; + -export type RefreshTokenMutationError = void; -/** + const mutationFn: MutationFunction>, void> = () => { + + + return refreshToken(requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type RefreshTokenMutationResult = NonNullable>> + + export type RefreshTokenMutationError = void + + /** * @summary 액세스 토큰 갱신 */ -export const useRefreshToken = ( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - void, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - void, - TContext -> => { - const mutationOptions = getRefreshTokenMutationOptions(options); +export const useRefreshToken = (options?: { mutation?:UseMutationOptions>, TError,void, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + void, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getRefreshTokenMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * 유효한 access 토큰이 있어야 호출 가능. 토큰의 유저+회사 정보를 반환한다. * @summary 내 정보 */ -export const me = (signal?: AbortSignal) => { - return customFetch({ url: `/v1/auth/me`, method: "GET", signal }); -}; +export const me = ( + + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/auth/me`, method: 'GET', signal + }, + options); + } + + + export const getMeQueryKey = () => { - return [`/v1/auth/me`] as const; -}; + return [ + `/v1/auth/me` + ] as const; + } -export const getMeQueryOptions = < - TData = Awaited>, - TError = void, ->(options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; -}) => { - const { query: queryOptions } = options ?? {}; + +export const getMeQueryOptions = >, TError = void>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { - const queryKey = queryOptions?.queryKey ?? getMeQueryKey(); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction>> = ({ signal }) => - me(signal); + const queryKey = queryOptions?.queryKey ?? getMeQueryKey(); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + + + const queryFn: QueryFunction>> = ({ signal }) => me(requestOptions, signal); + + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type MeQueryResult = NonNullable>> +export type MeQueryError = void -export type MeQueryResult = NonNullable>>; -export type MeQueryError = void; export function useMe>, TError = void>( - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } export function useMe>, TError = void>( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } export function useMe>, TError = void>( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 내 정보 */ export function useMe>, TError = void>( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getMeQueryOptions(options); + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getMeQueryOptions(options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + + diff --git a/negodata/front/src/api/generated/card/card.ts b/negodata/front/src/api/generated/card/card.ts index f8ffcd3..f97e319 100644 --- a/negodata/front/src/api/generated/card/card.ts +++ b/negodata/front/src/api/generated/card/card.ts @@ -4,7 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useMutation, useQuery } from "@tanstack/react-query"; +import { + useMutation, + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -17,8 +20,8 @@ import type { UseMutationOptions, UseMutationResult, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; import type { HTTPValidationError, @@ -27,525 +30,388 @@ import type { ReqUpdateCard, ResCard, ResCardList, - ResDeleteCard, -} from ".././model"; + ResDeleteCard +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary 협상카드 목록 */ -export const listCards = (params?: ListCardsParams, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/card/list`, - method: "GET", - params, - signal, - }); -}; - -export const getListCardsQueryKey = (params?: ListCardsParams) => { - return [`/v1/card/list`, ...(params ? [params] : [])] as const; -}; - -export const getListCardsQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListCardsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const listCards = ( + params?: ListCardsParams, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/card/list`, method: 'GET', + params, signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getListCardsQueryKey(params); - const queryFn: QueryFunction>> = ({ - signal, - }) => listCards(params, signal); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getListCardsQueryKey = (params?: ListCardsParams,) => { + return [ + `/v1/card/list`, ...(params ? [params]: []) + ] as const; + } -export type ListCardsQueryResult = NonNullable< - Awaited> ->; -export type ListCardsQueryError = void | HTTPValidationError; + +export const getListCardsQueryOptions = >, TError = void | HTTPValidationError>(params?: ListCardsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useListCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params: undefined | ListCardsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getListCardsQueryKey(params); + + + + const queryFn: QueryFunction>> = ({ signal }) => listCards(params, requestOptions, signal); + + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListCardsQueryResult = NonNullable>> +export type ListCardsQueryError = void | HTTPValidationError + + +export function useListCards>, TError = void | HTTPValidationError>( + params: undefined | ListCardsParams, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListCardsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListCards>, TError = void | HTTPValidationError>( + params?: ListCardsParams, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListCardsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListCards>, TError = void | HTTPValidationError>( + params?: ListCardsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 협상카드 목록 */ -export function useListCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListCardsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListCardsQueryOptions(params, options); +export function useListCards>, TError = void | HTTPValidationError>( + params?: ListCardsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListCardsQueryOptions(params,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 협상카드 등록 */ export const createCard = ( - reqCreateCard: ReqCreateCard, - signal?: AbortSignal, + reqCreateCard: ReqCreateCard, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/card/create`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCreateCard, - signal, - }); -}; + + + return customFetch( + {url: `/v1/card/create`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: reqCreateCard, signal + }, + options); + } + -export const getCreateCardMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateCard }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateCard }, - TContext -> => { - const mutationKey = ["createCard"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCreateCard } - > = (props) => { - const { data } = props ?? {}; +export const getCreateCardMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateCard}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCreateCard}, TContext> => { - return createCard(data); - }; +const mutationKey = ['createCard']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CreateCardMutationResult = NonNullable< - Awaited> ->; -export type CreateCardMutationBody = ReqCreateCard; -export type CreateCardMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCreateCard}> = (props) => { + const {data} = props ?? {}; + + return createCard(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CreateCardMutationResult = NonNullable>> + export type CreateCardMutationBody = ReqCreateCard + export type CreateCardMutationError = void | HTTPValidationError + + /** * @summary 협상카드 등록 */ -export const useCreateCard = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateCard }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCreateCard }, - TContext -> => { - const mutationOptions = getCreateCardMutationOptions(options); +export const useCreateCard = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateCard}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCreateCard}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getCreateCardMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 협상카드 조회 */ -export const getCard = (cardId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/card/${cardId}`, - method: "GET", - signal, - }); -}; - -export const getGetCardQueryKey = (cardId?: string) => { - return [`/v1/card/${cardId}`] as const; -}; - -export const getGetCardQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - cardId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const getCard = ( + cardId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/card/${cardId}`, method: 'GET', signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getGetCardQueryKey(cardId); - const queryFn: QueryFunction>> = ({ - signal, - }) => getCard(cardId, signal); - return { - queryKey, - queryFn, - enabled: !!cardId, - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; +export const getGetCardQueryKey = (cardId?: string,) => { + return [ + `/v1/card/${cardId}` + ] as const; + } -export type GetCardQueryResult = NonNullable< - Awaited> ->; -export type GetCardQueryError = void | HTTPValidationError; + +export const getGetCardQueryOptions = >, TError = void | HTTPValidationError>(cardId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetCard< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - cardId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetCardQueryKey(cardId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getCard(cardId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(cardId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetCardQueryResult = NonNullable>> +export type GetCardQueryError = void | HTTPValidationError + + +export function useGetCard>, TError = void | HTTPValidationError>( + cardId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetCard< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - cardId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetCard>, TError = void | HTTPValidationError>( + cardId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetCard< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - cardId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetCard>, TError = void | HTTPValidationError>( + cardId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 협상카드 조회 */ -export function useGetCard< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - cardId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetCardQueryOptions(cardId, options); +export function useGetCard>, TError = void | HTTPValidationError>( + cardId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetCardQueryOptions(cardId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } -/** - * @summary 협상카드 수정 - */ -export const updateCard = (cardId: string, reqUpdateCard: ReqUpdateCard) => { - return customFetch({ - url: `/v1/card/update/${cardId}`, - method: "PATCH", - headers: { "Content-Type": "application/json" }, - data: reqUpdateCard, - }); -}; -export const getUpdateCardMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { cardId: string; data: ReqUpdateCard }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { cardId: string; data: ReqUpdateCard }, - TContext -> => { - const mutationKey = ["updateCard"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { cardId: string; data: ReqUpdateCard } - > = (props) => { - const { cardId, data } = props ?? {}; - - return updateCard(cardId, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UpdateCardMutationResult = NonNullable< - Awaited> ->; -export type UpdateCardMutationBody = ReqUpdateCard; -export type UpdateCardMutationError = void | HTTPValidationError; /** * @summary 협상카드 수정 */ -export const useUpdateCard = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { cardId: string; data: ReqUpdateCard }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { cardId: string; data: ReqUpdateCard }, - TContext -> => { - const mutationOptions = getUpdateCardMutationOptions(options); +export const updateCard = ( + cardId: string, + reqUpdateCard: ReqUpdateCard, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/card/update/${cardId}`, method: 'PATCH', + headers: {'Content-Type': 'application/json', }, + data: reqUpdateCard + }, + options); + } + - return useMutation(mutationOptions, queryClient); -}; -/** + +export const getUpdateCardMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{cardId: string;data: ReqUpdateCard}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{cardId: string;data: ReqUpdateCard}, TContext> => { + +const mutationKey = ['updateCard']; +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>, {cardId: string;data: ReqUpdateCard}> = (props) => { + const {cardId,data} = props ?? {}; + + return updateCard(cardId,data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type UpdateCardMutationResult = NonNullable>> + export type UpdateCardMutationBody = ReqUpdateCard + export type UpdateCardMutationError = void | HTTPValidationError + + /** + * @summary 협상카드 수정 + */ +export const useUpdateCard = (options?: { mutation?:UseMutationOptions>, TError,{cardId: string;data: ReqUpdateCard}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {cardId: string;data: ReqUpdateCard}, + TContext + > => { + + const mutationOptions = getUpdateCardMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 협상카드 삭제 */ -export const deleteCard = (cardId: string) => { - return customFetch({ - url: `/v1/card/delete/${cardId}`, - method: "DELETE", - }); -}; +export const deleteCard = ( + cardId: string, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/card/delete/${cardId}`, method: 'DELETE' + }, + options); + } + -export const getDeleteCardMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { cardId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { cardId: string }, - TContext -> => { - const mutationKey = ["deleteCard"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { cardId: string } - > = (props) => { - const { cardId } = props ?? {}; +export const getDeleteCardMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{cardId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{cardId: string}, TContext> => { - return deleteCard(cardId); - }; +const mutationKey = ['deleteCard']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type DeleteCardMutationResult = NonNullable< - Awaited> ->; -export type DeleteCardMutationError = void | HTTPValidationError; + const mutationFn: MutationFunction>, {cardId: string}> = (props) => { + const {cardId} = props ?? {}; -/** + return deleteCard(cardId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type DeleteCardMutationResult = NonNullable>> + + export type DeleteCardMutationError = void | HTTPValidationError + + /** * @summary 협상카드 삭제 */ -export const useDeleteCard = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { cardId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { cardId: string }, - TContext -> => { - const mutationOptions = getDeleteCardMutationOptions(options); +export const useDeleteCard = (options?: { mutation?:UseMutationOptions>, TError,{cardId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {cardId: string}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; + const mutationOptions = getDeleteCardMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + \ No newline at end of file diff --git a/negodata/front/src/api/generated/default/default.ts b/negodata/front/src/api/generated/default/default.ts index 349773f..60a2070 100644 --- a/negodata/front/src/api/generated/default/default.ts +++ b/negodata/front/src/api/generated/default/default.ts @@ -4,7 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useQuery } from "@tanstack/react-query"; +import { + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -14,150 +16,105 @@ import type { QueryKey, UndefinedInitialDataOptions, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary Healthz */ -export const healthzHealthzGet = (signal?: AbortSignal) => { - return customFetch({ url: `/healthz`, method: "GET", signal }); -}; +export const healthzHealthzGet = ( + + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/healthz`, method: 'GET', signal + }, + options); + } + + + export const getHealthzHealthzGetQueryKey = () => { - return [`/healthz`] as const; -}; + return [ + `/healthz` + ] as const; + } -export const getHealthzHealthzGetQueryOptions = < - TData = Awaited>, - TError = void, ->(options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; -}) => { - const { query: queryOptions } = options ?? {}; + +export const getHealthzHealthzGetQueryOptions = >, TError = void>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { - const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey(); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => healthzHealthzGet(signal); + const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey(); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + -export type HealthzHealthzGetQueryResult = NonNullable< - Awaited> ->; -export type HealthzHealthzGetQueryError = void; + const queryFn: QueryFunction>> = ({ signal }) => healthzHealthzGet(requestOptions, signal); -export function useHealthzHealthzGet< - TData = Awaited>, - TError = void, ->( - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type HealthzHealthzGetQueryResult = NonNullable>> +export type HealthzHealthzGetQueryError = void + + +export function useHealthzHealthzGet>, TError = void>( + options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useHealthzHealthzGet< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useHealthzHealthzGet>, TError = void>( + options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useHealthzHealthzGet< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useHealthzHealthzGet>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary Healthz */ -export function useHealthzHealthzGet< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getHealthzHealthzGetQueryOptions(options); +export function useHealthzHealthzGet>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getHealthzHealthzGetQueryOptions(options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + + diff --git a/negodata/front/src/api/generated/enums/enums.ts b/negodata/front/src/api/generated/enums/enums.ts index 41850d4..fb3e5ee 100644 --- a/negodata/front/src/api/generated/enums/enums.ts +++ b/negodata/front/src/api/generated/enums/enums.ts @@ -4,7 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useQuery } from "@tanstack/react-query"; +import { + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -14,132 +16,109 @@ import type { QueryKey, UndefinedInitialDataOptions, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; + +import type { + ResEnums +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; -import type { ResEnums } from ".././model"; -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary 도메인 코드 enum 전체 */ -export const listEnums = (signal?: AbortSignal) => { - return customFetch({ url: `/v1/enums`, method: "GET", signal }); -}; +export const listEnums = ( + + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/enums`, method: 'GET', signal + }, + options); + } + + + export const getListEnumsQueryKey = () => { - return [`/v1/enums`] as const; -}; + return [ + `/v1/enums` + ] as const; + } -export const getListEnumsQueryOptions = < - TData = Awaited>, - TError = void, ->(options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; -}) => { - const { query: queryOptions } = options ?? {}; + +export const getListEnumsQueryOptions = >, TError = void>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { - const queryKey = queryOptions?.queryKey ?? getListEnumsQueryKey(); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction>> = ({ - signal, - }) => listEnums(signal); + const queryKey = queryOptions?.queryKey ?? getListEnumsQueryKey(); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + -export type ListEnumsQueryResult = NonNullable< - Awaited> ->; -export type ListEnumsQueryError = void; + const queryFn: QueryFunction>> = ({ signal }) => listEnums(requestOptions, signal); -export function useListEnums< - TData = Awaited>, - TError = void, ->( - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListEnumsQueryResult = NonNullable>> +export type ListEnumsQueryError = void + + +export function useListEnums>, TError = void>( + options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListEnums< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListEnums>, TError = void>( + options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListEnums< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListEnums>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 도메인 코드 enum 전체 */ -export function useListEnums< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListEnumsQueryOptions(options); +export function useListEnums>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListEnumsQueryOptions(options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + + diff --git a/negodata/front/src/api/generated/item/item.ts b/negodata/front/src/api/generated/item/item.ts index e732c89..7d2a8ce 100644 --- a/negodata/front/src/api/generated/item/item.ts +++ b/negodata/front/src/api/generated/item/item.ts @@ -4,7 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useMutation, useQuery } from "@tanstack/react-query"; +import { + useMutation, + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -17,11 +20,11 @@ import type { UseMutationOptions, UseMutationResult, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; import type { - BodyUploadItemsExcelV1ItemUploadExcelPost, + BodyUploadItemImageV1ItemImagePost, HTTPValidationError, ListItemsParams, ReqCheckCodes, @@ -29,1069 +32,768 @@ import type { ReqUpdateItem, ResCheckCodes, ResDeleteItem, - ResExcelUpload, ResItem, ResItemCategories, + ResItemImage, ResItemList, ResLowestPriceResult, - ResLowestPriceTrigger, -} from ".././model"; + ResLowestPriceTrigger +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary 상품 목록 */ -export const listItems = (params?: ListItemsParams, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/item/list`, - method: "GET", - params, - signal, - }); -}; - -export const getListItemsQueryKey = (params?: ListItemsParams) => { - return [`/v1/item/list`, ...(params ? [params] : [])] as const; -}; - -export const getListItemsQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListItemsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const listItems = ( + params?: ListItemsParams, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/item/list`, method: 'GET', + params, signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getListItemsQueryKey(params); - const queryFn: QueryFunction>> = ({ - signal, - }) => listItems(params, signal); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getListItemsQueryKey = (params?: ListItemsParams,) => { + return [ + `/v1/item/list`, ...(params ? [params]: []) + ] as const; + } -export type ListItemsQueryResult = NonNullable< - Awaited> ->; -export type ListItemsQueryError = void | HTTPValidationError; + +export const getListItemsQueryOptions = >, TError = void | HTTPValidationError>(params?: ListItemsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useListItems< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params: undefined | ListItemsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getListItemsQueryKey(params); + + + + const queryFn: QueryFunction>> = ({ signal }) => listItems(params, requestOptions, signal); + + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListItemsQueryResult = NonNullable>> +export type ListItemsQueryError = void | HTTPValidationError + + +export function useListItems>, TError = void | HTTPValidationError>( + params: undefined | ListItemsParams, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListItems< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListItemsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListItems>, TError = void | HTTPValidationError>( + params?: ListItemsParams, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListItems< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListItemsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListItems>, TError = void | HTTPValidationError>( + params?: ListItemsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 상품 목록 */ -export function useListItems< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListItemsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListItemsQueryOptions(params, options); +export function useListItems>, TError = void | HTTPValidationError>( + params?: ListItemsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListItemsQueryOptions(params,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 상품 카테고리 목록(distinct) */ -export const listItemCategories = (signal?: AbortSignal) => { - return customFetch({ - url: `/v1/item/categories`, - method: "GET", - signal, - }); -}; +export const listItemCategories = ( + + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/item/categories`, method: 'GET', signal + }, + options); + } + + + export const getListItemCategoriesQueryKey = () => { - return [`/v1/item/categories`] as const; -}; + return [ + `/v1/item/categories` + ] as const; + } -export const getListItemCategoriesQueryOptions = < - TData = Awaited>, - TError = void, ->(options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; -}) => { - const { query: queryOptions } = options ?? {}; + +export const getListItemCategoriesQueryOptions = >, TError = void>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { - const queryKey = queryOptions?.queryKey ?? getListItemCategoriesQueryKey(); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => listItemCategories(signal); + const queryKey = queryOptions?.queryKey ?? getListItemCategoriesQueryKey(); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + -export type ListItemCategoriesQueryResult = NonNullable< - Awaited> ->; -export type ListItemCategoriesQueryError = void; + const queryFn: QueryFunction>> = ({ signal }) => listItemCategories(requestOptions, signal); -export function useListItemCategories< - TData = Awaited>, - TError = void, ->( - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListItemCategoriesQueryResult = NonNullable>> +export type ListItemCategoriesQueryError = void + + +export function useListItemCategories>, TError = void>( + options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListItemCategories< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListItemCategories>, TError = void>( + options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListItemCategories< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListItemCategories>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 상품 카테고리 목록(distinct) */ -export function useListItemCategories< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListItemCategoriesQueryOptions(options); +export function useListItemCategories>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListItemCategoriesQueryOptions(options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 상품 등록 */ export const createItem = ( - reqCreateItem: ReqCreateItem, - signal?: AbortSignal, + reqCreateItem: ReqCreateItem, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/item/create`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCreateItem, - signal, - }); -}; + + + return customFetch( + {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>, - TError, - { data: ReqCreateItem }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateItem }, - TContext -> => { - const mutationKey = ["createItem"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCreateItem } - > = (props) => { - const { data } = props ?? {}; +export const getCreateItemMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateItem}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCreateItem}, TContext> => { - return createItem(data); - }; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CreateItemMutationResult = NonNullable< - Awaited> ->; -export type CreateItemMutationBody = ReqCreateItem; -export type CreateItemMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCreateItem}> = (props) => { + const {data} = props ?? {}; + + return createItem(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CreateItemMutationResult = NonNullable>> + export type CreateItemMutationBody = ReqCreateItem + export type CreateItemMutationError = void | HTTPValidationError + + /** * @summary 상품 등록 */ -export const useCreateItem = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateItem }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCreateItem }, - TContext -> => { - const mutationOptions = getCreateItemMutationOptions(options); +export const useCreateItem = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateItem}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCreateItem}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getCreateItemMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 코드 중복 사전검사(업로드 즉시) */ export const checkItemCodes = ( - reqCheckCodes: ReqCheckCodes, - signal?: AbortSignal, + reqCheckCodes: ReqCheckCodes, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/item/check-codes`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCheckCodes, - signal, - }); -}; + + + return customFetch( + {url: `/v1/item/check-codes`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: reqCheckCodes, signal + }, + options); + } + -export const getCheckItemCodesMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext -> => { - const mutationKey = ["checkItemCodes"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCheckCodes } - > = (props) => { - const { data } = props ?? {}; +export const getCheckItemCodesMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCheckCodes}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCheckCodes}, TContext> => { - return checkItemCodes(data); - }; +const mutationKey = ['checkItemCodes']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CheckItemCodesMutationResult = NonNullable< - Awaited> ->; -export type CheckItemCodesMutationBody = ReqCheckCodes; -export type CheckItemCodesMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCheckCodes}> = (props) => { + const {data} = props ?? {}; + + return checkItemCodes(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CheckItemCodesMutationResult = NonNullable>> + export type CheckItemCodesMutationBody = ReqCheckCodes + export type CheckItemCodesMutationError = void | HTTPValidationError + + /** * @summary 코드 중복 사전검사(업로드 즉시) */ -export const useCheckItemCodes = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext -> => { - const mutationOptions = getCheckItemCodesMutationOptions(options); +export const useCheckItemCodes = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCheckCodes}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCheckCodes}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** - * @summary 엑셀 일괄 등록(스텁) + const mutationOptions = getCheckItemCodesMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** + * @summary 상품 이미지 업로드(Azure Blob) */ -export const uploadItemsExcel = ( - bodyUploadItemsExcelV1ItemUploadExcelPost: BodyUploadItemsExcelV1ItemUploadExcelPost, - signal?: AbortSignal, +export const uploadItemImage = ( + bodyUploadItemImageV1ItemImagePost: BodyUploadItemImageV1ItemImagePost, + options?: SecondParameter,signal?: AbortSignal ) => { - const formData = new FormData(); - formData.append(`file`, bodyUploadItemsExcelV1ItemUploadExcelPost.file); + + const formData = new FormData(); +formData.append(`file`, bodyUploadItemImageV1ItemImagePost.file) - return customFetch({ - url: `/v1/item/upload-excel`, - method: "POST", - headers: { "Content-Type": "multipart/form-data" }, - data: formData, - signal, - }); -}; + return customFetch( + {url: `/v1/item/image`, method: 'POST', + headers: {'Content-Type': 'multipart/form-data', }, + data: formData, signal + }, + options); + } + -export const getUploadItemsExcelMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: BodyUploadItemsExcelV1ItemUploadExcelPost }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: BodyUploadItemsExcelV1ItemUploadExcelPost }, - TContext -> => { - const mutationKey = ["uploadItemsExcel"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: BodyUploadItemsExcelV1ItemUploadExcelPost } - > = (props) => { - const { data } = props ?? {}; +export const getUploadItemImageMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: BodyUploadItemImageV1ItemImagePost}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: BodyUploadItemImageV1ItemImagePost}, TContext> => { - return uploadItemsExcel(data); - }; +const mutationKey = ['uploadItemImage']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type UploadItemsExcelMutationResult = NonNullable< - Awaited> ->; -export type UploadItemsExcelMutationBody = - BodyUploadItemsExcelV1ItemUploadExcelPost; -export type UploadItemsExcelMutationError = void | HTTPValidationError; -/** - * @summary 엑셀 일괄 등록(스텁) + const mutationFn: MutationFunction>, {data: BodyUploadItemImageV1ItemImagePost}> = (props) => { + const {data} = props ?? {}; + + return uploadItemImage(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type UploadItemImageMutationResult = NonNullable>> + export type UploadItemImageMutationBody = BodyUploadItemImageV1ItemImagePost + export type UploadItemImageMutationError = void | HTTPValidationError + + /** + * @summary 상품 이미지 업로드(Azure Blob) */ -export const useUploadItemsExcel = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: BodyUploadItemsExcelV1ItemUploadExcelPost }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: BodyUploadItemsExcelV1ItemUploadExcelPost }, - TContext -> => { - const mutationOptions = getUploadItemsExcelMutationOptions(options); +export const useUploadItemImage = (options?: { mutation?:UseMutationOptions>, TError,{data: BodyUploadItemImageV1ItemImagePost}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: BodyUploadItemImageV1ItemImagePost}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getUploadItemImageMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 상품 조회 */ -export const getItem = (itemId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/item/${itemId}`, - method: "GET", - signal, - }); -}; - -export const getGetItemQueryKey = (itemId?: string) => { - return [`/v1/item/${itemId}`] as const; -}; - -export const getGetItemQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const getItem = ( + itemId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/item/${itemId}`, method: 'GET', signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getGetItemQueryKey(itemId); - const queryFn: QueryFunction>> = ({ - signal, - }) => getItem(itemId, signal); - return { - queryKey, - queryFn, - enabled: !!itemId, - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; +export const getGetItemQueryKey = (itemId?: string,) => { + return [ + `/v1/item/${itemId}` + ] as const; + } -export type GetItemQueryResult = NonNullable< - Awaited> ->; -export type GetItemQueryError = void | HTTPValidationError; + +export const getGetItemQueryOptions = >, TError = void | HTTPValidationError>(itemId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetItem< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetItemQueryKey(itemId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getItem(itemId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(itemId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetItemQueryResult = NonNullable>> +export type GetItemQueryError = void | HTTPValidationError + + +export function useGetItem>, TError = void | HTTPValidationError>( + itemId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetItem< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetItem>, TError = void | HTTPValidationError>( + itemId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetItem< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetItem>, TError = void | HTTPValidationError>( + itemId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 상품 조회 */ -export function useGetItem< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetItemQueryOptions(itemId, options); +export function useGetItem>, TError = void | HTTPValidationError>( + itemId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetItemQueryOptions(itemId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } -/** - * @summary 상품 수정 - */ -export const updateItem = (itemId: string, reqUpdateItem: ReqUpdateItem) => { - return customFetch({ - url: `/v1/item/update/${itemId}`, - method: "PATCH", - headers: { "Content-Type": "application/json" }, - data: reqUpdateItem, - }); -}; -export const getUpdateItemMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { itemId: string; data: ReqUpdateItem }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { itemId: string; data: ReqUpdateItem }, - TContext -> => { - const mutationKey = ["updateItem"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { itemId: string; data: ReqUpdateItem } - > = (props) => { - const { itemId, data } = props ?? {}; - - return updateItem(itemId, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UpdateItemMutationResult = NonNullable< - Awaited> ->; -export type UpdateItemMutationBody = ReqUpdateItem; -export type UpdateItemMutationError = void | HTTPValidationError; /** * @summary 상품 수정 */ -export const useUpdateItem = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { itemId: string; data: ReqUpdateItem }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { itemId: string; data: ReqUpdateItem }, - TContext -> => { - const mutationOptions = getUpdateItemMutationOptions(options); +export const updateItem = ( + itemId: string, + reqUpdateItem: ReqUpdateItem, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/item/update/${itemId}`, method: 'PATCH', + headers: {'Content-Type': 'application/json', }, + data: reqUpdateItem + }, + options); + } + - return useMutation(mutationOptions, queryClient); -}; -/** + +export const getUpdateItemMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{itemId: string;data: ReqUpdateItem}, TContext>, request?: SecondParameter} +): UseMutationOptions>, 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>, {itemId: string;data: ReqUpdateItem}> = (props) => { + const {itemId,data} = props ?? {}; + + return updateItem(itemId,data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type UpdateItemMutationResult = NonNullable>> + export type UpdateItemMutationBody = ReqUpdateItem + export type UpdateItemMutationError = void | HTTPValidationError + + /** + * @summary 상품 수정 + */ +export const useUpdateItem = (options?: { mutation?:UseMutationOptions>, TError,{itemId: string;data: ReqUpdateItem}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {itemId: string;data: ReqUpdateItem}, + TContext + > => { + + const mutationOptions = getUpdateItemMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 상품 삭제 */ -export const deleteItem = (itemId: string) => { - return customFetch({ - url: `/v1/item/delete/${itemId}`, - method: "DELETE", - }); -}; +export const deleteItem = ( + itemId: string, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/item/delete/${itemId}`, method: 'DELETE' + }, + options); + } + -export const getDeleteItemMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { itemId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { itemId: string }, - TContext -> => { - const mutationKey = ["deleteItem"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { itemId: string } - > = (props) => { - const { itemId } = props ?? {}; +export const getDeleteItemMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{itemId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{itemId: string}, TContext> => { - return deleteItem(itemId); - }; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type DeleteItemMutationResult = NonNullable< - Awaited> ->; -export type DeleteItemMutationError = void | HTTPValidationError; + const mutationFn: MutationFunction>, {itemId: string}> = (props) => { + const {itemId} = props ?? {}; -/** + return deleteItem(itemId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type DeleteItemMutationResult = NonNullable>> + + export type DeleteItemMutationError = void | HTTPValidationError + + /** * @summary 상품 삭제 */ -export const useDeleteItem = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { itemId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { itemId: string }, - TContext -> => { - const mutationOptions = getDeleteItemMutationOptions(options); +export const useDeleteItem = (options?: { mutation?:UseMutationOptions>, TError,{itemId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {itemId: string}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getDeleteItemMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 최저가 수집 요청(스텁) */ -export const triggerLowestPrice = (itemId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/item/${itemId}/lowest-price`, - method: "POST", - signal, - }); -}; +export const triggerLowestPrice = ( + itemId: string, + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/item/${itemId}/lowest-price`, method: 'POST', signal + }, + options); + } + -export const getTriggerLowestPriceMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { itemId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { itemId: string }, - TContext -> => { - const mutationKey = ["triggerLowestPrice"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { itemId: string } - > = (props) => { - const { itemId } = props ?? {}; +export const getTriggerLowestPriceMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{itemId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{itemId: string}, TContext> => { - return triggerLowestPrice(itemId); - }; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type TriggerLowestPriceMutationResult = NonNullable< - Awaited> ->; -export type TriggerLowestPriceMutationError = void | HTTPValidationError; + const mutationFn: MutationFunction>, {itemId: string}> = (props) => { + const {itemId} = props ?? {}; -/** + return triggerLowestPrice(itemId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type TriggerLowestPriceMutationResult = NonNullable>> + + export type TriggerLowestPriceMutationError = void | HTTPValidationError + + /** * @summary 최저가 수집 요청(스텁) */ -export const useTriggerLowestPrice = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { itemId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { itemId: string }, - TContext -> => { - const mutationOptions = getTriggerLowestPriceMutationOptions(options); +export const useTriggerLowestPrice = (options?: { mutation?:UseMutationOptions>, TError,{itemId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {itemId: string}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getTriggerLowestPriceMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 최저가 수집 결과(스텁) */ -export const getLowestPrice = (itemId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/item/${itemId}/lowest-price`, - method: "GET", - signal, - }); -}; - -export const getGetLowestPriceQueryKey = (itemId?: string) => { - return [`/v1/item/${itemId}/lowest-price`] as const; -}; - -export const getGetLowestPriceQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const getLowestPrice = ( + itemId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/item/${itemId}/lowest-price`, method: 'GET', signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getGetLowestPriceQueryKey(itemId); - const queryFn: QueryFunction>> = ({ - signal, - }) => getLowestPrice(itemId, signal); - return { - queryKey, - queryFn, - enabled: !!itemId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetLowestPriceQueryKey = (itemId?: string,) => { + return [ + `/v1/item/${itemId}/lowest-price` + ] as const; + } -export type GetLowestPriceQueryResult = NonNullable< - Awaited> ->; -export type GetLowestPriceQueryError = void | HTTPValidationError; + +export const getGetLowestPriceQueryOptions = >, TError = void | HTTPValidationError>(itemId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetLowestPrice< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetLowestPriceQueryKey(itemId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getLowestPrice(itemId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(itemId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetLowestPriceQueryResult = NonNullable>> +export type GetLowestPriceQueryError = void | HTTPValidationError + + +export function useGetLowestPrice>, TError = void | HTTPValidationError>( + itemId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetLowestPrice< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetLowestPrice>, TError = void | HTTPValidationError>( + itemId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetLowestPrice< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetLowestPrice>, TError = void | HTTPValidationError>( + itemId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 최저가 수집 결과(스텁) */ -export function useGetLowestPrice< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - itemId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetLowestPriceQueryOptions(itemId, options); +export function useGetLowestPrice>, TError = void | HTTPValidationError>( + itemId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetLowestPriceQueryOptions(itemId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + + diff --git a/negodata/front/src/api/generated/model/bodyUploadItemsExcelV1ItemUploadExcelPost.ts b/negodata/front/src/api/generated/model/bodyUploadItemImageV1ItemImagePost.ts similarity index 69% rename from negodata/front/src/api/generated/model/bodyUploadItemsExcelV1ItemUploadExcelPost.ts rename to negodata/front/src/api/generated/model/bodyUploadItemImageV1ItemImagePost.ts index 978a18e..2f7cbfd 100644 --- a/negodata/front/src/api/generated/model/bodyUploadItemsExcelV1ItemUploadExcelPost.ts +++ b/negodata/front/src/api/generated/model/bodyUploadItemImageV1ItemImagePost.ts @@ -5,6 +5,6 @@ * OpenAPI spec version: 0.1.0 */ -export interface BodyUploadItemsExcelV1ItemUploadExcelPost { +export interface BodyUploadItemImageV1ItemImagePost { file: string; } diff --git a/negodata/front/src/api/generated/model/cardData.ts b/negodata/front/src/api/generated/model/cardData.ts index 0d2562c..797f7c0 100644 --- a/negodata/front/src/api/generated/model/cardData.ts +++ b/negodata/front/src/api/generated/model/cardData.ts @@ -4,15 +4,15 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { CardDataUserId } from "./cardDataUserId"; -import type { CardDataName } from "./cardDataName"; -import type { CardDataNumber } from "./cardDataNumber"; -import type { CardDataScript } from "./cardDataScript"; -import type { CardDataEditScript } from "./cardDataEditScript"; -import type { CardDataCondition } from "./cardDataCondition"; -import type { CardDataMemo } from "./cardDataMemo"; -import type { CardDataCreatedAt } from "./cardDataCreatedAt"; -import type { CardDataUpdatedAt } from "./cardDataUpdatedAt"; +import type { CardDataUserId } from './cardDataUserId'; +import type { CardDataName } from './cardDataName'; +import type { CardDataNumber } from './cardDataNumber'; +import type { CardDataScript } from './cardDataScript'; +import type { CardDataEditScript } from './cardDataEditScript'; +import type { CardDataCondition } from './cardDataCondition'; +import type { CardDataMemo } from './cardDataMemo'; +import type { CardDataCreatedAt } from './cardDataCreatedAt'; +import type { CardDataUpdatedAt } from './cardDataUpdatedAt'; export interface CardData { nego_card_id: string; diff --git a/negodata/front/src/api/generated/model/chatMessageData.ts b/negodata/front/src/api/generated/model/chatMessageData.ts index 99cfe87..3b484ae 100644 --- a/negodata/front/src/api/generated/model/chatMessageData.ts +++ b/negodata/front/src/api/generated/model/chatMessageData.ts @@ -4,10 +4,10 @@ * 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"; +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; diff --git a/negodata/front/src/api/generated/model/errorInfo.ts b/negodata/front/src/api/generated/model/errorInfo.ts index 7ccbc95..f226536 100644 --- a/negodata/front/src/api/generated/model/errorInfo.ts +++ b/negodata/front/src/api/generated/model/errorInfo.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfoSuccess } from "./errorInfoSuccess"; -import type { ErrorInfoCode } from "./errorInfoCode"; -import type { ErrorInfoDesc } from "./errorInfoDesc"; +import type { ErrorInfoSuccess } from './errorInfoSuccess'; +import type { ErrorInfoCode } from './errorInfoCode'; +import type { ErrorInfoDesc } from './errorInfoDesc'; /** * 모든 응답에 공통으로 실리는 결과 정보. result.success / code / desc 로 내려간다. diff --git a/negodata/front/src/api/generated/model/hTTPValidationError.ts b/negodata/front/src/api/generated/model/hTTPValidationError.ts index 8ad3bd9..c8a1766 100644 --- a/negodata/front/src/api/generated/model/hTTPValidationError.ts +++ b/negodata/front/src/api/generated/model/hTTPValidationError.ts @@ -4,7 +4,7 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ValidationError } from "./validationError"; +import type { ValidationError } from './validationError'; export interface HTTPValidationError { detail?: ValidationError[]; diff --git a/negodata/front/src/api/generated/model/index.ts b/negodata/front/src/api/generated/model/index.ts index 01ae6f3..094606e 100644 --- a/negodata/front/src/api/generated/model/index.ts +++ b/negodata/front/src/api/generated/model/index.ts @@ -5,248 +5,253 @@ * OpenAPI spec version: 0.1.0 */ -export * from "./asyncJob"; -export * from "./bodyUploadItemsExcelV1ItemUploadExcelPost"; -export * from "./bodyUploadSuppliersExcelV1SupplierUploadExcelPost"; -export * from "./cardData"; -export * from "./cardDataCondition"; -export * from "./cardDataCreatedAt"; -export * from "./cardDataEditScript"; -export * from "./cardDataMemo"; -export * from "./cardDataName"; -export * from "./cardDataNumber"; -export * from "./cardDataScript"; -export * from "./cardDataUpdatedAt"; -export * from "./cardDataUserId"; -export * from "./chatMessageData"; -export * from "./chatMessageDataCardId"; -export * from "./chatMessageDataCardType"; -export * from "./chatMessageDataCardUsedYn"; -export * from "./chatMessageDataIndicatorValue"; -export * from "./companyData"; -export * from "./enumOption"; -export * from "./errorInfo"; -export * from "./errorInfoCode"; -export * from "./errorInfoDesc"; -export * from "./errorInfoSuccess"; -export * from "./hTTPValidationError"; -export * from "./itemCategory"; -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 "./listCardsParams"; -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 "./reqCheckCodes"; -export * from "./reqCreateAccount"; -export * from "./reqCreateCard"; -export * from "./reqCreateCardCondition"; -export * from "./reqCreateCardEditScript"; -export * from "./reqCreateCardMemo"; -export * from "./reqCreateCardName"; -export * from "./reqCreateCardNumber"; -export * from "./reqCreateCardScript"; -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 "./reqUpdateCard"; -export * from "./reqUpdateCardCondition"; -export * from "./reqUpdateCardEditScript"; -export * from "./reqUpdateCardMemo"; -export * from "./reqUpdateCardName"; -export * from "./reqUpdateCardNumber"; -export * from "./reqUpdateCardScript"; -export * from "./reqUpdateCardStatus"; -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 "./resCard"; -export * from "./resCardCard"; -export * from "./resCardList"; -export * from "./resCardListMsg"; -export * from "./resCardMsg"; -export * from "./resCheckCodes"; -export * from "./resCheckCodesMsg"; -export * from "./resCreateAccount"; -export * from "./resCreateAccountMsg"; -export * from "./resCreateQuotation"; -export * from "./resCreateQuotationAsyncJob"; -export * from "./resCreateQuotationMsg"; -export * from "./resCreateQuotationQuotation"; -export * from "./resDeleteCard"; -export * from "./resDeleteCardMsg"; -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 "./resEnums"; -export * from "./resEnumsEnums"; -export * from "./resEnumsMsg"; -export * from "./resExcelUpload"; -export * from "./resExcelUploadMsg"; -export * from "./resExcelUploadReceivedFilename"; -export * from "./resItem"; -export * from "./resItemCategories"; -export * from "./resItemCategoriesMsg"; -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"; +export * from './asyncJob'; +export * from './bodyUploadItemImageV1ItemImagePost'; +export * from './cardData'; +export * from './cardDataCondition'; +export * from './cardDataCreatedAt'; +export * from './cardDataEditScript'; +export * from './cardDataMemo'; +export * from './cardDataName'; +export * from './cardDataNumber'; +export * from './cardDataScript'; +export * from './cardDataUpdatedAt'; +export * from './cardDataUserId'; +export * from './chatMessageData'; +export * from './chatMessageDataCardId'; +export * from './chatMessageDataCardType'; +export * from './chatMessageDataCardUsedYn'; +export * from './chatMessageDataIndicatorValue'; +export * from './companyData'; +export * from './enumOption'; +export * from './errorInfo'; +export * from './errorInfoCode'; +export * from './errorInfoDesc'; +export * from './errorInfoSuccess'; +export * from './hTTPValidationError'; +export * from './itemCategory'; +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 './listCardsParams'; +export * from './listItemsParams'; +export * from './listQuotationsParams'; +export * from './listSuppliersParams'; +export * from './quotationCardData'; +export * from './quotationCardDataCondition'; +export * from './quotationCardDataEditScript'; +export * from './quotationCardDataMemo'; +export * from './quotationCardDataName'; +export * from './quotationCardDataNegoCardId'; +export * from './quotationCardDataNumber'; +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 './reqCheckCodes'; +export * from './reqCreateAccount'; +export * from './reqCreateCard'; +export * from './reqCreateCardCondition'; +export * from './reqCreateCardEditScript'; +export * from './reqCreateCardMemo'; +export * from './reqCreateCardName'; +export * from './reqCreateCardNumber'; +export * from './reqCreateCardScript'; +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 './reqUpdateCard'; +export * from './reqUpdateCardCondition'; +export * from './reqUpdateCardEditScript'; +export * from './reqUpdateCardMemo'; +export * from './reqUpdateCardName'; +export * from './reqUpdateCardNumber'; +export * from './reqUpdateCardScript'; +export * from './reqUpdateCardStatus'; +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 './resCard'; +export * from './resCardCard'; +export * from './resCardList'; +export * from './resCardListMsg'; +export * from './resCardMsg'; +export * from './resCheckCodes'; +export * from './resCheckCodesMsg'; +export * from './resCreateAccount'; +export * from './resCreateAccountMsg'; +export * from './resCreateQuotation'; +export * from './resCreateQuotationAsyncJob'; +export * from './resCreateQuotationMsg'; +export * from './resCreateQuotationQuotation'; +export * from './resDeleteCard'; +export * from './resDeleteCardMsg'; +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 './resEnums'; +export * from './resEnumsEnums'; +export * from './resEnumsMsg'; +export * from './resItem'; +export * from './resItemCategories'; +export * from './resItemCategoriesMsg'; +export * from './resItemImage'; +export * from './resItemImageFilename'; +export * from './resItemImageImageUrl'; +export * from './resItemImageMsg'; +export * from './resItemImageSize'; +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'; \ No newline at end of file diff --git a/negodata/front/src/api/generated/model/itemData.ts b/negodata/front/src/api/generated/model/itemData.ts index 3f8fc11..47c1448 100644 --- a/negodata/front/src/api/generated/model/itemData.ts +++ b/negodata/front/src/api/generated/model/itemData.ts @@ -4,22 +4,22 @@ * 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"; +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; diff --git a/negodata/front/src/api/generated/model/listCardsParams.ts b/negodata/front/src/api/generated/model/listCardsParams.ts index 9bf1168..70451cc 100644 --- a/negodata/front/src/api/generated/model/listCardsParams.ts +++ b/negodata/front/src/api/generated/model/listCardsParams.ts @@ -6,17 +6,17 @@ */ export type ListCardsParams = { - /** - * 카드명/카드번호/스크립트 검색 - */ - search?: string | null; - /** - * @minimum 1 - */ - page?: number; - /** - * @minimum 1 - * @maximum 100 - */ - size?: number; +/** + * 카드명/카드번호/스크립트 검색 + */ +search?: string | null; +/** + * @minimum 1 + */ +page?: number; +/** + * @minimum 1 + * @maximum 100 + */ +size?: number; }; diff --git a/negodata/front/src/api/generated/model/listItemsParams.ts b/negodata/front/src/api/generated/model/listItemsParams.ts index adb7538..0f09d32 100644 --- a/negodata/front/src/api/generated/model/listItemsParams.ts +++ b/negodata/front/src/api/generated/model/listItemsParams.ts @@ -6,21 +6,21 @@ */ export type ListItemsParams = { - /** - * 상품명/상품코드 검색 - */ - search?: string | null; - /** - * 카테고리 필터 - */ - category?: string | null; - /** - * @minimum 1 - */ - page?: number; - /** - * @minimum 1 - * @maximum 100 - */ - size?: number; +/** + * 상품명/상품코드 검색 + */ +search?: string | null; +/** + * 카테고리 필터 + */ +category?: string | null; +/** + * @minimum 1 + */ +page?: number; +/** + * @minimum 1 + * @maximum 100 + */ +size?: number; }; diff --git a/negodata/front/src/api/generated/model/listQuotationsParams.ts b/negodata/front/src/api/generated/model/listQuotationsParams.ts index 645861a..31679fb 100644 --- a/negodata/front/src/api/generated/model/listQuotationsParams.ts +++ b/negodata/front/src/api/generated/model/listQuotationsParams.ts @@ -6,29 +6,29 @@ */ 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; +/** + * 상태 필터(정확히 일치) + */ +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; }; diff --git a/negodata/front/src/api/generated/model/listSuppliersParams.ts b/negodata/front/src/api/generated/model/listSuppliersParams.ts index c6afa66..856b4f6 100644 --- a/negodata/front/src/api/generated/model/listSuppliersParams.ts +++ b/negodata/front/src/api/generated/model/listSuppliersParams.ts @@ -6,21 +6,21 @@ */ export type ListSuppliersParams = { - /** - * 협력사명/코드/담당자명 검색 - */ - search?: string | null; - /** - * 우선순위 필터(HIGH/MEDIUM/LOW) - */ - priority?: string | null; - /** - * @minimum 1 - */ - page?: number; - /** - * @minimum 1 - * @maximum 100 - */ - size?: number; +/** + * 협력사명/코드/담당자명 검색 + */ +search?: string | null; +/** + * 우선순위 필터(HIGH/MEDIUM/LOW) + */ +priority?: string | null; +/** + * @minimum 1 + */ +page?: number; +/** + * @minimum 1 + * @maximum 100 + */ +size?: number; }; diff --git a/negodata/front/src/api/generated/model/quotationCardData.ts b/negodata/front/src/api/generated/model/quotationCardData.ts index 42d25b1..16c9131 100644 --- a/negodata/front/src/api/generated/model/quotationCardData.ts +++ b/negodata/front/src/api/generated/model/quotationCardData.ts @@ -4,12 +4,16 @@ * 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"; +import type { QuotationCardDataQtId } from './quotationCardDataQtId'; +import type { QuotationCardDataNegoCardId } from './quotationCardDataNegoCardId'; +import type { QuotationCardDataWildCardId } from './quotationCardDataWildCardId'; +import type { QuotationCardDataType } from './quotationCardDataType'; +import type { QuotationCardDataNumber } from './quotationCardDataNumber'; +import type { QuotationCardDataName } from './quotationCardDataName'; +import type { QuotationCardDataScript } from './quotationCardDataScript'; +import type { QuotationCardDataEditScript } from './quotationCardDataEditScript'; +import type { QuotationCardDataCondition } from './quotationCardDataCondition'; +import type { QuotationCardDataMemo } from './quotationCardDataMemo'; export interface QuotationCardData { session_card_id: string; @@ -17,6 +21,10 @@ export interface QuotationCardData { nego_card_id?: QuotationCardDataNegoCardId; wild_card_id?: QuotationCardDataWildCardId; type?: QuotationCardDataType; + number?: QuotationCardDataNumber; name?: QuotationCardDataName; script?: QuotationCardDataScript; + edit_script?: QuotationCardDataEditScript; + condition?: QuotationCardDataCondition; + memo?: QuotationCardDataMemo; } diff --git a/negodata/front/src/api/generated/model/resExcelUploadReceivedFilename.ts b/negodata/front/src/api/generated/model/quotationCardDataCondition.ts similarity index 67% rename from negodata/front/src/api/generated/model/resExcelUploadReceivedFilename.ts rename to negodata/front/src/api/generated/model/quotationCardDataCondition.ts index fc1e124..7671935 100644 --- a/negodata/front/src/api/generated/model/resExcelUploadReceivedFilename.ts +++ b/negodata/front/src/api/generated/model/quotationCardDataCondition.ts @@ -5,4 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export type ResExcelUploadReceivedFilename = string | null; +export type QuotationCardDataCondition = string | null; diff --git a/negodata/front/src/api/generated/model/bodyUploadSuppliersExcelV1SupplierUploadExcelPost.ts b/negodata/front/src/api/generated/model/quotationCardDataEditScript.ts similarity index 58% rename from negodata/front/src/api/generated/model/bodyUploadSuppliersExcelV1SupplierUploadExcelPost.ts rename to negodata/front/src/api/generated/model/quotationCardDataEditScript.ts index 71b565d..0b3bf30 100644 --- a/negodata/front/src/api/generated/model/bodyUploadSuppliersExcelV1SupplierUploadExcelPost.ts +++ b/negodata/front/src/api/generated/model/quotationCardDataEditScript.ts @@ -5,6 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export interface BodyUploadSuppliersExcelV1SupplierUploadExcelPost { - file: string; -} +export type QuotationCardDataEditScript = unknown | null; diff --git a/negodata/front/src/api/generated/model/quotationCardDataMemo.ts b/negodata/front/src/api/generated/model/quotationCardDataMemo.ts new file mode 100644 index 0000000..eec65fd --- /dev/null +++ b/negodata/front/src/api/generated/model/quotationCardDataMemo.ts @@ -0,0 +1,8 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * Negodata Api Server + * OpenAPI spec version: 0.1.0 + */ + +export type QuotationCardDataMemo = string | null; diff --git a/negodata/front/src/api/generated/model/quotationCardDataNumber.ts b/negodata/front/src/api/generated/model/quotationCardDataNumber.ts new file mode 100644 index 0000000..cd952c0 --- /dev/null +++ b/negodata/front/src/api/generated/model/quotationCardDataNumber.ts @@ -0,0 +1,8 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * Negodata Api Server + * OpenAPI spec version: 0.1.0 + */ + +export type QuotationCardDataNumber = string | null; diff --git a/negodata/front/src/api/generated/model/quotationData.ts b/negodata/front/src/api/generated/model/quotationData.ts index c92cc9f..352b170 100644 --- a/negodata/front/src/api/generated/model/quotationData.ts +++ b/negodata/front/src/api/generated/model/quotationData.ts @@ -4,17 +4,17 @@ * 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"; +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; @@ -38,6 +38,7 @@ export interface QuotationData { preferred_sp_name?: QuotationDataPreferredSpName; equal_bid_yn?: QuotationDataEqualBidYn; equal_bid_data?: QuotationDataEqualBidData; + participation_count?: number; created_at?: QuotationDataCreatedAt; updated_at?: QuotationDataUpdatedAt; } diff --git a/negodata/front/src/api/generated/model/quotationSettingData.ts b/negodata/front/src/api/generated/model/quotationSettingData.ts index 0702bd0..8c49ff9 100644 --- a/negodata/front/src/api/generated/model/quotationSettingData.ts +++ b/negodata/front/src/api/generated/model/quotationSettingData.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { QuotationSettingDataUserId } from "./quotationSettingDataUserId"; -import type { QuotationSettingDataCreatedAt } from "./quotationSettingDataCreatedAt"; -import type { QuotationSettingDataUpdatedAt } from "./quotationSettingDataUpdatedAt"; +import type { QuotationSettingDataUserId } from './quotationSettingDataUserId'; +import type { QuotationSettingDataCreatedAt } from './quotationSettingDataCreatedAt'; +import type { QuotationSettingDataUpdatedAt } from './quotationSettingDataUpdatedAt'; export interface QuotationSettingData { qt_setting_id: string; diff --git a/negodata/front/src/api/generated/model/reqCreateCard.ts b/negodata/front/src/api/generated/model/reqCreateCard.ts index b67c791..30a465b 100644 --- a/negodata/front/src/api/generated/model/reqCreateCard.ts +++ b/negodata/front/src/api/generated/model/reqCreateCard.ts @@ -4,12 +4,12 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ReqCreateCardName } from "./reqCreateCardName"; -import type { ReqCreateCardNumber } from "./reqCreateCardNumber"; -import type { ReqCreateCardScript } from "./reqCreateCardScript"; -import type { ReqCreateCardEditScript } from "./reqCreateCardEditScript"; -import type { ReqCreateCardCondition } from "./reqCreateCardCondition"; -import type { ReqCreateCardMemo } from "./reqCreateCardMemo"; +import type { ReqCreateCardName } from './reqCreateCardName'; +import type { ReqCreateCardNumber } from './reqCreateCardNumber'; +import type { ReqCreateCardScript } from './reqCreateCardScript'; +import type { ReqCreateCardEditScript } from './reqCreateCardEditScript'; +import type { ReqCreateCardCondition } from './reqCreateCardCondition'; +import type { ReqCreateCardMemo } from './reqCreateCardMemo'; export interface ReqCreateCard { is_wildcard?: boolean; diff --git a/negodata/front/src/api/generated/model/reqCreateItem.ts b/negodata/front/src/api/generated/model/reqCreateItem.ts index ef938ed..ccfb89a 100644 --- a/negodata/front/src/api/generated/model/reqCreateItem.ts +++ b/negodata/front/src/api/generated/model/reqCreateItem.ts @@ -4,20 +4,20 @@ * 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"; +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; diff --git a/negodata/front/src/api/generated/model/reqCreateQuotation.ts b/negodata/front/src/api/generated/model/reqCreateQuotation.ts index eff6965..ae61c38 100644 --- a/negodata/front/src/api/generated/model/reqCreateQuotation.ts +++ b/negodata/front/src/api/generated/model/reqCreateQuotation.ts @@ -4,10 +4,10 @@ * 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"; +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; diff --git a/negodata/front/src/api/generated/model/reqCreateSupplier.ts b/negodata/front/src/api/generated/model/reqCreateSupplier.ts index 422d86d..9333986 100644 --- a/negodata/front/src/api/generated/model/reqCreateSupplier.ts +++ b/negodata/front/src/api/generated/model/reqCreateSupplier.ts @@ -4,11 +4,11 @@ * 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"; +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; diff --git a/negodata/front/src/api/generated/model/reqUpdateCard.ts b/negodata/front/src/api/generated/model/reqUpdateCard.ts index 18b397e..470eb5c 100644 --- a/negodata/front/src/api/generated/model/reqUpdateCard.ts +++ b/negodata/front/src/api/generated/model/reqUpdateCard.ts @@ -4,13 +4,13 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ReqUpdateCardName } from "./reqUpdateCardName"; -import type { ReqUpdateCardNumber } from "./reqUpdateCardNumber"; -import type { ReqUpdateCardScript } from "./reqUpdateCardScript"; -import type { ReqUpdateCardEditScript } from "./reqUpdateCardEditScript"; -import type { ReqUpdateCardStatus } from "./reqUpdateCardStatus"; -import type { ReqUpdateCardCondition } from "./reqUpdateCardCondition"; -import type { ReqUpdateCardMemo } from "./reqUpdateCardMemo"; +import type { ReqUpdateCardName } from './reqUpdateCardName'; +import type { ReqUpdateCardNumber } from './reqUpdateCardNumber'; +import type { ReqUpdateCardScript } from './reqUpdateCardScript'; +import type { ReqUpdateCardEditScript } from './reqUpdateCardEditScript'; +import type { ReqUpdateCardStatus } from './reqUpdateCardStatus'; +import type { ReqUpdateCardCondition } from './reqUpdateCardCondition'; +import type { ReqUpdateCardMemo } from './reqUpdateCardMemo'; export interface ReqUpdateCard { name?: ReqUpdateCardName; diff --git a/negodata/front/src/api/generated/model/reqUpdateItem.ts b/negodata/front/src/api/generated/model/reqUpdateItem.ts index 624ea3d..b295929 100644 --- a/negodata/front/src/api/generated/model/reqUpdateItem.ts +++ b/negodata/front/src/api/generated/model/reqUpdateItem.ts @@ -4,23 +4,23 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ReqUpdateItemName } from "./reqUpdateItemName"; -import type { ReqUpdateItemCode } from "./reqUpdateItemCode"; -import type { ReqUpdateItemCategory } from "./reqUpdateItemCategory"; -import type { ReqUpdateItemCategoryType } from "./reqUpdateItemCategoryType"; -import type { ReqUpdateItemImageUrl } from "./reqUpdateItemImageUrl"; -import type { ReqUpdateItemModelName } from "./reqUpdateItemModelName"; -import type { ReqUpdateItemSpec } from "./reqUpdateItemSpec"; -import type { ReqUpdateItemManufacturer } from "./reqUpdateItemManufacturer"; -import type { ReqUpdateItemMadeIn } from "./reqUpdateItemMadeIn"; -import type { ReqUpdateItemPrice } from "./reqUpdateItemPrice"; -import type { ReqUpdateItemInternetLowestPriceYn } from "./reqUpdateItemInternetLowestPriceYn"; -import type { ReqUpdateItemMoq } from "./reqUpdateItemMoq"; -import type { ReqUpdateItemLeadTime } from "./reqUpdateItemLeadTime"; -import type { ReqUpdateItemQuantityUnit } from "./reqUpdateItemQuantityUnit"; -import type { ReqUpdateItemDeliveryType } from "./reqUpdateItemDeliveryType"; -import type { ReqUpdateItemVatYn } from "./reqUpdateItemVatYn"; -import type { ReqUpdateItemDeliveryFeeYn } from "./reqUpdateItemDeliveryFeeYn"; +import type { ReqUpdateItemName } from './reqUpdateItemName'; +import type { ReqUpdateItemCode } from './reqUpdateItemCode'; +import type { ReqUpdateItemCategory } from './reqUpdateItemCategory'; +import type { ReqUpdateItemCategoryType } from './reqUpdateItemCategoryType'; +import type { ReqUpdateItemImageUrl } from './reqUpdateItemImageUrl'; +import type { ReqUpdateItemModelName } from './reqUpdateItemModelName'; +import type { ReqUpdateItemSpec } from './reqUpdateItemSpec'; +import type { ReqUpdateItemManufacturer } from './reqUpdateItemManufacturer'; +import type { ReqUpdateItemMadeIn } from './reqUpdateItemMadeIn'; +import type { ReqUpdateItemPrice } from './reqUpdateItemPrice'; +import type { ReqUpdateItemInternetLowestPriceYn } from './reqUpdateItemInternetLowestPriceYn'; +import type { ReqUpdateItemMoq } from './reqUpdateItemMoq'; +import type { ReqUpdateItemLeadTime } from './reqUpdateItemLeadTime'; +import type { ReqUpdateItemQuantityUnit } from './reqUpdateItemQuantityUnit'; +import type { ReqUpdateItemDeliveryType } from './reqUpdateItemDeliveryType'; +import type { ReqUpdateItemVatYn } from './reqUpdateItemVatYn'; +import type { ReqUpdateItemDeliveryFeeYn } from './reqUpdateItemDeliveryFeeYn'; export interface ReqUpdateItem { name?: ReqUpdateItemName; diff --git a/negodata/front/src/api/generated/model/reqUpdateQuotationSetting.ts b/negodata/front/src/api/generated/model/reqUpdateQuotationSetting.ts index 5e12656..857bcd5 100644 --- a/negodata/front/src/api/generated/model/reqUpdateQuotationSetting.ts +++ b/negodata/front/src/api/generated/model/reqUpdateQuotationSetting.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ReqUpdateQuotationSettingTargetMarginRate } from "./reqUpdateQuotationSettingTargetMarginRate"; -import type { ReqUpdateQuotationSettingAnchoringValue } from "./reqUpdateQuotationSettingAnchoringValue"; -import type { ReqUpdateQuotationSettingCardCount } from "./reqUpdateQuotationSettingCardCount"; +import type { ReqUpdateQuotationSettingTargetMarginRate } from './reqUpdateQuotationSettingTargetMarginRate'; +import type { ReqUpdateQuotationSettingAnchoringValue } from './reqUpdateQuotationSettingAnchoringValue'; +import type { ReqUpdateQuotationSettingCardCount } from './reqUpdateQuotationSettingCardCount'; export interface ReqUpdateQuotationSetting { target_margin_rate?: ReqUpdateQuotationSettingTargetMarginRate; diff --git a/negodata/front/src/api/generated/model/reqUpdateSupplier.ts b/negodata/front/src/api/generated/model/reqUpdateSupplier.ts index d82069b..952c2ca 100644 --- a/negodata/front/src/api/generated/model/reqUpdateSupplier.ts +++ b/negodata/front/src/api/generated/model/reqUpdateSupplier.ts @@ -4,12 +4,12 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ReqUpdateSupplierName } from "./reqUpdateSupplierName"; -import type { ReqUpdateSupplierCode } from "./reqUpdateSupplierCode"; -import type { ReqUpdateSupplierManagerName } from "./reqUpdateSupplierManagerName"; -import type { ReqUpdateSupplierManagerEmail } from "./reqUpdateSupplierManagerEmail"; -import type { ReqUpdateSupplierManagerContactNumber } from "./reqUpdateSupplierManagerContactNumber"; -import type { ReqUpdateSupplierPriority } from "./reqUpdateSupplierPriority"; +import type { ReqUpdateSupplierName } from './reqUpdateSupplierName'; +import type { ReqUpdateSupplierCode } from './reqUpdateSupplierCode'; +import type { ReqUpdateSupplierManagerName } from './reqUpdateSupplierManagerName'; +import type { ReqUpdateSupplierManagerEmail } from './reqUpdateSupplierManagerEmail'; +import type { ReqUpdateSupplierManagerContactNumber } from './reqUpdateSupplierManagerContactNumber'; +import type { ReqUpdateSupplierPriority } from './reqUpdateSupplierPriority'; export interface ReqUpdateSupplier { name?: ReqUpdateSupplierName; diff --git a/negodata/front/src/api/generated/model/resCard.ts b/negodata/front/src/api/generated/model/resCard.ts index 8ed8f0e..5aacf46 100644 --- a/negodata/front/src/api/generated/model/resCard.ts +++ b/negodata/front/src/api/generated/model/resCard.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResCardMsg } from "./resCardMsg"; -import type { ResCardCard } from "./resCardCard"; +import type { ErrorInfo } from './errorInfo'; +import type { ResCardMsg } from './resCardMsg'; +import type { ResCardCard } from './resCardCard'; export interface ResCard { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resCardCard.ts b/negodata/front/src/api/generated/model/resCardCard.ts index 40bd3c8..5d8bccd 100644 --- a/negodata/front/src/api/generated/model/resCardCard.ts +++ b/negodata/front/src/api/generated/model/resCardCard.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { CardData } from "./cardData"; +import type { CardData } from './cardData'; export type ResCardCard = CardData | null; diff --git a/negodata/front/src/api/generated/model/resCardList.ts b/negodata/front/src/api/generated/model/resCardList.ts index cff383b..93f380a 100644 --- a/negodata/front/src/api/generated/model/resCardList.ts +++ b/negodata/front/src/api/generated/model/resCardList.ts @@ -4,15 +4,15 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResCardListMsg } from "./resCardListMsg"; -import type { CardData } from "./cardData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResCardListMsg } from './resCardListMsg'; +import type { CardData } from './cardData'; export interface ResCardList { result?: ErrorInfo; msg?: ResCardListMsg; - cards?: CardData[]; total?: number; page?: number; size?: number; + cards?: CardData[]; } diff --git a/negodata/front/src/api/generated/model/resCheckCodes.ts b/negodata/front/src/api/generated/model/resCheckCodes.ts index 0d79010..9edb34e 100644 --- a/negodata/front/src/api/generated/model/resCheckCodes.ts +++ b/negodata/front/src/api/generated/model/resCheckCodes.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResCheckCodesMsg } from "./resCheckCodesMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResCheckCodesMsg } from './resCheckCodesMsg'; export interface ResCheckCodes { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resCreateAccount.ts b/negodata/front/src/api/generated/model/resCreateAccount.ts index 83686e2..527ebe5 100644 --- a/negodata/front/src/api/generated/model/resCreateAccount.ts +++ b/negodata/front/src/api/generated/model/resCreateAccount.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResCreateAccountMsg } from "./resCreateAccountMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResCreateAccountMsg } from './resCreateAccountMsg'; export interface ResCreateAccount { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resCreateQuotation.ts b/negodata/front/src/api/generated/model/resCreateQuotation.ts index dfe710c..0ee05cb 100644 --- a/negodata/front/src/api/generated/model/resCreateQuotation.ts +++ b/negodata/front/src/api/generated/model/resCreateQuotation.ts @@ -4,10 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResCreateQuotationMsg } from "./resCreateQuotationMsg"; -import type { ResCreateQuotationQuotation } from "./resCreateQuotationQuotation"; -import type { ResCreateQuotationAsyncJob } from "./resCreateQuotationAsyncJob"; +import type { ErrorInfo } from './errorInfo'; +import type { ResCreateQuotationMsg } from './resCreateQuotationMsg'; +import type { ResCreateQuotationQuotation } from './resCreateQuotationQuotation'; +import type { ResCreateQuotationAsyncJob } from './resCreateQuotationAsyncJob'; export interface ResCreateQuotation { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resCreateQuotationAsyncJob.ts b/negodata/front/src/api/generated/model/resCreateQuotationAsyncJob.ts index 0a4121e..bc335b0 100644 --- a/negodata/front/src/api/generated/model/resCreateQuotationAsyncJob.ts +++ b/negodata/front/src/api/generated/model/resCreateQuotationAsyncJob.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { AsyncJob } from "./asyncJob"; +import type { AsyncJob } from './asyncJob'; export type ResCreateQuotationAsyncJob = AsyncJob | null; diff --git a/negodata/front/src/api/generated/model/resCreateQuotationQuotation.ts b/negodata/front/src/api/generated/model/resCreateQuotationQuotation.ts index 4f2feba..ce4e28f 100644 --- a/negodata/front/src/api/generated/model/resCreateQuotationQuotation.ts +++ b/negodata/front/src/api/generated/model/resCreateQuotationQuotation.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { QuotationData } from "./quotationData"; +import type { QuotationData } from './quotationData'; export type ResCreateQuotationQuotation = QuotationData | null; diff --git a/negodata/front/src/api/generated/model/resDeleteCard.ts b/negodata/front/src/api/generated/model/resDeleteCard.ts index c95d877..f7a52b1 100644 --- a/negodata/front/src/api/generated/model/resDeleteCard.ts +++ b/negodata/front/src/api/generated/model/resDeleteCard.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResDeleteCardMsg } from "./resDeleteCardMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResDeleteCardMsg } from './resDeleteCardMsg'; export interface ResDeleteCard { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resDeleteItem.ts b/negodata/front/src/api/generated/model/resDeleteItem.ts index c2e05a7..48d9c60 100644 --- a/negodata/front/src/api/generated/model/resDeleteItem.ts +++ b/negodata/front/src/api/generated/model/resDeleteItem.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResDeleteItemMsg } from "./resDeleteItemMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResDeleteItemMsg } from './resDeleteItemMsg'; export interface ResDeleteItem { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resDeleteQuotation.ts b/negodata/front/src/api/generated/model/resDeleteQuotation.ts index 79d44bd..d5fa41b 100644 --- a/negodata/front/src/api/generated/model/resDeleteQuotation.ts +++ b/negodata/front/src/api/generated/model/resDeleteQuotation.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResDeleteQuotationMsg } from "./resDeleteQuotationMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResDeleteQuotationMsg } from './resDeleteQuotationMsg'; export interface ResDeleteQuotation { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resDeleteQuotationSetting.ts b/negodata/front/src/api/generated/model/resDeleteQuotationSetting.ts index 5a3da11..4b697e9 100644 --- a/negodata/front/src/api/generated/model/resDeleteQuotationSetting.ts +++ b/negodata/front/src/api/generated/model/resDeleteQuotationSetting.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResDeleteQuotationSettingMsg } from "./resDeleteQuotationSettingMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResDeleteQuotationSettingMsg } from './resDeleteQuotationSettingMsg'; export interface ResDeleteQuotationSetting { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resDeleteSupplier.ts b/negodata/front/src/api/generated/model/resDeleteSupplier.ts index f2bec9f..bb9a368 100644 --- a/negodata/front/src/api/generated/model/resDeleteSupplier.ts +++ b/negodata/front/src/api/generated/model/resDeleteSupplier.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResDeleteSupplierMsg } from "./resDeleteSupplierMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResDeleteSupplierMsg } from './resDeleteSupplierMsg'; export interface ResDeleteSupplier { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resEnums.ts b/negodata/front/src/api/generated/model/resEnums.ts index 47afe1c..e234dec 100644 --- a/negodata/front/src/api/generated/model/resEnums.ts +++ b/negodata/front/src/api/generated/model/resEnums.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResEnumsMsg } from "./resEnumsMsg"; -import type { ResEnumsEnums } from "./resEnumsEnums"; +import type { ErrorInfo } from './errorInfo'; +import type { ResEnumsMsg } from './resEnumsMsg'; +import type { ResEnumsEnums } from './resEnumsEnums'; export interface ResEnums { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resEnumsEnums.ts b/negodata/front/src/api/generated/model/resEnumsEnums.ts index bfd4e6a..2afe996 100644 --- a/negodata/front/src/api/generated/model/resEnumsEnums.ts +++ b/negodata/front/src/api/generated/model/resEnumsEnums.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { EnumOption } from "./enumOption"; +import type { EnumOption } from './enumOption'; -export type ResEnumsEnums = { [key: string]: EnumOption[] }; +export type ResEnumsEnums = {[key: string]: EnumOption[]}; diff --git a/negodata/front/src/api/generated/model/resExcelUpload.ts b/negodata/front/src/api/generated/model/resExcelUpload.ts deleted file mode 100644 index 9b4ee64..0000000 --- a/negodata/front/src/api/generated/model/resExcelUpload.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.21.0 🍺 - * Do not edit manually. - * Negodata Api Server - * OpenAPI spec version: 0.1.0 - */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResExcelUploadMsg } from "./resExcelUploadMsg"; -import type { ResExcelUploadReceivedFilename } from "./resExcelUploadReceivedFilename"; - -export interface ResExcelUpload { - result?: ErrorInfo; - msg?: ResExcelUploadMsg; - received_filename?: ResExcelUploadReceivedFilename; - status?: string; - message?: string; -} diff --git a/negodata/front/src/api/generated/model/resItem.ts b/negodata/front/src/api/generated/model/resItem.ts index 891b036..8c2f5f3 100644 --- a/negodata/front/src/api/generated/model/resItem.ts +++ b/negodata/front/src/api/generated/model/resItem.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResItemMsg } from "./resItemMsg"; -import type { ResItemItem } from "./resItemItem"; +import type { ErrorInfo } from './errorInfo'; +import type { ResItemMsg } from './resItemMsg'; +import type { ResItemItem } from './resItemItem'; export interface ResItem { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resItemCategories.ts b/negodata/front/src/api/generated/model/resItemCategories.ts index 367dca0..6585067 100644 --- a/negodata/front/src/api/generated/model/resItemCategories.ts +++ b/negodata/front/src/api/generated/model/resItemCategories.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResItemCategoriesMsg } from "./resItemCategoriesMsg"; -import type { ItemCategory } from "./itemCategory"; +import type { ErrorInfo } from './errorInfo'; +import type { ResItemCategoriesMsg } from './resItemCategoriesMsg'; +import type { ItemCategory } from './itemCategory'; export interface ResItemCategories { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resItemImage.ts b/negodata/front/src/api/generated/model/resItemImage.ts new file mode 100644 index 0000000..4646837 --- /dev/null +++ b/negodata/front/src/api/generated/model/resItemImage.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * Negodata Api Server + * OpenAPI spec version: 0.1.0 + */ +import type { ErrorInfo } from './errorInfo'; +import type { ResItemImageMsg } from './resItemImageMsg'; +import type { ResItemImageImageUrl } from './resItemImageImageUrl'; +import type { ResItemImageFilename } from './resItemImageFilename'; +import type { ResItemImageSize } from './resItemImageSize'; + +export interface ResItemImage { + result?: ErrorInfo; + msg?: ResItemImageMsg; + image_url?: ResItemImageImageUrl; + filename?: ResItemImageFilename; + size?: ResItemImageSize; +} diff --git a/negodata/front/src/api/generated/model/resItemImageFilename.ts b/negodata/front/src/api/generated/model/resItemImageFilename.ts new file mode 100644 index 0000000..a4428f2 --- /dev/null +++ b/negodata/front/src/api/generated/model/resItemImageFilename.ts @@ -0,0 +1,8 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * Negodata Api Server + * OpenAPI spec version: 0.1.0 + */ + +export type ResItemImageFilename = string | null; diff --git a/negodata/front/src/api/generated/model/resItemImageImageUrl.ts b/negodata/front/src/api/generated/model/resItemImageImageUrl.ts new file mode 100644 index 0000000..fe80f94 --- /dev/null +++ b/negodata/front/src/api/generated/model/resItemImageImageUrl.ts @@ -0,0 +1,8 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * Negodata Api Server + * OpenAPI spec version: 0.1.0 + */ + +export type ResItemImageImageUrl = string | null; diff --git a/negodata/front/src/api/generated/model/resExcelUploadMsg.ts b/negodata/front/src/api/generated/model/resItemImageMsg.ts similarity index 72% rename from negodata/front/src/api/generated/model/resExcelUploadMsg.ts rename to negodata/front/src/api/generated/model/resItemImageMsg.ts index c53a0a3..2d9e299 100644 --- a/negodata/front/src/api/generated/model/resExcelUploadMsg.ts +++ b/negodata/front/src/api/generated/model/resItemImageMsg.ts @@ -5,4 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export type ResExcelUploadMsg = string | null; +export type ResItemImageMsg = string | null; diff --git a/negodata/front/src/api/generated/model/resItemImageSize.ts b/negodata/front/src/api/generated/model/resItemImageSize.ts new file mode 100644 index 0000000..e2ba821 --- /dev/null +++ b/negodata/front/src/api/generated/model/resItemImageSize.ts @@ -0,0 +1,8 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * Negodata Api Server + * OpenAPI spec version: 0.1.0 + */ + +export type ResItemImageSize = number | null; diff --git a/negodata/front/src/api/generated/model/resItemItem.ts b/negodata/front/src/api/generated/model/resItemItem.ts index 60199fd..ca1c319 100644 --- a/negodata/front/src/api/generated/model/resItemItem.ts +++ b/negodata/front/src/api/generated/model/resItemItem.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ItemData } from "./itemData"; +import type { ItemData } from './itemData'; export type ResItemItem = ItemData | null; diff --git a/negodata/front/src/api/generated/model/resItemList.ts b/negodata/front/src/api/generated/model/resItemList.ts index 72d6d3c..4c77c69 100644 --- a/negodata/front/src/api/generated/model/resItemList.ts +++ b/negodata/front/src/api/generated/model/resItemList.ts @@ -4,15 +4,15 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResItemListMsg } from "./resItemListMsg"; -import type { ItemData } from "./itemData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResItemListMsg } from './resItemListMsg'; +import type { ItemData } from './itemData'; export interface ResItemList { result?: ErrorInfo; msg?: ResItemListMsg; - items?: ItemData[]; total?: number; page?: number; size?: number; + items?: ItemData[]; } diff --git a/negodata/front/src/api/generated/model/resLogin.ts b/negodata/front/src/api/generated/model/resLogin.ts index 0bf9059..7b58071 100644 --- a/negodata/front/src/api/generated/model/resLogin.ts +++ b/negodata/front/src/api/generated/model/resLogin.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResLoginMsg } from "./resLoginMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResLoginMsg } from './resLoginMsg'; export interface ResLogin { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resLowestPriceResult.ts b/negodata/front/src/api/generated/model/resLowestPriceResult.ts index cf26df8..494eb35 100644 --- a/negodata/front/src/api/generated/model/resLowestPriceResult.ts +++ b/negodata/front/src/api/generated/model/resLowestPriceResult.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResLowestPriceResultMsg } from "./resLowestPriceResultMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResLowestPriceResultMsg } from './resLowestPriceResultMsg'; export interface ResLowestPriceResult { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resLowestPriceTrigger.ts b/negodata/front/src/api/generated/model/resLowestPriceTrigger.ts index 4e625e3..1f7f7bd 100644 --- a/negodata/front/src/api/generated/model/resLowestPriceTrigger.ts +++ b/negodata/front/src/api/generated/model/resLowestPriceTrigger.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResLowestPriceTriggerMsg } from "./resLowestPriceTriggerMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResLowestPriceTriggerMsg } from './resLowestPriceTriggerMsg'; export interface ResLowestPriceTrigger { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resMe.ts b/negodata/front/src/api/generated/model/resMe.ts index aef9374..291260f 100644 --- a/negodata/front/src/api/generated/model/resMe.ts +++ b/negodata/front/src/api/generated/model/resMe.ts @@ -4,12 +4,12 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResMeMsg } from "./resMeMsg"; -import type { ResMeName } from "./resMeName"; -import type { ResMeEmail } from "./resMeEmail"; -import type { ResMeContactNumber } from "./resMeContactNumber"; -import type { ResMeCompany } from "./resMeCompany"; +import type { ErrorInfo } from './errorInfo'; +import type { ResMeMsg } from './resMeMsg'; +import type { ResMeName } from './resMeName'; +import type { ResMeEmail } from './resMeEmail'; +import type { ResMeContactNumber } from './resMeContactNumber'; +import type { ResMeCompany } from './resMeCompany'; export interface ResMe { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resMeCompany.ts b/negodata/front/src/api/generated/model/resMeCompany.ts index 2270cb1..8c51cf3 100644 --- a/negodata/front/src/api/generated/model/resMeCompany.ts +++ b/negodata/front/src/api/generated/model/resMeCompany.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { CompanyData } from "./companyData"; +import type { CompanyData } from './companyData'; export type ResMeCompany = CompanyData | null; diff --git a/negodata/front/src/api/generated/model/resQuotation.ts b/negodata/front/src/api/generated/model/resQuotation.ts index 86dbfee..279f652 100644 --- a/negodata/front/src/api/generated/model/resQuotation.ts +++ b/negodata/front/src/api/generated/model/resQuotation.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationMsg } from "./resQuotationMsg"; -import type { ResQuotationQuotation } from "./resQuotationQuotation"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationMsg } from './resQuotationMsg'; +import type { ResQuotationQuotation } from './resQuotationQuotation'; export interface ResQuotation { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resQuotationCards.ts b/negodata/front/src/api/generated/model/resQuotationCards.ts index d421e1f..98bd3f2 100644 --- a/negodata/front/src/api/generated/model/resQuotationCards.ts +++ b/negodata/front/src/api/generated/model/resQuotationCards.ts @@ -4,10 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationCardsMsg } from "./resQuotationCardsMsg"; -import type { ResQuotationCardsQtId } from "./resQuotationCardsQtId"; -import type { QuotationCardData } from "./quotationCardData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationCardsMsg } from './resQuotationCardsMsg'; +import type { ResQuotationCardsQtId } from './resQuotationCardsQtId'; +import type { QuotationCardData } from './quotationCardData'; export interface ResQuotationCards { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resQuotationList.ts b/negodata/front/src/api/generated/model/resQuotationList.ts index fb8e61d..ab1aba8 100644 --- a/negodata/front/src/api/generated/model/resQuotationList.ts +++ b/negodata/front/src/api/generated/model/resQuotationList.ts @@ -4,15 +4,15 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationListMsg } from "./resQuotationListMsg"; -import type { QuotationData } from "./quotationData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationListMsg } from './resQuotationListMsg'; +import type { QuotationData } from './quotationData'; export interface ResQuotationList { result?: ErrorInfo; msg?: ResQuotationListMsg; - quotations?: QuotationData[]; total?: number; page?: number; size?: number; + quotations?: QuotationData[]; } diff --git a/negodata/front/src/api/generated/model/resQuotationQuotation.ts b/negodata/front/src/api/generated/model/resQuotationQuotation.ts index ce916a0..a911c41 100644 --- a/negodata/front/src/api/generated/model/resQuotationQuotation.ts +++ b/negodata/front/src/api/generated/model/resQuotationQuotation.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { QuotationData } from "./quotationData"; +import type { QuotationData } from './quotationData'; export type ResQuotationQuotation = QuotationData | null; diff --git a/negodata/front/src/api/generated/model/resQuotationResult.ts b/negodata/front/src/api/generated/model/resQuotationResult.ts index 88197f5..e947b96 100644 --- a/negodata/front/src/api/generated/model/resQuotationResult.ts +++ b/negodata/front/src/api/generated/model/resQuotationResult.ts @@ -4,13 +4,13 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationResultMsg } from "./resQuotationResultMsg"; -import type { ResQuotationResultQtId } from "./resQuotationResultQtId"; -import type { ResQuotationResultWinnerSupplierId } from "./resQuotationResultWinnerSupplierId"; -import type { ResQuotationResultWinnerSupplierName } from "./resQuotationResultWinnerSupplierName"; -import type { ResQuotationResultIsEqualBid } from "./resQuotationResultIsEqualBid"; -import type { ResQuotationResultEqualBidData } from "./resQuotationResultEqualBidData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationResultMsg } from './resQuotationResultMsg'; +import type { ResQuotationResultQtId } from './resQuotationResultQtId'; +import type { ResQuotationResultWinnerSupplierId } from './resQuotationResultWinnerSupplierId'; +import type { ResQuotationResultWinnerSupplierName } from './resQuotationResultWinnerSupplierName'; +import type { ResQuotationResultIsEqualBid } from './resQuotationResultIsEqualBid'; +import type { ResQuotationResultEqualBidData } from './resQuotationResultEqualBidData'; export interface ResQuotationResult { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resQuotationSessions.ts b/negodata/front/src/api/generated/model/resQuotationSessions.ts index 8f8e626..2d260a4 100644 --- a/negodata/front/src/api/generated/model/resQuotationSessions.ts +++ b/negodata/front/src/api/generated/model/resQuotationSessions.ts @@ -4,10 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationSessionsMsg } from "./resQuotationSessionsMsg"; -import type { ResQuotationSessionsQtId } from "./resQuotationSessionsQtId"; -import type { SessionData } from "./sessionData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationSessionsMsg } from './resQuotationSessionsMsg'; +import type { ResQuotationSessionsQtId } from './resQuotationSessionsQtId'; +import type { SessionData } from './sessionData'; export interface ResQuotationSessions { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resQuotationSetting.ts b/negodata/front/src/api/generated/model/resQuotationSetting.ts index 36d363b..4c0d273 100644 --- a/negodata/front/src/api/generated/model/resQuotationSetting.ts +++ b/negodata/front/src/api/generated/model/resQuotationSetting.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationSettingMsg } from "./resQuotationSettingMsg"; -import type { ResQuotationSettingSetting } from "./resQuotationSettingSetting"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationSettingMsg } from './resQuotationSettingMsg'; +import type { ResQuotationSettingSetting } from './resQuotationSettingSetting'; export interface ResQuotationSetting { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resQuotationSettingList.ts b/negodata/front/src/api/generated/model/resQuotationSettingList.ts index d39fa5e..69ad36a 100644 --- a/negodata/front/src/api/generated/model/resQuotationSettingList.ts +++ b/negodata/front/src/api/generated/model/resQuotationSettingList.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationSettingListMsg } from "./resQuotationSettingListMsg"; -import type { QuotationSettingData } from "./quotationSettingData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationSettingListMsg } from './resQuotationSettingListMsg'; +import type { QuotationSettingData } from './quotationSettingData'; export interface ResQuotationSettingList { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resQuotationSettingSetting.ts b/negodata/front/src/api/generated/model/resQuotationSettingSetting.ts index 940e1bf..3fad47c 100644 --- a/negodata/front/src/api/generated/model/resQuotationSettingSetting.ts +++ b/negodata/front/src/api/generated/model/resQuotationSettingSetting.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { QuotationSettingData } from "./quotationSettingData"; +import type { QuotationSettingData } from './quotationSettingData'; export type ResQuotationSettingSetting = QuotationSettingData | null; diff --git a/negodata/front/src/api/generated/model/resQuotationStatus.ts b/negodata/front/src/api/generated/model/resQuotationStatus.ts index 184167c..05d7654 100644 --- a/negodata/front/src/api/generated/model/resQuotationStatus.ts +++ b/negodata/front/src/api/generated/model/resQuotationStatus.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResQuotationStatusMsg } from "./resQuotationStatusMsg"; -import type { ResQuotationStatusQtId } from "./resQuotationStatusQtId"; +import type { ErrorInfo } from './errorInfo'; +import type { ResQuotationStatusMsg } from './resQuotationStatusMsg'; +import type { ResQuotationStatusQtId } from './resQuotationStatusQtId'; export interface ResQuotationStatus { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resRefreshToken.ts b/negodata/front/src/api/generated/model/resRefreshToken.ts index 596e46f..93cafa6 100644 --- a/negodata/front/src/api/generated/model/resRefreshToken.ts +++ b/negodata/front/src/api/generated/model/resRefreshToken.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResRefreshTokenMsg } from "./resRefreshTokenMsg"; +import type { ErrorInfo } from './errorInfo'; +import type { ResRefreshTokenMsg } from './resRefreshTokenMsg'; export interface ResRefreshToken { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resSessionChat.ts b/negodata/front/src/api/generated/model/resSessionChat.ts index 196e024..5f4d4bb 100644 --- a/negodata/front/src/api/generated/model/resSessionChat.ts +++ b/negodata/front/src/api/generated/model/resSessionChat.ts @@ -4,10 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResSessionChatMsg } from "./resSessionChatMsg"; -import type { ResSessionChatSessionId } from "./resSessionChatSessionId"; -import type { ChatMessageData } from "./chatMessageData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResSessionChatMsg } from './resSessionChatMsg'; +import type { ResSessionChatSessionId } from './resSessionChatSessionId'; +import type { ChatMessageData } from './chatMessageData'; export interface ResSessionChat { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resSupplier.ts b/negodata/front/src/api/generated/model/resSupplier.ts index 7929c41..eeb031d 100644 --- a/negodata/front/src/api/generated/model/resSupplier.ts +++ b/negodata/front/src/api/generated/model/resSupplier.ts @@ -4,9 +4,9 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResSupplierMsg } from "./resSupplierMsg"; -import type { ResSupplierSupplier } from "./resSupplierSupplier"; +import type { ErrorInfo } from './errorInfo'; +import type { ResSupplierMsg } from './resSupplierMsg'; +import type { ResSupplierSupplier } from './resSupplierSupplier'; export interface ResSupplier { result?: ErrorInfo; diff --git a/negodata/front/src/api/generated/model/resSupplierList.ts b/negodata/front/src/api/generated/model/resSupplierList.ts index 2eedb2d..0687eab 100644 --- a/negodata/front/src/api/generated/model/resSupplierList.ts +++ b/negodata/front/src/api/generated/model/resSupplierList.ts @@ -4,15 +4,15 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ErrorInfo } from "./errorInfo"; -import type { ResSupplierListMsg } from "./resSupplierListMsg"; -import type { SupplierData } from "./supplierData"; +import type { ErrorInfo } from './errorInfo'; +import type { ResSupplierListMsg } from './resSupplierListMsg'; +import type { SupplierData } from './supplierData'; export interface ResSupplierList { result?: ErrorInfo; msg?: ResSupplierListMsg; - suppliers?: SupplierData[]; total?: number; page?: number; size?: number; + suppliers?: SupplierData[]; } diff --git a/negodata/front/src/api/generated/model/resSupplierSupplier.ts b/negodata/front/src/api/generated/model/resSupplierSupplier.ts index ad7858b..1db6405 100644 --- a/negodata/front/src/api/generated/model/resSupplierSupplier.ts +++ b/negodata/front/src/api/generated/model/resSupplierSupplier.ts @@ -4,6 +4,6 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { SupplierData } from "./supplierData"; +import type { SupplierData } from './supplierData'; export type ResSupplierSupplier = SupplierData | null; diff --git a/negodata/front/src/api/generated/model/sessionData.ts b/negodata/front/src/api/generated/model/sessionData.ts index b234384..2cea16b 100644 --- a/negodata/front/src/api/generated/model/sessionData.ts +++ b/negodata/front/src/api/generated/model/sessionData.ts @@ -4,11 +4,11 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { SessionDataBidPrice } from "./sessionDataBidPrice"; -import type { SessionDataBidAt } from "./sessionDataBidAt"; -import type { SessionDataRejectReason } from "./sessionDataRejectReason"; -import type { SessionDataRejectPrice } from "./sessionDataRejectPrice"; -import type { SessionDataRejectDeliveryType } from "./sessionDataRejectDeliveryType"; +import type { SessionDataBidPrice } from './sessionDataBidPrice'; +import type { SessionDataBidAt } from './sessionDataBidAt'; +import type { SessionDataRejectReason } from './sessionDataRejectReason'; +import type { SessionDataRejectPrice } from './sessionDataRejectPrice'; +import type { SessionDataRejectDeliveryType } from './sessionDataRejectDeliveryType'; export interface SessionData { session_id: string; diff --git a/negodata/front/src/api/generated/model/supplierData.ts b/negodata/front/src/api/generated/model/supplierData.ts index 0b95222..ed9f4ee 100644 --- a/negodata/front/src/api/generated/model/supplierData.ts +++ b/negodata/front/src/api/generated/model/supplierData.ts @@ -4,13 +4,13 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { SupplierDataCode } from "./supplierDataCode"; -import type { SupplierDataManagerName } from "./supplierDataManagerName"; -import type { SupplierDataManagerEmail } from "./supplierDataManagerEmail"; -import type { SupplierDataManagerContactNumber } from "./supplierDataManagerContactNumber"; -import type { SupplierDataPriority } from "./supplierDataPriority"; -import type { SupplierDataCreatedAt } from "./supplierDataCreatedAt"; -import type { SupplierDataUpdatedAt } from "./supplierDataUpdatedAt"; +import type { SupplierDataCode } from './supplierDataCode'; +import type { SupplierDataManagerName } from './supplierDataManagerName'; +import type { SupplierDataManagerEmail } from './supplierDataManagerEmail'; +import type { SupplierDataManagerContactNumber } from './supplierDataManagerContactNumber'; +import type { SupplierDataPriority } from './supplierDataPriority'; +import type { SupplierDataCreatedAt } from './supplierDataCreatedAt'; +import type { SupplierDataUpdatedAt } from './supplierDataUpdatedAt'; export interface SupplierData { supplier_id: string; diff --git a/negodata/front/src/api/generated/model/validationError.ts b/negodata/front/src/api/generated/model/validationError.ts index c4782ec..9bde93a 100644 --- a/negodata/front/src/api/generated/model/validationError.ts +++ b/negodata/front/src/api/generated/model/validationError.ts @@ -4,8 +4,8 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import type { ValidationErrorLocItem } from "./validationErrorLocItem"; -import type { ValidationErrorCtx } from "./validationErrorCtx"; +import type { ValidationErrorLocItem } from './validationErrorLocItem'; +import type { ValidationErrorCtx } from './validationErrorCtx'; export interface ValidationError { loc: ValidationErrorLocItem[]; diff --git a/negodata/front/src/api/generated/quotation-setting/quotation-setting.ts b/negodata/front/src/api/generated/quotation-setting/quotation-setting.ts index 7ae9557..6f7cb48 100644 --- a/negodata/front/src/api/generated/quotation-setting/quotation-setting.ts +++ b/negodata/front/src/api/generated/quotation-setting/quotation-setting.ts @@ -4,7 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useMutation, useQuery } from "@tanstack/react-query"; +import { + useMutation, + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -17,8 +20,8 @@ import type { UseMutationOptions, UseMutationResult, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; import type { HTTPValidationError, @@ -26,383 +29,295 @@ import type { ReqUpdateQuotationSetting, ResDeleteQuotationSetting, ResQuotationSetting, - ResQuotationSettingList, -} from ".././model"; + ResQuotationSettingList +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary 견적 설정 목록 */ -export const listSettings = (signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation-setting/list`, - method: "GET", - signal, - }); -}; +export const listSettings = ( + + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/quotation-setting/list`, method: 'GET', signal + }, + options); + } + + + export const getListSettingsQueryKey = () => { - return [`/v1/quotation-setting/list`] as const; -}; + return [ + `/v1/quotation-setting/list` + ] as const; + } -export const getListSettingsQueryOptions = < - TData = Awaited>, - TError = void, ->(options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; -}) => { - const { query: queryOptions } = options ?? {}; + +export const getListSettingsQueryOptions = >, TError = void>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { - const queryKey = queryOptions?.queryKey ?? getListSettingsQueryKey(); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction>> = ({ - signal, - }) => listSettings(signal); + const queryKey = queryOptions?.queryKey ?? getListSettingsQueryKey(); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + -export type ListSettingsQueryResult = NonNullable< - Awaited> ->; -export type ListSettingsQueryError = void; + const queryFn: QueryFunction>> = ({ signal }) => listSettings(requestOptions, signal); -export function useListSettings< - TData = Awaited>, - TError = void, ->( - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListSettingsQueryResult = NonNullable>> +export type ListSettingsQueryError = void + + +export function useListSettings>, TError = void>( + options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListSettings< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListSettings>, TError = void>( + options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListSettings< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListSettings>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 견적 설정 목록 */ -export function useListSettings< - TData = Awaited>, - TError = void, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListSettingsQueryOptions(options); +export function useListSettings>, TError = void>( + options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListSettingsQueryOptions(options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 견적 설정 등록 */ export const createSetting = ( - reqCreateQuotationSetting: ReqCreateQuotationSetting, - signal?: AbortSignal, + reqCreateQuotationSetting: ReqCreateQuotationSetting, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/quotation-setting/create`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCreateQuotationSetting, - signal, - }); -}; + + + return customFetch( + {url: `/v1/quotation-setting/create`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: reqCreateQuotationSetting, signal + }, + options); + } + -export const getCreateSettingMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateQuotationSetting }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateQuotationSetting }, - TContext -> => { - const mutationKey = ["createSetting"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCreateQuotationSetting } - > = (props) => { - const { data } = props ?? {}; +export const getCreateSettingMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateQuotationSetting}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCreateQuotationSetting}, TContext> => { - return createSetting(data); - }; +const mutationKey = ['createSetting']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CreateSettingMutationResult = NonNullable< - Awaited> ->; -export type CreateSettingMutationBody = ReqCreateQuotationSetting; -export type CreateSettingMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCreateQuotationSetting}> = (props) => { + const {data} = props ?? {}; + + return createSetting(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CreateSettingMutationResult = NonNullable>> + export type CreateSettingMutationBody = ReqCreateQuotationSetting + export type CreateSettingMutationError = void | HTTPValidationError + + /** * @summary 견적 설정 등록 */ -export const useCreateSetting = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateQuotationSetting }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCreateQuotationSetting }, - TContext -> => { - const mutationOptions = getCreateSettingMutationOptions(options); +export const useCreateSetting = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateQuotationSetting}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCreateQuotationSetting}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getCreateSettingMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 견적 설정 수정 */ export const updateSetting = ( - qtSettingId: string, - reqUpdateQuotationSetting: ReqUpdateQuotationSetting, -) => { - return customFetch({ - url: `/v1/quotation-setting/update/${qtSettingId}`, - method: "PATCH", - headers: { "Content-Type": "application/json" }, - data: reqUpdateQuotationSetting, - }); -}; + qtSettingId: string, + reqUpdateQuotationSetting: ReqUpdateQuotationSetting, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/quotation-setting/update/${qtSettingId}`, method: 'PATCH', + headers: {'Content-Type': 'application/json', }, + data: reqUpdateQuotationSetting + }, + options); + } + -export const getUpdateSettingMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtSettingId: string; data: ReqUpdateQuotationSetting }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { qtSettingId: string; data: ReqUpdateQuotationSetting }, - TContext -> => { - const mutationKey = ["updateSetting"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { qtSettingId: string; data: ReqUpdateQuotationSetting } - > = (props) => { - const { qtSettingId, data } = props ?? {}; +export const getUpdateSettingMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{qtSettingId: string;data: ReqUpdateQuotationSetting}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{qtSettingId: string;data: ReqUpdateQuotationSetting}, TContext> => { - return updateSetting(qtSettingId, data); - }; +const mutationKey = ['updateSetting']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type UpdateSettingMutationResult = NonNullable< - Awaited> ->; -export type UpdateSettingMutationBody = ReqUpdateQuotationSetting; -export type UpdateSettingMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {qtSettingId: string;data: ReqUpdateQuotationSetting}> = (props) => { + const {qtSettingId,data} = props ?? {}; + + return updateSetting(qtSettingId,data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type UpdateSettingMutationResult = NonNullable>> + export type UpdateSettingMutationBody = ReqUpdateQuotationSetting + export type UpdateSettingMutationError = void | HTTPValidationError + + /** * @summary 견적 설정 수정 */ -export const useUpdateSetting = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtSettingId: string; data: ReqUpdateQuotationSetting }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { qtSettingId: string; data: ReqUpdateQuotationSetting }, - TContext -> => { - const mutationOptions = getUpdateSettingMutationOptions(options); +export const useUpdateSetting = (options?: { mutation?:UseMutationOptions>, TError,{qtSettingId: string;data: ReqUpdateQuotationSetting}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {qtSettingId: string;data: ReqUpdateQuotationSetting}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getUpdateSettingMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 견적 설정 삭제 */ -export const deleteSetting = (qtSettingId: string) => { - return customFetch({ - url: `/v1/quotation-setting/delete/${qtSettingId}`, - method: "DELETE", - }); -}; +export const deleteSetting = ( + qtSettingId: string, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/quotation-setting/delete/${qtSettingId}`, method: 'DELETE' + }, + options); + } + -export const getDeleteSettingMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtSettingId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { qtSettingId: string }, - TContext -> => { - const mutationKey = ["deleteSetting"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { qtSettingId: string } - > = (props) => { - const { qtSettingId } = props ?? {}; +export const getDeleteSettingMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{qtSettingId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{qtSettingId: string}, TContext> => { - return deleteSetting(qtSettingId); - }; +const mutationKey = ['deleteSetting']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type DeleteSettingMutationResult = NonNullable< - Awaited> ->; -export type DeleteSettingMutationError = void | HTTPValidationError; + const mutationFn: MutationFunction>, {qtSettingId: string}> = (props) => { + const {qtSettingId} = props ?? {}; -/** + return deleteSetting(qtSettingId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type DeleteSettingMutationResult = NonNullable>> + + export type DeleteSettingMutationError = void | HTTPValidationError + + /** * @summary 견적 설정 삭제 */ -export const useDeleteSetting = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtSettingId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { qtSettingId: string }, - TContext -> => { - const mutationOptions = getDeleteSettingMutationOptions(options); +export const useDeleteSetting = (options?: { mutation?:UseMutationOptions>, TError,{qtSettingId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {qtSettingId: string}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; + const mutationOptions = getDeleteSettingMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + \ No newline at end of file diff --git a/negodata/front/src/api/generated/quotation/quotation.ts b/negodata/front/src/api/generated/quotation/quotation.ts index a3750ba..bdfb53b 100644 --- a/negodata/front/src/api/generated/quotation/quotation.ts +++ b/negodata/front/src/api/generated/quotation/quotation.ts @@ -4,7 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useMutation, useQuery } from "@tanstack/react-query"; +import { + useMutation, + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -17,8 +20,8 @@ import type { UseMutationOptions, UseMutationResult, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; import type { HTTPValidationError, @@ -32,1307 +35,845 @@ import type { ResQuotationResult, ResQuotationSessions, ResQuotationStatus, - ResSessionChat, -} from ".././model"; + ResSessionChat +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary 견적 목록 */ export const listQuotations = ( - params?: ListQuotationsParams, - signal?: AbortSignal, + params?: ListQuotationsParams, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/quotation/list`, - method: "GET", - params, - signal, - }); -}; + + + return customFetch( + {url: `/v1/quotation/list`, method: 'GET', + params, signal + }, + options); + } + -export const getListQuotationsQueryKey = (params?: ListQuotationsParams) => { - return [`/v1/quotation/list`, ...(params ? [params] : [])] as const; -}; -export const getListQuotationsQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListQuotationsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, + +export const getListQuotationsQueryKey = (params?: ListQuotationsParams,) => { + return [ + `/v1/quotation/list`, ...(params ? [params]: []) + ] as const; + } + + +export const getListQuotationsQueryOptions = >, TError = void | HTTPValidationError>(params?: ListQuotationsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} ) => { - const { query: queryOptions } = options ?? {}; - const queryKey = queryOptions?.queryKey ?? getListQuotationsQueryKey(params); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction>> = ({ - signal, - }) => listQuotations(params, signal); + const queryKey = queryOptions?.queryKey ?? getListQuotationsQueryKey(params); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + -export type ListQuotationsQueryResult = NonNullable< - Awaited> ->; -export type ListQuotationsQueryError = void | HTTPValidationError; + const queryFn: QueryFunction>> = ({ signal }) => listQuotations(params, requestOptions, signal); -export function useListQuotations< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params: undefined | ListQuotationsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListQuotationsQueryResult = NonNullable>> +export type ListQuotationsQueryError = void | HTTPValidationError + + +export function useListQuotations>, TError = void | HTTPValidationError>( + params: undefined | ListQuotationsParams, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListQuotations< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListQuotationsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListQuotations>, TError = void | HTTPValidationError>( + params?: ListQuotationsParams, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListQuotations< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListQuotationsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListQuotations>, TError = void | HTTPValidationError>( + params?: ListQuotationsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 견적 목록 */ -export function useListQuotations< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListQuotationsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListQuotationsQueryOptions(params, options); +export function useListQuotations>, TError = void | HTTPValidationError>( + params?: ListQuotationsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListQuotationsQueryOptions(params,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 견적 생성 */ export const createQuotation = ( - reqCreateQuotation: ReqCreateQuotation, - signal?: AbortSignal, + reqCreateQuotation: ReqCreateQuotation, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/quotation/create`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCreateQuotation, - signal, - }); -}; + + + return customFetch( + {url: `/v1/quotation/create`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: reqCreateQuotation, signal + }, + options); + } + -export const getCreateQuotationMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateQuotation }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateQuotation }, - TContext -> => { - const mutationKey = ["createQuotation"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCreateQuotation } - > = (props) => { - const { data } = props ?? {}; +export const getCreateQuotationMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateQuotation}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCreateQuotation}, TContext> => { - return createQuotation(data); - }; +const mutationKey = ['createQuotation']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CreateQuotationMutationResult = NonNullable< - Awaited> ->; -export type CreateQuotationMutationBody = ReqCreateQuotation; -export type CreateQuotationMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCreateQuotation}> = (props) => { + const {data} = props ?? {}; + + return createQuotation(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CreateQuotationMutationResult = NonNullable>> + export type CreateQuotationMutationBody = ReqCreateQuotation + export type CreateQuotationMutationError = void | HTTPValidationError + + /** * @summary 견적 생성 */ -export const useCreateQuotation = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateQuotation }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCreateQuotation }, - TContext -> => { - const mutationOptions = getCreateQuotationMutationOptions(options); +export const useCreateQuotation = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateQuotation}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCreateQuotation}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getCreateQuotationMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 견적 마감 */ -export const stopQuotation = (qtId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/stop/${qtId}`, - method: "POST", - signal, - }); -}; +export const stopQuotation = ( + qtId: string, + options?: SecondParameter,signal?: AbortSignal +) => { + + + return customFetch( + {url: `/v1/quotation/stop/${qtId}`, method: 'POST', signal + }, + options); + } + -export const getStopQuotationMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { qtId: string }, - TContext -> => { - const mutationKey = ["stopQuotation"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { qtId: string } - > = (props) => { - const { qtId } = props ?? {}; +export const getStopQuotationMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{qtId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{qtId: string}, TContext> => { - return stopQuotation(qtId); - }; +const mutationKey = ['stopQuotation']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type StopQuotationMutationResult = NonNullable< - Awaited> ->; -export type StopQuotationMutationError = void | HTTPValidationError; + const mutationFn: MutationFunction>, {qtId: string}> = (props) => { + const {qtId} = props ?? {}; -/** + return stopQuotation(qtId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type StopQuotationMutationResult = NonNullable>> + + export type StopQuotationMutationError = void | HTTPValidationError + + /** * @summary 견적 마감 */ -export const useStopQuotation = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { qtId: string }, - TContext -> => { - const mutationOptions = getStopQuotationMutationOptions(options); +export const useStopQuotation = (options?: { mutation?:UseMutationOptions>, TError,{qtId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {qtId: string}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getStopQuotationMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 견적 상태 조회 */ -export const getQuotationStatus = (qtId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/${qtId}/status`, - method: "GET", - signal, - }); -}; - -export const getGetQuotationStatusQueryKey = (qtId?: string) => { - return [`/v1/quotation/${qtId}/status`] as const; -}; - -export const getGetQuotationStatusQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, +export const getQuotationStatus = ( + qtId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/quotation/${qtId}/status`, method: 'GET', signal + }, + options); + } + - const queryKey = - queryOptions?.queryKey ?? getGetQuotationStatusQueryKey(qtId); - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getQuotationStatus(qtId, signal); - return { - queryKey, - queryFn, - enabled: !!qtId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetQuotationStatusQueryKey = (qtId?: string,) => { + return [ + `/v1/quotation/${qtId}/status` + ] as const; + } -export type GetQuotationStatusQueryResult = NonNullable< - Awaited> ->; -export type GetQuotationStatusQueryError = void | HTTPValidationError; + +export const getGetQuotationStatusQueryOptions = >, TError = void | HTTPValidationError>(qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetQuotationStatus< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetQuotationStatusQueryKey(qtId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getQuotationStatus(qtId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(qtId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetQuotationStatusQueryResult = NonNullable>> +export type GetQuotationStatusQueryError = void | HTTPValidationError + + +export function useGetQuotationStatus>, TError = void | HTTPValidationError>( + qtId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationStatus< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetQuotationStatus>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationStatus< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetQuotationStatus>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 견적 상태 조회 */ -export function useGetQuotationStatus< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetQuotationStatusQueryOptions(qtId, options); +export function useGetQuotationStatus>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetQuotationStatusQueryOptions(qtId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 참여현황 */ -export const getQuotationSessions = (qtId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/${qtId}/sessions`, - method: "GET", - signal, - }); -}; - -export const getGetQuotationSessionsQueryKey = (qtId?: string) => { - return [`/v1/quotation/${qtId}/sessions`] as const; -}; - -export const getGetQuotationSessionsQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, +export const getQuotationSessions = ( + qtId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/quotation/${qtId}/sessions`, method: 'GET', signal + }, + options); + } + - const queryKey = - queryOptions?.queryKey ?? getGetQuotationSessionsQueryKey(qtId); - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getQuotationSessions(qtId, signal); - return { - queryKey, - queryFn, - enabled: !!qtId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetQuotationSessionsQueryKey = (qtId?: string,) => { + return [ + `/v1/quotation/${qtId}/sessions` + ] as const; + } -export type GetQuotationSessionsQueryResult = NonNullable< - Awaited> ->; -export type GetQuotationSessionsQueryError = void | HTTPValidationError; + +export const getGetQuotationSessionsQueryOptions = >, TError = void | HTTPValidationError>(qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetQuotationSessions< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetQuotationSessionsQueryKey(qtId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getQuotationSessions(qtId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(qtId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetQuotationSessionsQueryResult = NonNullable>> +export type GetQuotationSessionsQueryError = void | HTTPValidationError + + +export function useGetQuotationSessions>, TError = void | HTTPValidationError>( + qtId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationSessions< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetQuotationSessions>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationSessions< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetQuotationSessions>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 참여현황 */ -export function useGetQuotationSessions< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetQuotationSessionsQueryOptions(qtId, options); +export function useGetQuotationSessions>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetQuotationSessionsQueryOptions(qtId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 채팅 상세 */ -export const getSessionChat = (sessionId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/session/${sessionId}/chat`, - method: "GET", - signal, - }); -}; - -export const getGetSessionChatQueryKey = (sessionId?: string) => { - return [`/v1/quotation/session/${sessionId}/chat`] as const; -}; - -export const getGetSessionChatQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - sessionId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const getSessionChat = ( + sessionId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/quotation/session/${sessionId}/chat`, method: 'GET', signal + }, + options); + } + - const queryKey = - queryOptions?.queryKey ?? getGetSessionChatQueryKey(sessionId); - const queryFn: QueryFunction>> = ({ - signal, - }) => getSessionChat(sessionId, signal); - return { - queryKey, - queryFn, - enabled: !!sessionId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetSessionChatQueryKey = (sessionId?: string,) => { + return [ + `/v1/quotation/session/${sessionId}/chat` + ] as const; + } -export type GetSessionChatQueryResult = NonNullable< - Awaited> ->; -export type GetSessionChatQueryError = void | HTTPValidationError; + +export const getGetSessionChatQueryOptions = >, TError = void | HTTPValidationError>(sessionId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetSessionChat< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - sessionId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetSessionChatQueryKey(sessionId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getSessionChat(sessionId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(sessionId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetSessionChatQueryResult = NonNullable>> +export type GetSessionChatQueryError = void | HTTPValidationError + + +export function useGetSessionChat>, TError = void | HTTPValidationError>( + sessionId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetSessionChat< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - sessionId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetSessionChat>, TError = void | HTTPValidationError>( + sessionId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetSessionChat< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - sessionId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetSessionChat>, TError = void | HTTPValidationError>( + sessionId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 채팅 상세 */ -export function useGetSessionChat< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - sessionId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetSessionChatQueryOptions(sessionId, options); +export function useGetSessionChat>, TError = void | HTTPValidationError>( + sessionId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetSessionChatQueryOptions(sessionId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 낙찰 결과 */ -export const getQuotationResult = (qtId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/${qtId}/result`, - method: "GET", - signal, - }); -}; - -export const getGetQuotationResultQueryKey = (qtId?: string) => { - return [`/v1/quotation/${qtId}/result`] as const; -}; - -export const getGetQuotationResultQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, +export const getQuotationResult = ( + qtId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/quotation/${qtId}/result`, method: 'GET', signal + }, + options); + } + - const queryKey = - queryOptions?.queryKey ?? getGetQuotationResultQueryKey(qtId); - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getQuotationResult(qtId, signal); - return { - queryKey, - queryFn, - enabled: !!qtId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetQuotationResultQueryKey = (qtId?: string,) => { + return [ + `/v1/quotation/${qtId}/result` + ] as const; + } -export type GetQuotationResultQueryResult = NonNullable< - Awaited> ->; -export type GetQuotationResultQueryError = void | HTTPValidationError; + +export const getGetQuotationResultQueryOptions = >, TError = void | HTTPValidationError>(qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetQuotationResult< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetQuotationResultQueryKey(qtId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getQuotationResult(qtId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(qtId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetQuotationResultQueryResult = NonNullable>> +export type GetQuotationResultQueryError = void | HTTPValidationError + + +export function useGetQuotationResult>, TError = void | HTTPValidationError>( + qtId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationResult< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetQuotationResult>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationResult< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetQuotationResult>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 낙찰 결과 */ -export function useGetQuotationResult< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetQuotationResultQueryOptions(qtId, options); +export function useGetQuotationResult>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetQuotationResultQueryOptions(qtId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 견적 사용 카드 */ -export const getQuotationCards = (qtId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/${qtId}/cards`, - method: "GET", - signal, - }); -}; - -export const getGetQuotationCardsQueryKey = (qtId?: string) => { - return [`/v1/quotation/${qtId}/cards`] as const; -}; - -export const getGetQuotationCardsQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, +export const getQuotationCards = ( + qtId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/quotation/${qtId}/cards`, method: 'GET', signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getGetQuotationCardsQueryKey(qtId); - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getQuotationCards(qtId, signal); - return { - queryKey, - queryFn, - enabled: !!qtId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetQuotationCardsQueryKey = (qtId?: string,) => { + return [ + `/v1/quotation/${qtId}/cards` + ] as const; + } -export type GetQuotationCardsQueryResult = NonNullable< - Awaited> ->; -export type GetQuotationCardsQueryError = void | HTTPValidationError; + +export const getGetQuotationCardsQueryOptions = >, TError = void | HTTPValidationError>(qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetQuotationCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetQuotationCardsQueryKey(qtId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getQuotationCards(qtId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(qtId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetQuotationCardsQueryResult = NonNullable>> +export type GetQuotationCardsQueryError = void | HTTPValidationError + + +export function useGetQuotationCards>, TError = void | HTTPValidationError>( + qtId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetQuotationCards>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotationCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetQuotationCards>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 견적 사용 카드 */ -export function useGetQuotationCards< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetQuotationCardsQueryOptions(qtId, options); +export function useGetQuotationCards>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetQuotationCardsQueryOptions(qtId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } -/** - * @summary 견적 삭제 - */ -export const deleteQuotation = (qtId: string) => { - return customFetch({ - url: `/v1/quotation/delete/${qtId}`, - method: "DELETE", - }); -}; -export const getDeleteQuotationMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { qtId: string }, - TContext -> => { - const mutationKey = ["deleteQuotation"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { qtId: string } - > = (props) => { - const { qtId } = props ?? {}; - - return deleteQuotation(qtId); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DeleteQuotationMutationResult = NonNullable< - Awaited> ->; - -export type DeleteQuotationMutationError = void | HTTPValidationError; /** * @summary 견적 삭제 */ -export const useDeleteQuotation = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { qtId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { qtId: string }, - TContext -> => { - const mutationOptions = getDeleteQuotationMutationOptions(options); +export const deleteQuotation = ( + qtId: string, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/quotation/delete/${qtId}`, method: 'DELETE' + }, + options); + } + - return useMutation(mutationOptions, queryClient); -}; -/** + +export const getDeleteQuotationMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{qtId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{qtId: string}, TContext> => { + +const mutationKey = ['deleteQuotation']; +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>, {qtId: string}> = (props) => { + const {qtId} = props ?? {}; + + return deleteQuotation(qtId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type DeleteQuotationMutationResult = NonNullable>> + + export type DeleteQuotationMutationError = void | HTTPValidationError + + /** + * @summary 견적 삭제 + */ +export const useDeleteQuotation = (options?: { mutation?:UseMutationOptions>, TError,{qtId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {qtId: string}, + TContext + > => { + + const mutationOptions = getDeleteQuotationMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 견적 조회 */ -export const getQuotation = (qtId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/quotation/${qtId}`, - method: "GET", - signal, - }); -}; - -export const getGetQuotationQueryKey = (qtId?: string) => { - return [`/v1/quotation/${qtId}`] as const; -}; - -export const getGetQuotationQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const getQuotation = ( + qtId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/quotation/${qtId}`, method: 'GET', signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getGetQuotationQueryKey(qtId); - const queryFn: QueryFunction>> = ({ - signal, - }) => getQuotation(qtId, signal); - return { - queryKey, - queryFn, - enabled: !!qtId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetQuotationQueryKey = (qtId?: string,) => { + return [ + `/v1/quotation/${qtId}` + ] as const; + } -export type GetQuotationQueryResult = NonNullable< - Awaited> ->; -export type GetQuotationQueryError = void | HTTPValidationError; + +export const getGetQuotationQueryOptions = >, TError = void | HTTPValidationError>(qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetQuotation< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetQuotationQueryKey(qtId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getQuotation(qtId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(qtId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetQuotationQueryResult = NonNullable>> +export type GetQuotationQueryError = void | HTTPValidationError + + +export function useGetQuotation>, TError = void | HTTPValidationError>( + qtId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotation< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetQuotation>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetQuotation< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetQuotation>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 견적 조회 */ -export function useGetQuotation< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - qtId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetQuotationQueryOptions(qtId, options); +export function useGetQuotation>, TError = void | HTTPValidationError>( + qtId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetQuotationQueryOptions(qtId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + + diff --git a/negodata/front/src/api/generated/supplier/supplier.ts b/negodata/front/src/api/generated/supplier/supplier.ts index 98c87eb..b43dbe1 100644 --- a/negodata/front/src/api/generated/supplier/supplier.ts +++ b/negodata/front/src/api/generated/supplier/supplier.ts @@ -4,7 +4,10 @@ * Negodata Api Server * OpenAPI spec version: 0.1.0 */ -import { useMutation, useQuery } from "@tanstack/react-query"; +import { + useMutation, + useQuery +} from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, @@ -17,11 +20,10 @@ import type { UseMutationOptions, UseMutationResult, UseQueryOptions, - UseQueryResult, -} from "@tanstack/react-query"; + UseQueryResult +} from '@tanstack/react-query'; import type { - BodyUploadSuppliersExcelV1SupplierUploadExcelPost, HTTPValidationError, ListSuppliersParams, ReqCheckCodes, @@ -29,712 +31,453 @@ import type { ReqUpdateSupplier, ResCheckCodes, ResDeleteSupplier, - ResExcelUpload, ResSupplier, - ResSupplierList, -} from ".././model"; + ResSupplierList +} from '.././model'; + +import { customFetch } from '../../mutator/custom-fetch'; + + +type SecondParameter unknown> = Parameters[1]; + -import { customFetch } from "../../mutator/custom-fetch"; /** * @summary 협력사 목록 */ export const listSuppliers = ( - params?: ListSuppliersParams, - signal?: AbortSignal, + params?: ListSuppliersParams, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/supplier/list`, - method: "GET", - params, - signal, - }); -}; + + + return customFetch( + {url: `/v1/supplier/list`, method: 'GET', + params, signal + }, + options); + } + -export const getListSuppliersQueryKey = (params?: ListSuppliersParams) => { - return [`/v1/supplier/list`, ...(params ? [params] : [])] as const; -}; -export const getListSuppliersQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListSuppliersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, + +export const getListSuppliersQueryKey = (params?: ListSuppliersParams,) => { + return [ + `/v1/supplier/list`, ...(params ? [params]: []) + ] as const; + } + + +export const getListSuppliersQueryOptions = >, TError = void | HTTPValidationError>(params?: ListSuppliersParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} ) => { - const { query: queryOptions } = options ?? {}; - const queryKey = queryOptions?.queryKey ?? getListSuppliersQueryKey(params); +const {query: queryOptions, request: requestOptions} = options ?? {}; - const queryFn: QueryFunction>> = ({ - signal, - }) => listSuppliers(params, signal); + const queryKey = queryOptions?.queryKey ?? getListSuppliersQueryKey(params); - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; + -export type ListSuppliersQueryResult = NonNullable< - Awaited> ->; -export type ListSuppliersQueryError = void | HTTPValidationError; + const queryFn: QueryFunction>> = ({ signal }) => listSuppliers(params, requestOptions, signal); -export function useListSuppliers< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params: undefined | ListSuppliersParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + + + + + return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type ListSuppliersQueryResult = NonNullable>> +export type ListSuppliersQueryError = void | HTTPValidationError + + +export function useListSuppliers>, TError = void | HTTPValidationError>( + params: undefined | ListSuppliersParams, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useListSuppliers< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListSuppliersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useListSuppliers>, TError = void | HTTPValidationError>( + params?: ListSuppliersParams, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useListSuppliers< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListSuppliersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useListSuppliers>, TError = void | HTTPValidationError>( + params?: ListSuppliersParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 협력사 목록 */ -export function useListSuppliers< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - params?: ListSuppliersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getListSuppliersQueryOptions(params, options); +export function useListSuppliers>, TError = void | HTTPValidationError>( + params?: ListSuppliersParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getListSuppliersQueryOptions(params,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 협력사 등록 */ export const createSupplier = ( - reqCreateSupplier: ReqCreateSupplier, - signal?: AbortSignal, + reqCreateSupplier: ReqCreateSupplier, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/supplier/create`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCreateSupplier, - signal, - }); -}; + + + return customFetch( + {url: `/v1/supplier/create`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: reqCreateSupplier, signal + }, + options); + } + -export const getCreateSupplierMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateSupplier }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateSupplier }, - TContext -> => { - const mutationKey = ["createSupplier"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCreateSupplier } - > = (props) => { - const { data } = props ?? {}; +export const getCreateSupplierMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateSupplier}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCreateSupplier}, TContext> => { - return createSupplier(data); - }; +const mutationKey = ['createSupplier']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CreateSupplierMutationResult = NonNullable< - Awaited> ->; -export type CreateSupplierMutationBody = ReqCreateSupplier; -export type CreateSupplierMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCreateSupplier}> = (props) => { + const {data} = props ?? {}; + + return createSupplier(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CreateSupplierMutationResult = NonNullable>> + export type CreateSupplierMutationBody = ReqCreateSupplier + export type CreateSupplierMutationError = void | HTTPValidationError + + /** * @summary 협력사 등록 */ -export const useCreateSupplier = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCreateSupplier }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCreateSupplier }, - TContext -> => { - const mutationOptions = getCreateSupplierMutationOptions(options); +export const useCreateSupplier = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCreateSupplier}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCreateSupplier}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getCreateSupplierMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 코드 중복 사전검사(업로드 즉시) */ export const checkSupplierCodes = ( - reqCheckCodes: ReqCheckCodes, - signal?: AbortSignal, + reqCheckCodes: ReqCheckCodes, + options?: SecondParameter,signal?: AbortSignal ) => { - return customFetch({ - url: `/v1/supplier/check-codes`, - method: "POST", - headers: { "Content-Type": "application/json" }, - data: reqCheckCodes, - signal, - }); -}; + + + return customFetch( + {url: `/v1/supplier/check-codes`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: reqCheckCodes, signal + }, + options); + } + -export const getCheckSupplierCodesMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext -> => { - const mutationKey = ["checkSupplierCodes"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { data: ReqCheckCodes } - > = (props) => { - const { data } = props ?? {}; +export const getCheckSupplierCodesMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCheckCodes}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{data: ReqCheckCodes}, TContext> => { - return checkSupplierCodes(data); - }; +const mutationKey = ['checkSupplierCodes']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type CheckSupplierCodesMutationResult = NonNullable< - Awaited> ->; -export type CheckSupplierCodesMutationBody = ReqCheckCodes; -export type CheckSupplierCodesMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {data: ReqCheckCodes}> = (props) => { + const {data} = props ?? {}; + + return checkSupplierCodes(data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type CheckSupplierCodesMutationResult = NonNullable>> + export type CheckSupplierCodesMutationBody = ReqCheckCodes + export type CheckSupplierCodesMutationError = void | HTTPValidationError + + /** * @summary 코드 중복 사전검사(업로드 즉시) */ -export const useCheckSupplierCodes = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: ReqCheckCodes }, - TContext -> => { - const mutationOptions = getCheckSupplierCodesMutationOptions(options); +export const useCheckSupplierCodes = (options?: { mutation?:UseMutationOptions>, TError,{data: ReqCheckCodes}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {data: ReqCheckCodes}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** - * @summary 협력사 엑셀 일괄 등록(스텁) - */ -export const uploadSuppliersExcel = ( - bodyUploadSuppliersExcelV1SupplierUploadExcelPost: BodyUploadSuppliersExcelV1SupplierUploadExcelPost, - signal?: AbortSignal, -) => { - const formData = new FormData(); - formData.append( - `file`, - bodyUploadSuppliersExcelV1SupplierUploadExcelPost.file, - ); + const mutationOptions = getCheckSupplierCodesMutationOptions(options); - return customFetch({ - url: `/v1/supplier/upload-excel`, - method: "POST", - headers: { "Content-Type": "multipart/form-data" }, - data: formData, - signal, - }); -}; - -export const getUploadSuppliersExcelMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: BodyUploadSuppliersExcelV1SupplierUploadExcelPost }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: BodyUploadSuppliersExcelV1SupplierUploadExcelPost }, - TContext -> => { - const mutationKey = ["uploadSuppliersExcel"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { data: BodyUploadSuppliersExcelV1SupplierUploadExcelPost } - > = (props) => { - const { data } = props ?? {}; - - return uploadSuppliersExcel(data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UploadSuppliersExcelMutationResult = NonNullable< - Awaited> ->; -export type UploadSuppliersExcelMutationBody = - BodyUploadSuppliersExcelV1SupplierUploadExcelPost; -export type UploadSuppliersExcelMutationError = void | HTTPValidationError; - -/** - * @summary 협력사 엑셀 일괄 등록(스텁) - */ -export const useUploadSuppliersExcel = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: BodyUploadSuppliersExcelV1SupplierUploadExcelPost }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { data: BodyUploadSuppliersExcelV1SupplierUploadExcelPost }, - TContext -> => { - const mutationOptions = getUploadSuppliersExcelMutationOptions(options); - - return useMutation(mutationOptions, queryClient); -}; -/** + return useMutation(mutationOptions, queryClient); + } + /** * @summary 협력사 조회 */ -export const getSupplier = (supplierId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/v1/supplier/${supplierId}`, - method: "GET", - signal, - }); -}; - -export const getGetSupplierQueryKey = (supplierId?: string) => { - return [`/v1/supplier/${supplierId}`] as const; -}; - -export const getGetSupplierQueryOptions = < - TData = Awaited>, - TError = void | HTTPValidationError, ->( - supplierId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, +export const getSupplier = ( + supplierId: string, + options?: SecondParameter,signal?: AbortSignal ) => { - const { query: queryOptions } = options ?? {}; + + + return customFetch( + {url: `/v1/supplier/${supplierId}`, method: 'GET', signal + }, + options); + } + - const queryKey = queryOptions?.queryKey ?? getGetSupplierQueryKey(supplierId); - const queryFn: QueryFunction>> = ({ - signal, - }) => getSupplier(supplierId, signal); - return { - queryKey, - queryFn, - enabled: !!supplierId, - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; +export const getGetSupplierQueryKey = (supplierId?: string,) => { + return [ + `/v1/supplier/${supplierId}` + ] as const; + } -export type GetSupplierQueryResult = NonNullable< - Awaited> ->; -export type GetSupplierQueryError = void | HTTPValidationError; + +export const getGetSupplierQueryOptions = >, TError = void | HTTPValidationError>(supplierId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} +) => { -export function useGetSupplier< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - supplierId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< +const {query: queryOptions, request: requestOptions} = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetSupplierQueryKey(supplierId); + + + + const queryFn: QueryFunction>> = ({ signal }) => getSupplier(supplierId, requestOptions, signal); + + + + + + return { queryKey, queryFn, enabled: !!(supplierId), ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } +} + +export type GetSupplierQueryResult = NonNullable>> +export type GetSupplierQueryError = void | HTTPValidationError + + +export function useGetSupplier>, TError = void | HTTPValidationError>( + supplierId: string, options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): DefinedUseQueryResult & { - queryKey: DataTag; -}; -export function useGetSupplier< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - supplierId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetSupplier>, TError = void | HTTPValidationError>( + supplierId: string, options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> - >, - "initialData" - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; -export function useGetSupplier< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - supplierId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -}; + > , 'initialData' + >, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } +export function useGetSupplier>, TError = void | HTTPValidationError>( + supplierId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } /** * @summary 협력사 조회 */ -export function useGetSupplier< - TData = Awaited>, - TError = void | HTTPValidationError, ->( - supplierId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient, -): UseQueryResult & { - queryKey: DataTag; -} { - const queryOptions = getGetSupplierQueryOptions(supplierId, options); +export function useGetSupplier>, TError = void | HTTPValidationError>( + supplierId: string, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} + , queryClient?: QueryClient + ): UseQueryResult & { queryKey: DataTag } { - const query = useQuery(queryOptions, queryClient) as UseQueryResult< - TData, - TError - > & { queryKey: DataTag }; + const queryOptions = getGetSupplierQueryOptions(supplierId,options) - query.queryKey = queryOptions.queryKey; + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; + + query.queryKey = queryOptions.queryKey ; return query; } + + + /** * @summary 협력사 수정 */ export const updateSupplier = ( - supplierId: string, - reqUpdateSupplier: ReqUpdateSupplier, -) => { - return customFetch({ - url: `/v1/supplier/update/${supplierId}`, - method: "PATCH", - headers: { "Content-Type": "application/json" }, - data: reqUpdateSupplier, - }); -}; + supplierId: string, + reqUpdateSupplier: ReqUpdateSupplier, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/supplier/update/${supplierId}`, method: 'PATCH', + headers: {'Content-Type': 'application/json', }, + data: reqUpdateSupplier + }, + options); + } + -export const getUpdateSupplierMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { supplierId: string; data: ReqUpdateSupplier }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { supplierId: string; data: ReqUpdateSupplier }, - TContext -> => { - const mutationKey = ["updateSupplier"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { supplierId: string; data: ReqUpdateSupplier } - > = (props) => { - const { supplierId, data } = props ?? {}; +export const getUpdateSupplierMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{supplierId: string;data: ReqUpdateSupplier}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{supplierId: string;data: ReqUpdateSupplier}, TContext> => { - return updateSupplier(supplierId, data); - }; +const mutationKey = ['updateSupplier']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type UpdateSupplierMutationResult = NonNullable< - Awaited> ->; -export type UpdateSupplierMutationBody = ReqUpdateSupplier; -export type UpdateSupplierMutationError = void | HTTPValidationError; -/** + const mutationFn: MutationFunction>, {supplierId: string;data: ReqUpdateSupplier}> = (props) => { + const {supplierId,data} = props ?? {}; + + return updateSupplier(supplierId,data,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type UpdateSupplierMutationResult = NonNullable>> + export type UpdateSupplierMutationBody = ReqUpdateSupplier + export type UpdateSupplierMutationError = void | HTTPValidationError + + /** * @summary 협력사 수정 */ -export const useUpdateSupplier = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { supplierId: string; data: ReqUpdateSupplier }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { supplierId: string; data: ReqUpdateSupplier }, - TContext -> => { - const mutationOptions = getUpdateSupplierMutationOptions(options); +export const useUpdateSupplier = (options?: { mutation?:UseMutationOptions>, TError,{supplierId: string;data: ReqUpdateSupplier}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {supplierId: string;data: ReqUpdateSupplier}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; -/** + const mutationOptions = getUpdateSupplierMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + /** * @summary 협력사 삭제 */ -export const deleteSupplier = (supplierId: string) => { - return customFetch({ - url: `/v1/supplier/delete/${supplierId}`, - method: "DELETE", - }); -}; +export const deleteSupplier = ( + supplierId: string, + options?: SecondParameter,) => { + + + return customFetch( + {url: `/v1/supplier/delete/${supplierId}`, method: 'DELETE' + }, + options); + } + -export const getDeleteSupplierMutationOptions = < - TError = void | HTTPValidationError, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { supplierId: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { supplierId: string }, - TContext -> => { - const mutationKey = ["deleteSupplier"]; - const { mutation: mutationOptions } = options - ? options.mutation && - "mutationKey" in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - const mutationFn: MutationFunction< - Awaited>, - { supplierId: string } - > = (props) => { - const { supplierId } = props ?? {}; +export const getDeleteSupplierMutationOptions = (options?: { mutation?:UseMutationOptions>, TError,{supplierId: string}, TContext>, request?: SecondParameter} +): UseMutationOptions>, TError,{supplierId: string}, TContext> => { - return deleteSupplier(supplierId); - }; +const mutationKey = ['deleteSupplier']; +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}; - return { mutationFn, ...mutationOptions }; -}; + -export type DeleteSupplierMutationResult = NonNullable< - Awaited> ->; -export type DeleteSupplierMutationError = void | HTTPValidationError; + const mutationFn: MutationFunction>, {supplierId: string}> = (props) => { + const {supplierId} = props ?? {}; -/** + return deleteSupplier(supplierId,requestOptions) + } + + + + + return { mutationFn, ...mutationOptions }} + + export type DeleteSupplierMutationResult = NonNullable>> + + export type DeleteSupplierMutationError = void | HTTPValidationError + + /** * @summary 협력사 삭제 */ -export const useDeleteSupplier = < - TError = void | HTTPValidationError, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { supplierId: string }, - TContext - >; - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { supplierId: string }, - TContext -> => { - const mutationOptions = getDeleteSupplierMutationOptions(options); +export const useDeleteSupplier = (options?: { mutation?:UseMutationOptions>, TError,{supplierId: string}, TContext>, request?: SecondParameter} + , queryClient?: QueryClient): UseMutationResult< + Awaited>, + TError, + {supplierId: string}, + TContext + > => { - return useMutation(mutationOptions, queryClient); -}; + const mutationOptions = getDeleteSupplierMutationOptions(options); + + return useMutation(mutationOptions, queryClient); + } + \ No newline at end of file diff --git a/negodata/front/src/api/mutator/custom-fetch.ts b/negodata/front/src/api/mutator/custom-fetch.ts index 5921c43..31bf1b9 100644 --- a/negodata/front/src/api/mutator/custom-fetch.ts +++ b/negodata/front/src/api/mutator/custom-fetch.ts @@ -94,13 +94,19 @@ export const customFetch = async ( (url.startsWith('http') ? url : `${BASE_URL}${url}`) + (queryString ? `?${queryString}` : ''); + // 파일 업로드(FormData)는 ① 브라우저가 boundary 포함 Content-Type 을 직접 설정해야 하고 + // ② 본문을 JSON.stringify 하면 "{}" 가 되어 파일이 통째로 누락된다. 분기 처리. + const isFormData = typeof FormData !== 'undefined' && data instanceof FormData; + // [요청 인터셉터] 토큰을 받아 헤더를 구성하고 한 번 호출(만료 재시도 시 새 토큰으로 재구성). const doFetch = (token: string | null) => { const headers = new Headers(config.headers); if (options?.headers) { new Headers(options.headers).forEach((v, k) => headers.set(k, v)); } - if (data != null && !headers.has('Content-Type')) { + if (isFormData) { + headers.delete('Content-Type'); // 생성 클라이언트가 박은 boundary 없는 multipart 헤더 제거 → 브라우저가 재설정 + } else if (data != null && !headers.has('Content-Type')) { headers.set('Content-Type', 'application/json'); } if (token) headers.set('Authorization', `Bearer ${token}`); @@ -108,7 +114,7 @@ export const customFetch = async ( ...options, method, headers, - body: data != null ? JSON.stringify(data) : options?.body, + body: data != null ? (isFormData ? data : JSON.stringify(data)) : options?.body, signal, }); }; diff --git a/negodata/front/src/app/provider.tsx b/negodata/front/src/app/provider.tsx index 8c28ad8..e3a5758 100644 --- a/negodata/front/src/app/provider.tsx +++ b/negodata/front/src/app/provider.tsx @@ -1,6 +1,7 @@ import {QueryClient, QueryClientProvider} from '@tanstack/react-query'; import {useState, type ReactNode} from 'react'; import {Toaster} from 'sonner'; +import {ConfirmHost} from '@/lib/confirm'; export function Providers({children}: {children: ReactNode}) { const [queryClient] = useState( @@ -19,6 +20,7 @@ export function Providers({children}: {children: ReactNode}) { {children} + ); } diff --git a/negodata/front/src/components/ImageDropzone.tsx b/negodata/front/src/components/ImageDropzone.tsx index 70363fe..1f89cb1 100644 --- a/negodata/front/src/components/ImageDropzone.tsx +++ b/negodata/front/src/components/ImageDropzone.tsx @@ -1,41 +1,63 @@ import React, { useState, useRef, DragEvent, ChangeEvent } from 'react'; -import { Upload, Image as ImageIcon, X, AlertCircle } from 'lucide-react'; +import { Upload, Image as ImageIcon, X, AlertCircle, Link2, Loader2 } from 'lucide-react'; interface ImageDropzoneProps { value: string; - onChange: (base64Url: string) => void; + onChange: (url: string) => void; onClear: () => void; + /** + * 파일을 받아 업로드하고 저장 URL 을 돌려준다(예: Azure Blob). + * 주어지면 드롭/선택한 파일을 업로드해 그 URL 을 value 로 쓴다. + * 없으면 과거처럼 base64 data URL 로 폴백한다(재사용 컴포넌트 호환). + */ + onUpload?: (file: File) => Promise; label?: string; className?: string; } +const MAX_SIZE = 4 * 1024 * 1024; // 백엔드 max_image_mb=4 와 일치 + export default function ImageDropzone({ value, onChange, onClear, + onUpload, label = '상품 대표 이미지 업로드', className = '' }: ImageDropzoneProps) { const [isDragActive, setIsDragActive] = useState(false); const [error, setError] = useState(null); + const [uploading, setUploading] = useState(false); + const [urlDraft, setUrlDraft] = useState(''); const fileInputRef = useRef(null); - const processFile = (file: File) => { + const processFile = async (file: File) => { setError(null); - - // Validate file type + if (!file.type.startsWith('image/')) { - setError('이미지 파일(*.png, *.jpg, *.jpeg, *.gif)만 업로드할 수 있습니다.'); + setError('이미지 파일(*.png, *.jpg, *.jpeg, *.gif, *.webp)만 업로드할 수 있습니다.'); return; } - - // Validate size (e.g., max 4MB for high-fidelity base64 storage) - const maxSize = 4 * 1024 * 1024; - if (file.size > maxSize) { + if (file.size > MAX_SIZE) { setError('이미지 최댓값은 4MB입니다. 더 작고 최적화된 이미지를 권장합니다.'); return; } + // 업로드 핸들러가 있으면 서버(blob)로 올리고 URL 을 받는다. + if (onUpload) { + setUploading(true); + try { + const url = await onUpload(file); + onChange(url); + } catch (err) { + setError(err instanceof Error ? err.message : '이미지 업로드에 실패했습니다.'); + } finally { + setUploading(false); + } + return; + } + + // 폴백: base64 data URL. const reader = new FileReader(); reader.onload = (e) => { if (e.target?.result && typeof e.target.result === 'string') { @@ -44,16 +66,14 @@ export default function ImageDropzone({ setError('이미지 해독 과정에 이상이 발생했습니다.'); } }; - reader.onerror = () => { - setError('파일을 수집하지 못했습니다.'); - }; + reader.onerror = () => setError('파일을 수집하지 못했습니다.'); reader.readAsDataURL(file); }; const handleDragOver = (e: DragEvent) => { e.preventDefault(); e.stopPropagation(); - setIsDragActive(true); + if (!uploading) setIsDragActive(true); }; const handleDragLeave = (e: DragEvent) => { @@ -66,20 +86,29 @@ export default function ImageDropzone({ e.preventDefault(); e.stopPropagation(); setIsDragActive(false); - + if (uploading) return; if (e.dataTransfer.files && e.dataTransfer.files[0]) { - processFile(e.dataTransfer.files[0]); + void processFile(e.dataTransfer.files[0]); } }; const handleFileChange = (e: ChangeEvent) => { if (e.target.files && e.target.files[0]) { - processFile(e.target.files[0]); + void processFile(e.target.files[0]); } + e.target.value = ''; // 같은 파일 재선택 허용 }; const handleButtonClick = () => { - fileInputRef.current?.click(); + if (!uploading) fileInputRef.current?.click(); + }; + + const applyUrl = () => { + const url = urlDraft.trim(); + if (!url) return; + setError(null); + onChange(url); + setUrlDraft(''); }; return ( @@ -90,7 +119,7 @@ export default function ImageDropzone({ {value ? ( - // Preview Mode with image loaded + // 미리보기 (blob URL / 외부 URL / base64 모두 동일하게 표시)
- {/* Hover overlay control */}
) : ( - // Active Dropzone Area + // 드롭존
@@ -136,27 +166,64 @@ export default function ImageDropzone({ onChange={handleFileChange} accept="image/*" className="hidden" + disabled={uploading} /> - -
- {isDragActive ? ( - - ) : ( - - )} -
-
-

- {isDragActive ? '여기에 드롭하여 업로드' : '이지지 드래그 앤 드롭 또는 파일 탐색'} -

-

- PNG, JPG, JPEG, GIF 파일 지원 (최대 4MB) -

-
+ {uploading ? ( +
+ +

업로드 중…

+
+ ) : ( + <> +
+ {isDragActive ? ( + + ) : ( + + )} +
+
+

+ {isDragActive ? '여기에 드롭하여 업로드' : '이미지 드래그 앤 드롭 또는 파일 탐색'} +

+

+ PNG, JPG, JPEG, GIF, WEBP 파일 지원 (최대 4MB) +

+
+ + )}
)} + {/* 이미지 URL 직접 입력 */} +
+
+ + setUrlDraft(e.target.value)} + onKeyDown={(e) => { + if (e.key === 'Enter') { + e.preventDefault(); + applyUrl(); + } + }} + placeholder="또는 이미지 URL 붙여넣기 (https://…)" + className="w-full pl-6 pr-2 py-1.5 text-[11px] rounded border border-border bg-background text-foreground placeholder:text-muted-foreground/70 focus:outline-none focus:border-primary" + /> +
+ +
+ {error && (
diff --git a/negodata/front/src/components/SlateRenderer.tsx b/negodata/front/src/components/SlateRenderer.tsx index 97978c9..da72cac 100644 --- a/negodata/front/src/components/SlateRenderer.tsx +++ b/negodata/front/src/components/SlateRenderer.tsx @@ -1,12 +1,23 @@ import React from 'react'; +import { variableLabel } from '@/features/cards/editor/variables'; interface SlateLeaf { text: string; bold?: boolean; italic?: boolean; - color?: 'primary' | 'success' | 'warning' | 'destructive'; + underline?: boolean; + // 'primary'|'success'|'warning'|'destructive' 프리셋 토큰 또는 임의 CSS 색(예: '#ED2024') + color?: string; } +// 프리셋 색 토큰 → 클래스. 카드 에디터는 헥스(#ED2024)를 쓰므로 토큰에 없으면 인라인 style 로 처리. +const NAMED_COLOR: Record = { + primary: 'text-primary font-bold underline decoration-2 decoration-gray-400 dark:decoration-gray-600', + success: 'text-success font-semibold px-1 py-0.5 rounded bg-emerald-50 dark:bg-emerald-950/40 border border-emerald-200/50 dark:border-emerald-900/40', + warning: 'text-warning font-semibold px-1 py-0.5 rounded bg-amber-50 dark:bg-amber-950/40 border border-amber-200/50', + destructive: 'text-destructive font-semibold', +}; + interface SlateNode { type?: 'paragraph' | 'block-quote' | 'heading-one' | 'heading-two' | 'list-item'; children: (SlateLeaf | SlateNode)[]; @@ -41,45 +52,17 @@ export default function SlateRenderer({ nodes, variables = {} }: SlateRendererPr const renderLeaf = (leaf: SlateLeaf, key: string) => { const text = replaceVariables(leaf.text); let classes = ''; - - if (leaf.bold) { - classes += ' font-bold '; - } - if (leaf.italic) { - classes += ' italic '; - } + if (leaf.bold) classes += ' font-bold'; + if (leaf.italic) classes += ' italic'; + if (leaf.underline) classes += ' underline'; - if (leaf.color === 'primary') { - return ( - - {text} - - ); - } - if (leaf.color === 'success') { - return ( - - {text} - - ); - } - if (leaf.color === 'warning') { - return ( - - {text} - - ); - } - if (leaf.color === 'destructive') { - return ( - - {text} - - ); - } + // color 가 프리셋 토큰이면 클래스, 임의 CSS 색(헥스 등)이면 인라인 style 로 적용. + const named = leaf.color ? NAMED_COLOR[leaf.color] : undefined; + const style = leaf.color && !named ? { color: leaf.color } : undefined; + const cls = `${classes}${named ? ` ${named}` : ''}`.trim(); return ( - + {text} ); @@ -93,6 +76,22 @@ export default function SlateRenderer({ nodes, variables = {} }: SlateRendererPr return renderLeaf(node as SlateLeaf, key); } + // 변수 노드(void inline): {type:'variable', name}. variables 에 값 있으면 치환, 없으면 라벨 칩. + if (node.type === 'variable') { + const raw = variables[node.name]; + const hasValue = raw !== undefined && raw !== null && raw !== ''; + if (hasValue) { + const text = typeof raw === 'number' ? raw.toLocaleString('ko-KR') : String(raw); + return {text}; + } + // 값 없으면 치환하지 않고 {라벨} 형태로 그대로 노출. + return ( + + {`{${variableLabel(node.name)}}`} + + ); + } + const childrenElements = (node.children || []).map((child: any, childIdx: number) => { if (child.text !== undefined) { return renderLeaf(child as SlateLeaf, `${key}-${childIdx}`); diff --git a/negodata/front/src/components/layout/Layout.tsx b/negodata/front/src/components/layout/Layout.tsx index 9216071..ee7aeeb 100644 --- a/negodata/front/src/components/layout/Layout.tsx +++ b/negodata/front/src/components/layout/Layout.tsx @@ -15,6 +15,8 @@ import { Moon, Building, ChevronRight, + Menu, + X, } from 'lucide-react'; interface LayoutProps { @@ -46,7 +48,11 @@ export default function Layout({ children, currentPage, setPage, onLogout }: Lay const today = new Date().toLocaleDateString('sv-SE'); const [isDark, setIsDark] = useState(false); - const [isSidebarOpen, setIsSidebarOpen] = useState(true); + const [isSidebarOpen, setIsSidebarOpen] = useState(true); // 데스크톱 접기 토글 + const [isMobileOpen, setIsMobileOpen] = useState(false); // 모바일 드로어 열림 + + // 사이드바 펼침 여부(라벨/프로필 노출 기준). 모바일 드로어는 항상 펼친 상태로 본다. + const expanded = isMobileOpen || isSidebarOpen; const toggleDarkMode = () => { setIsDark(!isDark); @@ -61,44 +67,62 @@ export default function Layout({ children, currentPage, setPage, onLogout }: Lay
{/* 토스트는 sonner (main.tsx)가 전역으로 처리한다 */} + {/* 모바일 드로어 백드롭 */} + {isMobileOpen && ( +
setIsMobileOpen(false)} + aria-hidden + /> + )} + {/* Main Sidebar */} {/* Main Container Wrapper */}
{/* Global Header */} -
-
- +
+
+ {/* 모바일 햄버거 */} + + {/* 현재 페이지 — 모바일·데스크톱 모두 표시(로고는 사이드바/드로어 몫) */} + {pageLabelMap[currentPage]}
@@ -156,12 +196,12 @@ export default function Layout({ children, currentPage, setPage, onLogout }: Lay
{/* Content Body Area */} -
+
{children}
{/* Compact Admin footer info */} -
+
Copyright © O2O Inc. All rights reserved
@@ -254,27 +294,27 @@ function NavItem({ /** 글로벌 헤더 우측 메타 정보 */ function HeaderMeta({ user, today }: { user: SidebarUser; today: string }) { return ( -
- +
+ 기준일시: {today} -
+
-
- - 회사: +
+ + 회사: {user?.company}
-
-
+
+
관리자: {user?.name} ({user?.loginId}) diff --git a/negodata/front/src/components/layout/PageToolbar.tsx b/negodata/front/src/components/layout/PageToolbar.tsx index a02d74e..6e7946c 100644 --- a/negodata/front/src/components/layout/PageToolbar.tsx +++ b/negodata/front/src/components/layout/PageToolbar.tsx @@ -21,7 +21,7 @@ export function PageToolbar({ )} >
{children}
- {actions &&
{actions}
} + {actions &&
{actions}
}
); } diff --git a/negodata/front/src/components/ui/data-table.tsx b/negodata/front/src/components/ui/data-table.tsx index d10e574..4ecfa1c 100644 --- a/negodata/front/src/components/ui/data-table.tsx +++ b/negodata/front/src/components/ui/data-table.tsx @@ -12,6 +12,7 @@ import { // 컬럼 설정형 데이터 테이블. 래퍼/헤더/행/빈상태/정렬·패딩, 그리고 행 선택(체크박스)까지 // 여기서 책임지고, 페이지는 컬럼 정의(header/cell)와 선택 상태만 넘긴다. 표 룩의 단일 출처. +// md 미만(모바일)에서는 같은 컬럼 정의로 카드(라벨:값) 리스트를 렌더해 가로 스크롤을 없앤다. export type Column = { id?: string header: ReactNode @@ -21,6 +22,12 @@ export type Column = { cellClassName?: string // 셀 단위 클릭 핸들러 (예: 행 클릭 전파 차단) onCellClick?: (row: T, e: MouseEvent) => void + // 모바일 카드뷰에서 라벨 없이 카드 헤더로 단독 표기(보통 첫 컬럼=식별값). 미지정 시 첫 컬럼이 자동 헤더. + mobileHeader?: boolean + // 모바일 카드뷰에서 이 컬럼 숨김 + mobileHidden?: boolean + // 모바일 카드뷰에서 라벨:값 한 줄이 아니라 라벨 아래 값 풀폭 스택으로(여러 줄/긴 블록 셀용) + mobileBlock?: boolean } // 행 선택 기능. 넘기면 맨 앞에 체크박스 컬럼(전체선택 헤더 포함)이 자동으로 붙는다. @@ -83,88 +90,172 @@ export function DataTable({ const colCount = columns.length + (selection ? 1 : 0) + // 모바일 카드뷰 컬럼 분류: 헤더(식별값) 1개 + 나머지(라벨:값). + const mobileCols = columns.filter((c) => !c.mobileHidden) + const headerIdx = mobileCols.findIndex((c) => c.mobileHeader) + const primaryCol = headerIdx >= 0 ? mobileCols[headerIdx] : mobileCols[0] + const detailCols = mobileCols.filter((c) => c !== primaryCol) + return ( -
- - - - {selection && ( - - toggleAll(e.target.checked)} - className={checkboxClass} - /> - - )} - {columns.map((c, i) => ( - - {c.header} - - ))} - - - - {data.length > 0 ? ( - data.map((row) => { - const key = rowKey(row) - const selected = !!selection && selection.selectedKeys.includes(key) - return ( - + {/* 넓을 때: 표 — 그래도 넘치면 Table 내부에서 가로 스크롤 */} +
+
+ + + {selection && ( + + toggleAll(e.target.checked)} + className={checkboxClass} + /> + + )} + {columns.map((c, i) => ( + onRowClick(row) : undefined} > - {selection && ( - e.stopPropagation()} - > + {c.header} + + ))} + + + + {data.length > 0 ? ( + data.map((row) => { + const key = rowKey(row) + const selected = !!selection && selection.selectedKeys.includes(key) + return ( + onRowClick(row) : undefined} + > + {selection && ( + e.stopPropagation()} + > + toggleOne(key, e.target.checked)} + className={checkboxClass} + /> + + )} + {columns.map((c, i) => ( + c.onCellClick!(row, e) : undefined} + > + {c.cell(row)} + + ))} + + ) + }) + ) : ( + + + {empty} + + + )} + +
+
+ + {/* 좁을 때(컨테이너 < 48rem): 카드 리스트 — 행=카드, 컬럼=라벨:값 */} +
+ {data.length > 0 ? ( + data.map((row) => { + const key = rowKey(row) + const selected = !!selection && selection.selectedKeys.includes(key) + return ( +
onRowClick(row) : undefined} + > + {/* 헤더: 선택 체크박스 + 식별 컬럼 */} + {(selection || primaryCol) && ( +
+ {selection && ( toggleOne(key, e.target.checked)} - className={checkboxClass} + onClick={(e) => e.stopPropagation()} + className={cn(checkboxClass, "shrink-0")} /> - - )} - {columns.map((c, i) => ( - c.onCellClick!(row, e) : undefined} - > - {c.cell(row)} - - ))} - - ) - }) - ) : ( - - - {empty} - - - )} - - + )} + {primaryCol && ( +
{primaryCol.cell(row)}
+ )} +
+ )} + + {/* 상세: 기본=라벨:값 한 줄(컴팩트) / mobileBlock=라벨 아래 풀폭 */} + {detailCols.length > 0 && ( +
+ {detailCols.map((c, i) => + c.mobileBlock ? ( +
+
{c.header}
+
c.onCellClick!(row, e) : undefined} + > + {c.cell(row)} +
+
+ ) : ( +
+
{c.header}
+
c.onCellClick!(row, e) : undefined} + > + {c.cell(row)} +
+
+ ) + )} +
+ )} +
+ ) + }) + ) : ( +
+ {empty} +
+ )} +
+ {footer}
) diff --git a/negodata/front/src/features/cards/components/CardFormModal.tsx b/negodata/front/src/features/cards/components/CardFormModal.tsx deleted file mode 100644 index 8203e38..0000000 --- a/negodata/front/src/features/cards/components/CardFormModal.tsx +++ /dev/null @@ -1,317 +0,0 @@ -import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; -import { z } from 'zod'; -import { X, Layers } from 'lucide-react'; -import { showToast } from '@/lib/notify'; -import { Typography } from '@/components/ui/typography'; -import { Input } from '@/components/ui/input'; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; -import { type NegotiationCard, type CardTab, generateCardCode } from '../types'; -import type { CardInput } from '../hooks/useCards'; - -const schema = z.object({ - isWildcard: z.boolean(), - code: z.string().trim().min(1, '카드번호는 필수 기입 사항입니다.'), - title: z.string().trim().min(1, '카드이름은 필수 기입 사항입니다.'), - scriptPreview: z.string().trim().min(1, '스크립트를 작성해 주십시오.'), - status: z.enum(['ACTIVE', 'INACTIVE']), - triggerCondition: z.string(), - memo: z.string(), -}); - -type FormValues = z.infer; - -type CardFormModalProps = { - open: boolean; - mode: 'create' | 'edit'; - card: NegotiationCard | null; // edit 모드 초기값 출처 - activeTab: CardTab; // create 시 기본 카드 종류 결정 - onCreate: (input: CardInput) => Promise; - onUpdate: (id: string, input: CardInput) => Promise; - onClose: () => void; -}; - -function buildDefaults( - mode: 'create' | 'edit', - card: NegotiationCard | null, - activeTab: CardTab, -): FormValues { - if (mode === 'edit' && card) { - return { - isWildcard: card.isWildcard, - code: card.code, - title: card.title, - scriptPreview: card.scriptPreview, - status: card.status, - triggerCondition: card.triggerCondition || '', - memo: card.memo || '', - }; - } - const wild = activeTab === 'WILD'; - return { - isWildcard: wild, - code: generateCardCode(wild), - title: '', - scriptPreview: '', - status: 'ACTIVE', - triggerCondition: '', - memo: '', - }; -} - -// 협상카드/와일드카드 등록·수정 모달. react-hook-form + zod로 검증. -// 페이지는 key={mode + card?.id}로 리마운트시켜 초기값을 주입한다. -export function CardFormModal({ - open, - mode, - card, - activeTab, - onCreate, - onUpdate, - onClose, -}: CardFormModalProps) { - const { - register, - control, - handleSubmit, - watch, - setValue, - formState: { errors }, - } = useForm({ - resolver: zodResolver(schema), - defaultValues: buildDefaults(mode, card, activeTab), - }); - - const isWildcard = watch('isWildcard'); - - if (!open) return null; - - const onValid = async (v: FormValues) => { - const input: CardInput = { - title: v.title, - code: v.code, - scriptPreview: v.scriptPreview, - status: v.status, - isWildcard: v.isWildcard, - triggerCondition: v.triggerCondition, - memo: v.memo, - }; - const kind = v.isWildcard ? '와일드카드' : '협상카드'; - try { - if (mode === 'create') { - await onCreate(input); - showToast(`${kind}가 추가되었습니다.`, 'success'); - } else if (card) { - await onUpdate(card.id, input); - showToast('정보가 수정되었습니다.', 'success'); - } - onClose(); - } catch (err) { - showToast(err instanceof Error ? err.message : `${kind} 저장 실패`, 'error'); - } - }; - - return ( -
-
- -
-
- - - {mode === 'create' - ? isWildcard - ? '신규 와일드카드 등록' - : '신규 협상카드 등록' - : isWildcard - ? '와일드카드 정보 수정' - : '협상카드 정보 수정'} - -
- -
- -
-
- {/* Card Type Selection */} -
- 카드 종류 - ( - - )} - /> -
- - {/* Code */} -
- 카드번호 - - {errors.code &&

{errors.code.message}

} -
- - {/* Status */} -
- 협상 적용 여부 - {isWildcard ? ( - ( -
- - - {field.value === 'ACTIVE' ? '적용 승인' : '적용 대기'} - -
- )} - /> - ) : ( -
- - 상시 항상 적용 -
- )} -
-
- - {/* Title */} -
- 카드이름 - - {errors.title &&

{errors.title.message}

} -
- - {/* Script */} -
-
- - - 스크립트 - -
- 치환 변수 사용: {'{target_price}'}, {'{partner_name}'} -
-
-
-
- 에디터 -
-