Add OpenAPI

This commit is contained in:
2025-07-05 22:32:52 +02:00
parent acd910e013
commit 54a4f7e08a
98 changed files with 4816 additions and 696 deletions

View File

@@ -6,6 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>

View File

@@ -13,9 +13,8 @@
"apiPackage": "service",
"modelPackage": "model",
"withSeparateModelsAndApi": true,
"npmName": "restClient",
"supportsES6": "true",
"withInterfaces": true
"supportsES6": true,
"withInterfaces": false
}
}
}

309
package-lock.json generated
View File

@@ -10,8 +10,12 @@
"dependencies": {
"@primeuix/themes": "^1.0.3",
"@tailwindcss/vite": "^4.1.5",
"@vueuse/core": "^13.5.0",
"axios": "^1.10.0",
"primevue": "^4.3.3",
"oidc-client-ts": "^3.3.0",
"pinia": "^3.0.3",
"primeicons": "^7.0.0",
"primevue": "^4.2.5",
"tailwindcss": "^4.1.5",
"tailwindcss-primeui": "^0.6.1",
"vue": "^3.5.13",
@@ -690,15 +694,6 @@
"node": ">=12.11.0"
}
},
"node_modules/@primeuix/styles": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@primeuix/styles/-/styles-1.0.3.tgz",
"integrity": "sha512-yHj/Q+fosJ1736Ty5lRbpqhKa9piou+xZPPppNHUDshq0+XhrFwDGggvPGmDAJyUIM+ChM/Nj8lPY/AwTNXAkg==",
"license": "MIT",
"dependencies": {
"@primeuix/styled": "^0.5.1"
}
},
"node_modules/@primeuix/themes": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@primeuix/themes/-/themes-1.0.3.tgz",
@@ -718,34 +713,64 @@
}
},
"node_modules/@primevue/core": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/@primevue/core/-/core-4.3.3.tgz",
"integrity": "sha512-kSkN5oourG7eueoFPIqiNX3oDT/f0I5IRK3uOY/ytz+VzTZp5yuaCN0Nt42ZQpVXjDxMxDvUhIdaXVrjr58NhQ==",
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/@primevue/core/-/core-4.2.5.tgz",
"integrity": "sha512-+oWBIQs5dLd2Ini4KEVOlvPILk989EHAskiFS3R/dz3jeOllJDMZFcSp8V9ddV0R3yDaPdLVkfHm2Q5t42kU2Q==",
"license": "MIT",
"dependencies": {
"@primeuix/styled": "^0.5.0",
"@primeuix/utils": "^0.5.1"
"@primeuix/styled": "^0.3.2",
"@primeuix/utils": "^0.3.2"
},
"engines": {
"node": ">=12.11.0"
},
"peerDependencies": {
"vue": "^3.5.0"
"vue": "^3.3.0"
}
},
"node_modules/@primevue/core/node_modules/@primeuix/styled": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@primeuix/styled/-/styled-0.3.2.tgz",
"integrity": "sha512-ColZes0+/WKqH4ob2x8DyNYf1NENpe5ZguOvx5yCLxaP8EIMVhLjWLO/3umJiDnQU4XXMLkn2mMHHw+fhTX/mw==",
"license": "MIT",
"dependencies": {
"@primeuix/utils": "^0.3.2"
},
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/@primevue/core/node_modules/@primeuix/utils": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@primeuix/utils/-/utils-0.3.2.tgz",
"integrity": "sha512-B+nphqTQeq+i6JuICLdVWnDMjONome2sNz0xI65qIOyeB4EF12CoKRiCsxuZ5uKAkHi/0d1LqlQ9mIWRSdkavw==",
"license": "MIT",
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/@primevue/icons": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/@primevue/icons/-/icons-4.3.3.tgz",
"integrity": "sha512-ouQaxHyeFB6MSfEGGbjaK5Qv9efS1xZGetZoU5jcPm090MSYLFtroP1CuK3lZZAQals06TZ6T6qcoNukSHpK5w==",
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/@primevue/icons/-/icons-4.2.5.tgz",
"integrity": "sha512-WFbUMZhQkXf/KmwcytkjGVeJ9aGEDXjP3uweOjQZMmRdEIxFnqYYpd90wE90JE1teZn3+TVnT4ZT7ejGyEXnFQ==",
"license": "MIT",
"dependencies": {
"@primeuix/utils": "^0.5.1",
"@primevue/core": "4.3.3"
"@primeuix/utils": "^0.3.2",
"@primevue/core": "4.2.5"
},
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/@primevue/icons/node_modules/@primeuix/utils": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@primeuix/utils/-/utils-0.3.2.tgz",
"integrity": "sha512-B+nphqTQeq+i6JuICLdVWnDMjONome2sNz0xI65qIOyeB4EF12CoKRiCsxuZ5uKAkHi/0d1LqlQ9mIWRSdkavw==",
"license": "MIT",
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.40.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.1.tgz",
@@ -1299,6 +1324,12 @@
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
"license": "MIT"
},
"node_modules/@types/web-bluetooth": {
"version": "0.0.21",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.21.tgz",
"integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==",
"license": "MIT"
},
"node_modules/@vitejs/plugin-vue": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.3.tgz",
@@ -1409,6 +1440,30 @@
"integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==",
"license": "MIT"
},
"node_modules/@vue/devtools-kit": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.7.7.tgz",
"integrity": "sha512-wgoZtxcTta65cnZ1Q6MbAfePVFxfM+gq0saaeytoph7nEa7yMXoi6sCPy4ufO111B9msnw0VOWjPEFCXuAKRHA==",
"license": "MIT",
"dependencies": {
"@vue/devtools-shared": "^7.7.7",
"birpc": "^2.3.0",
"hookable": "^5.5.3",
"mitt": "^3.0.1",
"perfect-debounce": "^1.0.0",
"speakingurl": "^14.0.1",
"superjson": "^2.2.2"
}
},
"node_modules/@vue/devtools-shared": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.7.tgz",
"integrity": "sha512-+udSj47aRl5aKb0memBvcUG9koarqnxNM5yjuREvqwK6T3ap4mn3Zqqc17QrBFTqSMjr3HK1cvStEZpMDpfdyw==",
"license": "MIT",
"dependencies": {
"rfdc": "^1.4.1"
}
},
"node_modules/@vue/language-core": {
"version": "2.2.10",
"resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.2.10.tgz",
@@ -1503,6 +1558,44 @@
}
}
},
"node_modules/@vueuse/core": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-13.5.0.tgz",
"integrity": "sha512-wV7z0eUpifKmvmN78UBZX8T7lMW53Nrk6JP5+6hbzrB9+cJ3jr//hUlhl9TZO/03bUkMK6gGkQpqOPWoabr72g==",
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.21",
"@vueuse/metadata": "13.5.0",
"@vueuse/shared": "13.5.0"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"vue": "^3.5.0"
}
},
"node_modules/@vueuse/metadata": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-13.5.0.tgz",
"integrity": "sha512-euhItU3b0SqXxSy8u1XHxUCdQ8M++bsRs+TYhOLDU/OykS7KvJnyIFfep0XM5WjIFry9uAPlVSjmVHiqeshmkw==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-13.5.0.tgz",
"integrity": "sha512-K7GrQIxJ/ANtucxIXbQlUHdB0TPA8c+q5i+zbrjxuhJCnJ9GtBg75sBSnvmLSxHKPg2Yo8w62PWksl9kwH0Q8g==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"vue": "^3.5.0"
}
},
"node_modules/acorn": {
"version": "8.14.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz",
@@ -1683,6 +1776,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/birpc": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/birpc/-/birpc-2.4.0.tgz",
"integrity": "sha512-5IdNxTyhXHv2UlgnPHQ0h+5ypVmkrYHzL8QT+DwFZ//2N/oNV8Ch+BCRmTJ3x6/z9Axo/cXYBc9eprsUVK/Jsg==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
@@ -2019,6 +2121,21 @@
"node": "> 0.10"
}
},
"node_modules/copy-anything": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz",
"integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==",
"license": "MIT",
"dependencies": {
"is-what": "^4.1.8"
},
"engines": {
"node": ">=12.13"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@@ -2712,6 +2829,12 @@
"he": "bin/he"
}
},
"node_modules/hookable": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz",
"integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==",
"license": "MIT"
},
"node_modules/http-proxy-agent": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
@@ -2901,6 +3024,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-what": {
"version": "4.1.16",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz",
"integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==",
"license": "MIT",
"engines": {
"node": ">=12.13"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/iterare": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz",
@@ -2940,6 +3075,15 @@
"graceful-fs": "^4.1.6"
}
},
"node_modules/jwt-decode": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/lightningcss": {
"version": "1.29.2",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.2.tgz",
@@ -3312,6 +3456,12 @@
"node": ">=8"
}
},
"node_modules/mitt": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
"license": "MIT"
},
"node_modules/mlly": {
"version": "1.7.4",
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz",
@@ -3424,6 +3574,18 @@
"node": ">=0.10.0"
}
},
"node_modules/oidc-client-ts": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/oidc-client-ts/-/oidc-client-ts-3.3.0.tgz",
"integrity": "sha512-t13S540ZwFOEZKLYHJwSfITugupW4uYLwuQSSXyKH/wHwZ+7FvgHE7gnNJh1YQIZ1Yd1hKSRjqeXGSUtS0r9JA==",
"license": "Apache-2.0",
"dependencies": {
"jwt-decode": "^4.0.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/onetime": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
@@ -3559,6 +3721,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/perfect-debounce": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz",
"integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==",
"license": "MIT"
},
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -3577,6 +3745,36 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pinia": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.3.tgz",
"integrity": "sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==",
"license": "MIT",
"dependencies": {
"@vue/devtools-api": "^7.7.2"
},
"funding": {
"url": "https://github.com/sponsors/posva"
},
"peerDependencies": {
"typescript": ">=4.4.4",
"vue": "^2.7.0 || ^3.5.11"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/pinia/node_modules/@vue/devtools-api": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.7.tgz",
"integrity": "sha512-lwOnNBH2e7x1fIIbVT7yF5D+YWhqELm55/4ZKf45R9T8r9dE2AIOy8HKjfqzGsoTHFbWbr337O4E0A0QADnjBg==",
"license": "MIT",
"dependencies": {
"@vue/devtools-kit": "^7.7.7"
}
},
"node_modules/pkg-types": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.1.0.tgz",
@@ -3617,22 +3815,48 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/primeicons": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/primeicons/-/primeicons-7.0.0.tgz",
"integrity": "sha512-jK3Et9UzwzTsd6tzl2RmwrVY/b8raJ3QZLzoDACj+oTJ0oX7L9Hy+XnVwgo4QVKlKpnP/Ur13SXV/pVh4LzaDw==",
"license": "MIT"
},
"node_modules/primevue": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/primevue/-/primevue-4.3.3.tgz",
"integrity": "sha512-nooYVoEz5CdP3EhUkD6c3qTdRmpLHZh75fBynkUkl46K8y5rksHTjdSISiDijwTA5STQIOkyqLb+RM+HQ6nC1Q==",
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/primevue/-/primevue-4.2.5.tgz",
"integrity": "sha512-7UMOIJvdFz4jQyhC76yhNdSlHtXvVpmE2JSo2ndUTBWjWJOkYyT562rQ4ayO+bMdJLtzBGqgY64I9ZfEvNd7vQ==",
"license": "MIT",
"dependencies": {
"@primeuix/styled": "^0.5.0",
"@primeuix/styles": "^1.0.0",
"@primeuix/utils": "^0.5.1",
"@primevue/core": "4.3.3",
"@primevue/icons": "4.3.3"
"@primeuix/styled": "^0.3.2",
"@primeuix/utils": "^0.3.2",
"@primevue/core": "4.2.5",
"@primevue/icons": "4.2.5"
},
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/primevue/node_modules/@primeuix/styled": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@primeuix/styled/-/styled-0.3.2.tgz",
"integrity": "sha512-ColZes0+/WKqH4ob2x8DyNYf1NENpe5ZguOvx5yCLxaP8EIMVhLjWLO/3umJiDnQU4XXMLkn2mMHHw+fhTX/mw==",
"license": "MIT",
"dependencies": {
"@primeuix/utils": "^0.3.2"
},
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/primevue/node_modules/@primeuix/utils": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@primeuix/utils/-/utils-0.3.2.tgz",
"integrity": "sha512-B+nphqTQeq+i6JuICLdVWnDMjONome2sNz0xI65qIOyeB4EF12CoKRiCsxuZ5uKAkHi/0d1LqlQ9mIWRSdkavw==",
"license": "MIT",
"engines": {
"node": ">=12.11.0"
}
},
"node_modules/proxy-agent": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz",
@@ -3758,6 +3982,12 @@
"node": ">=8"
}
},
"node_modules/rfdc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
"license": "MIT"
},
"node_modules/rollup": {
"version": "4.40.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz",
@@ -3919,6 +4149,15 @@
"integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==",
"dev": true
},
"node_modules/speakingurl": {
"version": "14.0.1",
"resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz",
"integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/sprintf-js": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
@@ -3981,6 +4220,18 @@
"url": "https://github.com/sponsors/Borewit"
}
},
"node_modules/superjson": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.2.tgz",
"integrity": "sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==",
"license": "MIT",
"dependencies": {
"copy-anything": "^3.0.2"
},
"engines": {
"node": ">=16"
}
},
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",

View File

@@ -7,13 +7,17 @@
"dev": "vite",
"build": "vue-tsc -b && vite build",
"preview": "vite preview",
"openapi-generator": "openapi-generator-cli generate -i http://localhost:8080/q/openapi --api-name-suffix 'Service' -g typescript-axios -o src/api/openpi -c openapi-generator-config.json"
"openapi-generator": "openapi-generator-cli generate"
},
"dependencies": {
"@primeuix/themes": "^1.0.3",
"@tailwindcss/vite": "^4.1.5",
"@vueuse/core": "^13.5.0",
"axios": "^1.10.0",
"primevue": "^4.3.3",
"oidc-client-ts": "^3.3.0",
"pinia": "^3.0.3",
"primeicons": "^7.0.0",
"primevue": "^4.2.5",
"tailwindcss": "^4.1.5",
"tailwindcss-primeui": "^0.6.1",
"vue": "^3.5.13",

View File

@@ -1,19 +1,81 @@
<script setup lang="ts">
</script>
<template>
<div class="absolute flex flex-col h-32 top-0 items-center justify-between">
<h1>Hello App!</h1>
<p>
<strong>Current route path:</strong> {{ $route.fullPath }}
</p>
<div class="flex w-full justify-between items-center">
<RouterLink to="/">Go to Home</RouterLink>
<RouterLink to="/foo">Go to Foo</RouterLink>
<div class="flex flex-col size-dvw overflow-hidden">
<!-- Navigator here -->
<Menubar
:model="items"
class="fixed w-full top-0 z-10"
>
<template #end>
<div class="flex items-center gap-2">
<div
class="flex"
v-if="authStore.isAuthenticated"
>
<div class="flex flex-row items-center mr-4">
<Avatar icon="pi pi-user" class="mr-2" shape="circle"/>
<p>
{{ authStore!.user!.profile.preferred_username}}
</p>
</div>
<Button
label="Logout"
icon="pi pi-user"
@click="authStore.logout()"
/>
</div>
<Button
v-else
label="Login"
icon="pi pi-user"
@click="authStore.login()"
/>
</div>
</div>
<main class="w-dvw">
<RouterView/>
</template>
</Menubar>
<main class="app-main pt-[60px]">
<Toast/>
<RouterView/>
</main>
</div>
</template>
<script setup lang="ts">
import {ref} from "vue";
import {useRouter} from "vue-router";
import Toast from 'primevue/toast';
import {useAuthStore} from "./stores/auth.ts";
const authStore = useAuthStore();
const router = useRouter();
const items = ref([
{
label: 'Home',
icon: 'pi pi-home',
command: () => {
router.push('/');
}
},
{
label: 'Sets',
icon: 'pi pi-mobile',
command: () => {
router.push('/sets');
}
},
{
label: 'My Decks',
icon: 'pi pi-book',
command: () => {
router.push('/decks');
}
},
{
label: 'My Cards',
icon: 'pi pi-mobile',
command: () => {
router.push('/cards');
}
}
]);
</script>

27
src/api/index.ts Normal file
View File

@@ -0,0 +1,27 @@
import axios from "axios";
import {userManager} from "../stores/auth.ts";
const axiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:8080'
})
axiosInstance.interceptors.request.use(async (config) => {
const user = await userManager.getUser()
if (user?.access_token) {
config.headers.Authorization = `Bearer ${user.access_token}`
}
return config
})
// Handle token expiration
axiosInstance.interceptors.response.use(
response => response,
async (error) => {
if (error.response?.status === 401) {
await userManager.signinRedirect()
}
return Promise.reject(error)
}
)
export default axiosInstance;

View File

@@ -1,36 +1,71 @@
.gitignore
.npmignore
.openapi-generator-ignore
README.md
api.ts
base.ts
common.ts
configuration.ts
docs/Attribute.md
docs/Card.md
docs/CardPrint.md
docs/CardPrintService.md
docs/CardService.md
docs/CardType.md
docs/CardUpstreamFetchRequest.md
docs/Deck.md
docs/DeckCreateRequest.md
docs/DeckService.md
docs/NewCard.md
docs/PageDeck.md
docs/JobDto.md
docs/JobService.md
docs/JobStatus.md
docs/LinkArrow.md
docs/MonsterCard.md
docs/MonsterCardType.md
docs/MonsterType.md
docs/Page.md
docs/PageCardDto.md
docs/PageCardPrintDto.md
docs/PageDeckDto.md
docs/PageSetDto.md
docs/Region.md
docs/RegionCodeAlias.md
docs/RegionalSet.md
docs/SetPrefix.md
docs/SetDto.md
docs/SetService.md
docs/SpellCard.md
docs/SpellCardType.md
docs/TrapCard.md
docs/TrapCardType.md
git_push.sh
index.ts
model/attribute.ts
model/card-print.ts
model/card-type.ts
model/card-upstream-fetch-request.ts
model/card.ts
model/deck-create-request.ts
model/deck.ts
model/index.ts
model/new-card.ts
model/page-deck.ts
model/job-dto.ts
model/job-status.ts
model/link-arrow.ts
model/monster-card-type.ts
model/monster-card.ts
model/monster-type.ts
model/page-card-dto.ts
model/page-card-print-dto.ts
model/page-deck-dto.ts
model/page-set-dto.ts
model/page.ts
model/region-code-alias.ts
model/region.ts
model/regional-set.ts
model/set-prefix.ts
package.json
model/set-dto.ts
model/spell-card-type.ts
model/spell-card.ts
model/trap-card-type.ts
model/trap-card.ts
service/card-print-service.ts
service/card-service.ts
service/deck-service.ts
tsconfig.esm.json
tsconfig.json
service/job-service.ts
service/set-service.ts

View File

@@ -1,81 +0,0 @@
## restClient@0.0.1
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
Environment
* Node.js
* Webpack
* Browserify
Language level
* ES5 - you must have a Promises/A+ library installed
* ES6
Module system
* CommonJS
* ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
### Building
To build and compile the typescript sources to javascript use:
```
npm install
npm run build
```
### Publishing
First build the package then run `npm publish`
### Consuming
navigate to the folder of your consuming project and run one of the following commands.
_published:_
```
npm install restClient@0.0.1 --save
```
_unPublished (not recommended):_
```
npm install PATH_TO_GENERATED_PACKAGE --save
```
### Documentation for API Endpoints
All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CardService* | [**apiCardsIdNewPut**](docs/CardService.md#apicardsidnewput) | **PUT** /api/cards/{id}/new | Test
*CardService* | [**getCardById**](docs/CardService.md#getcardbyid) | **GET** /api/cards/{id} | Get a singular Card by its ID
*CardService* | [**getCardImageById**](docs/CardService.md#getcardimagebyid) | **GET** /api/cards/{id}/image | Get the image of a Card by its ID
*CardService* | [**getCards**](docs/CardService.md#getcards) | **GET** /api/cards | Get a page of Cards with optional name query parameter
*DeckService* | [**addCardToDeck**](docs/DeckService.md#addcardtodeck) | **POST** /api/decks/{deckName}/{cardId} | Add a Card by its ID to a Deck by its name
*DeckService* | [**createDeck**](docs/DeckService.md#createdeck) | **POST** /api/decks | Create a Deck with a given name
*DeckService* | [**getDeckByName**](docs/DeckService.md#getdeckbyname) | **GET** /api/decks/{name} | Get a singular Deck by its name
*DeckService* | [**getDecks**](docs/DeckService.md#getdecks) | **GET** /api/decks | Get a page of Decks with optional name query parameter
### Documentation For Models
- [Card](docs/Card.md)
- [CardPrint](docs/CardPrint.md)
- [CardType](docs/CardType.md)
- [Deck](docs/Deck.md)
- [NewCard](docs/NewCard.md)
- [PageDeck](docs/PageDeck.md)
- [Region](docs/Region.md)
- [RegionalSet](docs/RegionalSet.md)
- [SetPrefix](docs/SetPrefix.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Endpoints do not require authorization.

View File

@@ -15,5 +15,8 @@
export * from './service/card-service';
export * from './service/card-print-service';
export * from './service/deck-service';
export * from './service/job-service';
export * from './service/set-service';

View File

@@ -0,0 +1,20 @@
# Attribute
## Enum
* `Wind` (value: `'WIND'`)
* `Water` (value: `'WATER'`)
* `Fire` (value: `'FIRE'`)
* `Earth` (value: `'EARTH'`)
* `Light` (value: `'LIGHT'`)
* `Dark` (value: `'DARK'`)
* `Divine` (value: `'DIVINE'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -6,40 +6,46 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**cardType** | [**CardType**](CardType.md) | | [default to undefined]
**description** | **string** | | [default to undefined]
**pendulumDescription** | **string** | | [optional] [default to undefined]
**defense** | **number** | | [optional] [default to undefined]
**attack** | **number** | | [optional] [default to undefined]
**health** | **number** | | [optional] [default to undefined]
**level** | **number** | | [optional] [default to undefined]
**linkValue** | **number** | | [optional] [default to undefined]
**name** | **string** | | [default to undefined]
**type** | **string** | | [default to undefined]
**frameType** | **string** | | [default to undefined]
**archetype** | **string** | | [optional] [default to undefined]
**race** | **string** | | [optional] [default to undefined]
**attribute** | **string** | | [optional] [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
**monsterEffect** | **string** | | [optional] [default to undefined]
**attack** | **number** | | [optional] [default to undefined]
**defense** | **number** | | [optional] [default to undefined]
**level** | **number** | | [optional] [default to undefined]
**isPendulum** | **boolean** | | [optional] [default to undefined]
**pendulumScale** | **number** | | [optional] [default to undefined]
**pendulumEffect** | **string** | | [optional] [default to undefined]
**linkValue** | **number** | | [optional] [default to undefined]
**subType** | [**SpellCardType**](SpellCardType.md) | | [default to undefined]
**monsterType** | [**MonsterType**](MonsterType.md) | | [default to undefined]
**attribute** | [**Attribute**](Attribute.md) | | [default to undefined]
**linkArrows** | [**Set&lt;LinkArrow&gt;**](LinkArrow.md) | | [default to undefined]
## Example
```typescript
import { Card } from 'restClient';
import { Card } from './api';
const instance: Card = {
id,
cardType,
description,
pendulumDescription,
defense,
attack,
health,
level,
linkValue,
name,
type,
frameType,
archetype,
race,
cardPrints,
monsterEffect,
attack,
defense,
level,
isPendulum,
pendulumScale,
pendulumEffect,
linkValue,
subType,
monsterType,
attribute,
linkArrows,
};
```

View File

@@ -5,21 +5,21 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**regionalSet** | [**RegionalSet**](RegionalSet.md) | | [default to undefined]
**card** | [**NewCard**](NewCard.md) | | [default to undefined]
**imageApiPath** | **string** | | [default to undefined]
**id** | **string** | | [default to undefined]
**name** | **string** | | [default to undefined]
**regionalName** | **string** | | [optional] [default to undefined]
**rarity** | **string** | | [default to undefined]
## Example
```typescript
import { CardPrint } from 'restClient';
import { CardPrint } from './api';
const instance: CardPrint = {
id,
regionalSet,
card,
imageApiPath,
name,
regionalName,
rarity,
};
```

View File

@@ -0,0 +1,64 @@
# CardPrintService
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getCardPrintPage**](#getcardprintpage) | **GET** /api/prints | Get a page of Card Prints with optional name query parameter|
# **getCardPrintPage**
> PageCardPrintDto getCardPrintPage()
### Example
```typescript
import {
CardPrintService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new CardPrintService(configuration);
let name: string; // (optional) (default to undefined)
let page: number; // (optional) (default to undefined)
let pageSize: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.getCardPrintPage(
name,
page,
pageSize
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | (optional) defaults to undefined|
| **page** | [**number**] | | (optional) defaults to undefined|
| **pageSize** | [**number**] | | (optional) defaults to undefined|
### Return type
**PageCardPrintDto**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Card Prints Page retrieved | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -4,13 +4,13 @@ All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**apiCardsIdNewPut**](#apicardsidnewput) | **PUT** /api/cards/{id}/new | Test|
|[**fetchUpstream**](#fetchupstream) | **POST** /api/cards/fetch | Fetch Cards by ID or Name from any upstream service|
|[**getCardById**](#getcardbyid) | **GET** /api/cards/{id} | Get a singular Card by its ID|
|[**getCardImageById**](#getcardimagebyid) | **GET** /api/cards/{id}/image | Get the image of a Card by its ID|
|[**getCards**](#getcards) | **GET** /api/cards | Get a page of Cards with optional name query parameter|
|[**getCardPage**](#getcardpage) | **GET** /api/cards | Get a page of Cards with optional name query parameter|
# **apiCardsIdNewPut**
> apiCardsIdNewPut()
# **fetchUpstream**
> Array<Card> fetchUpstream(cardUpstreamFetchRequest)
### Example
@@ -18,16 +18,17 @@ All URIs are relative to *http://localhost*
```typescript
import {
CardService,
Configuration
} from 'restClient';
Configuration,
CardUpstreamFetchRequest
} from './api';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
let id: number; // (default to undefined)
let cardUpstreamFetchRequest: CardUpstreamFetchRequest; //
const { status, data } = await apiInstance.apiCardsIdNewPut(
id
const { status, data } = await apiInstance.fetchUpstream(
cardUpstreamFetchRequest
);
```
@@ -35,12 +36,12 @@ const { status, data } = await apiInstance.apiCardsIdNewPut(
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
| **cardUpstreamFetchRequest** | **CardUpstreamFetchRequest**| | |
### Return type
void (empty response body)
**Array<Card>**
### Authorization
@@ -48,19 +49,20 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | No Content | - |
|**200** | Cards retrieved | - |
|**404** | Card with Name or ID cannot be found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCardById**
> NewCard getCardById()
> Card getCardById()
### Example
@@ -69,7 +71,7 @@ No authorization required
import {
CardService,
Configuration
} from 'restClient';
} from './api';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
@@ -90,7 +92,7 @@ const { status, data } = await apiInstance.getCardById(
### Return type
**NewCard**
**Card**
### Authorization
@@ -120,7 +122,7 @@ No authorization required
import {
CardService,
Configuration
} from 'restClient';
} from './api';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
@@ -161,8 +163,8 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCards**
> Array<Card> getCards()
# **getCardPage**
> PageCardDto getCardPage()
### Example
@@ -171,7 +173,7 @@ No authorization required
import {
CardService,
Configuration
} from 'restClient';
} from './api';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
@@ -180,7 +182,7 @@ let name: string; // (optional) (default to undefined)
let page: number; // (optional) (default to undefined)
let pageSize: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.getCards(
const { status, data } = await apiInstance.getCardPage(
name,
page,
pageSize
@@ -198,7 +200,7 @@ const { status, data } = await apiInstance.getCards(
### Return type
**Array<Card>**
**PageCardDto**
### Authorization

View File

@@ -0,0 +1,26 @@
# CardUpstreamFetchRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**services** | **Array&lt;string&gt;** | | [default to undefined]
**persist** | **boolean** | | [optional] [default to undefined]
**name** | **string** | | [optional] [default to undefined]
**id** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { CardUpstreamFetchRequest } from './api';
const instance: CardUpstreamFetchRequest = {
services,
persist,
name,
id,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -7,17 +7,17 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**name** | **string** | | [default to undefined]
**cards** | **{ [key: string]: number; }** | | [default to undefined]
**prints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
## Example
```typescript
import { Deck } from 'restClient';
import { Deck } from './api';
const instance: Deck = {
id,
name,
cards,
prints,
};
```

View File

@@ -0,0 +1,20 @@
# DeckCreateRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [default to undefined]
## Example
```typescript
import { DeckCreateRequest } from './api';
const instance: DeckCreateRequest = {
name,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -19,7 +19,7 @@ All URIs are relative to *http://localhost*
import {
DeckService,
Configuration
} from 'restClient';
} from './api';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
@@ -64,7 +64,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **createDeck**
> createDeck(deck)
> createDeck(deckCreateRequest)
### Example
@@ -73,16 +73,16 @@ No authorization required
import {
DeckService,
Configuration,
Deck
} from 'restClient';
DeckCreateRequest
} from './api';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
let deck: Deck; //
let deckCreateRequest: DeckCreateRequest; //
const { status, data } = await apiInstance.createDeck(
deck
deckCreateRequest
);
```
@@ -90,7 +90,7 @@ const { status, data } = await apiInstance.createDeck(
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **deck** | **Deck**| | |
| **deckCreateRequest** | **DeckCreateRequest**| | |
### Return type
@@ -125,7 +125,7 @@ No authorization required
import {
DeckService,
Configuration
} from 'restClient';
} from './api';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
@@ -167,7 +167,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getDecks**
> PageDeck getDecks()
> PageDeckDto getDecks()
### Example
@@ -176,7 +176,7 @@ No authorization required
import {
DeckService,
Configuration
} from 'restClient';
} from './api';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
@@ -203,7 +203,7 @@ const { status, data } = await apiInstance.getDecks(
### Return type
**PageDeck**
**PageDeckDto**
### Authorization

View File

@@ -0,0 +1,58 @@
# JobControllerService
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**apiJobsNameGet**](#apijobsnameget) | **GET** /api/jobs/{name} | Get Deck By Name|
# **apiJobsNameGet**
> string apiJobsNameGet()
### Example
```typescript
import {
JobControllerService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new JobControllerService(configuration);
let name: string; // (default to undefined)
const { status, data } = await apiInstance.apiJobsNameGet(
name
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | defaults to undefined|
### Return type
**string**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: text/plain
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# JobDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**pendingJobs** | **number** | | [optional] [default to undefined]
**processingJobs** | **number** | | [optional] [default to undefined]
**completedJobs** | **number** | | [optional] [default to undefined]
**failedJobs** | **number** | | [optional] [default to undefined]
**status** | [**JobStatus**](JobStatus.md) | | [default to undefined]
## Example
```typescript
import { JobDto } from './api';
const instance: JobDto = {
id,
pendingJobs,
processingJobs,
completedJobs,
failedJobs,
status,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,160 @@
# JobService
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getCardPrintImportJobStatusById**](#getcardprintimportjobstatusbyid) | **GET** /api/jobs/cardPrintImport/{id} | Get status of CardPrintImportJob|
|[**getCardSetImportJobStatusById**](#getcardsetimportjobstatusbyid) | **GET** /api/jobs/cardSetImport/{id} | Get status of CardSetImportJob|
|[**getRegionalSetImportJobStatusById**](#getregionalsetimportjobstatusbyid) | **GET** /api/jobs/regionalSetImport/{id} | Get status of RegionalSetImportJob|
# **getCardPrintImportJobStatusById**
> JobDto getCardPrintImportJobStatusById()
### Example
```typescript
import {
JobService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new JobService(configuration);
let id: number; // (default to undefined)
const { status, data } = await apiInstance.getCardPrintImportJobStatusById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
### Return type
**JobDto**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCardSetImportJobStatusById**
> JobDto getCardSetImportJobStatusById()
### Example
```typescript
import {
JobService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new JobService(configuration);
let id: number; // (default to undefined)
const { status, data } = await apiInstance.getCardSetImportJobStatusById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
### Return type
**JobDto**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getRegionalSetImportJobStatusById**
> JobDto getRegionalSetImportJobStatusById()
### Example
```typescript
import {
JobService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new JobService(configuration);
let id: number; // (default to undefined)
const { status, data } = await apiInstance.getRegionalSetImportJobStatusById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
### Return type
**JobDto**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,14 @@
# JobStatus
## Enum
* `Pending` (value: `'PENDING'`)
* `Processing` (value: `'PROCESSING'`)
* `Completed` (value: `'COMPLETED'`)
* `Failed` (value: `'FAILED'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,22 @@
# LinkArrow
## Enum
* `TopLeft` (value: `'TOP_LEFT'`)
* `Top` (value: `'TOP'`)
* `TopRight` (value: `'TOP_RIGHT'`)
* `Left` (value: `'LEFT'`)
* `Right` (value: `'RIGHT'`)
* `BottomLeft` (value: `'BOTTOM_LEFT'`)
* `Bottom` (value: `'BOTTOM'`)
* `BottomRight` (value: `'BOTTOM_RIGHT'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,52 @@
# MonsterCard
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**cardType** | [**CardType**](CardType.md) | | [default to undefined]
**description** | **string** | | [default to undefined]
**name** | **string** | | [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
**monsterEffect** | **string** | | [optional] [default to undefined]
**attack** | **number** | | [optional] [default to undefined]
**defense** | **number** | | [optional] [default to undefined]
**level** | **number** | | [optional] [default to undefined]
**isPendulum** | **boolean** | | [optional] [default to undefined]
**pendulumScale** | **number** | | [optional] [default to undefined]
**pendulumEffect** | **string** | | [optional] [default to undefined]
**linkValue** | **number** | | [optional] [default to undefined]
**subType** | [**MonsterCardType**](MonsterCardType.md) | | [default to undefined]
**monsterType** | [**MonsterType**](MonsterType.md) | | [default to undefined]
**attribute** | [**Attribute**](Attribute.md) | | [default to undefined]
**linkArrows** | [**Set&lt;LinkArrow&gt;**](LinkArrow.md) | | [default to undefined]
## Example
```typescript
import { MonsterCard } from './api';
const instance: MonsterCard = {
id,
cardType,
description,
name,
cardPrints,
monsterEffect,
attack,
defense,
level,
isPendulum,
pendulumScale,
pendulumEffect,
linkValue,
subType,
monsterType,
attribute,
linkArrows,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,20 @@
# MonsterCardType
## Enum
* `Normal` (value: `'NORMAL'`)
* `Effect` (value: `'EFFECT'`)
* `Ritual` (value: `'RITUAL'`)
* `Fusion` (value: `'FUSION'`)
* `Synchro` (value: `'SYNCHRO'`)
* `Xyz` (value: `'XYZ'`)
* `Link` (value: `'LINK'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,58 @@
# MonsterType
## Enum
* `Aqua` (value: `'AQUA'`)
* `Beast` (value: `'BEAST'`)
* `BeastWarrior` (value: `'BEAST_WARRIOR'`)
* `CreatorGod` (value: `'CREATOR_GOD'`)
* `Cyberse` (value: `'CYBERSE'`)
* `Dinosaur` (value: `'DINOSAUR'`)
* `DivineBeast` (value: `'DIVINE_BEAST'`)
* `Dragon` (value: `'DRAGON'`)
* `Fairy` (value: `'FAIRY'`)
* `Fiend` (value: `'FIEND'`)
* `Fish` (value: `'FISH'`)
* `Insect` (value: `'INSECT'`)
* `Illusion` (value: `'ILLUSION'`)
* `Machine` (value: `'MACHINE'`)
* `Plant` (value: `'PLANT'`)
* `Psychic` (value: `'PSYCHIC'`)
* `Pyro` (value: `'PYRO'`)
* `Reptile` (value: `'REPTILE'`)
* `Rock` (value: `'ROCK'`)
* `SeaSerpent` (value: `'SEA_SERPENT'`)
* `Spellcaster` (value: `'SPELLCASTER'`)
* `Thunder` (value: `'THUNDER'`)
* `Warrior` (value: `'WARRIOR'`)
* `WingedBeast` (value: `'WINGED_BEAST'`)
* `Wyrm` (value: `'WYRM'`)
* `Zombie` (value: `'ZOMBIE'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,25 +1,28 @@
# PageDeck
# Page
Page of items
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**Array&lt;Deck&gt;**](Deck.md) | | [default to undefined]
**content** | **Array&lt;any&gt;** | Items in the page | [default to undefined]
**page** | **number** | | [optional] [default to undefined]
**pageSize** | **number** | | [optional] [default to undefined]
**totalPages** | **number** | | [optional] [default to undefined]
**totalRecords** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { PageDeck } from 'restClient';
import { Page } from './api';
const instance: PageDeck = {
const instance: Page = {
content,
page,
pageSize,
totalPages,
totalRecords,
};
```

View File

@@ -0,0 +1,29 @@
# PageCardDto
Page of items
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**Array&lt;Card&gt;**](Card.md) | Items in the page | [default to undefined]
**page** | **number** | | [optional] [default to undefined]
**pageSize** | **number** | | [optional] [default to undefined]
**totalPages** | **number** | | [optional] [default to undefined]
**totalRecords** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { PageCardDto } from './api';
const instance: PageCardDto = {
content,
page,
pageSize,
totalPages,
totalRecords,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# PageCardPrintDto
Page of items
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**Array&lt;CardPrint&gt;**](CardPrint.md) | Items in the page | [default to undefined]
**page** | **number** | | [optional] [default to undefined]
**pageSize** | **number** | | [optional] [default to undefined]
**totalPages** | **number** | | [optional] [default to undefined]
**totalRecords** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { PageCardPrintDto } from './api';
const instance: PageCardPrintDto = {
content,
page,
pageSize,
totalPages,
totalRecords,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# PageDeckDto
Page of items
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**Array&lt;Deck&gt;**](Deck.md) | Items in the page | [default to undefined]
**page** | **number** | | [optional] [default to undefined]
**pageSize** | **number** | | [optional] [default to undefined]
**totalPages** | **number** | | [optional] [default to undefined]
**totalRecords** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { PageDeckDto } from './api';
const instance: PageDeckDto = {
content,
page,
pageSize,
totalPages,
totalRecords,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# PageSetDto
Page of items
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**Array&lt;SetDto&gt;**](SetDto.md) | Items in the page | [default to undefined]
**page** | **number** | | [optional] [default to undefined]
**pageSize** | **number** | | [optional] [default to undefined]
**totalPages** | **number** | | [optional] [default to undefined]
**totalRecords** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { PageSetDto } from './api';
const instance: PageSetDto = {
content,
page,
pageSize,
totalPages,
totalRecords,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,24 +1,34 @@
# Region
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [default to undefined]
**name** | **string** | | [default to undefined]
**regionalSets** | [**Set&lt;RegionalSet&gt;**](RegionalSet.md) | | [default to undefined]
* `AsianEnglish` (value: `'ASIAN_ENGLISH'`)
## Example
* `Japanese` (value: `'JAPANESE'`)
```typescript
import { Region } from 'restClient';
* `JapaneseAsian` (value: `'JAPANESE_ASIAN'`)
const instance: Region = {
id,
name,
regionalSets,
};
```
* `English` (value: `'ENGLISH'`)
* `EuropeanEnglish` (value: `'EUROPEAN_ENGLISH'`)
* `Korean` (value: `'KOREAN'`)
* `French` (value: `'FRENCH'`)
* `FrenchCanadian` (value: `'FRENCH_CANADIAN'`)
* `NaEnglish` (value: `'NA_ENGLISH'`)
* `Oceanic` (value: `'OCEANIC'`)
* `German` (value: `'GERMAN'`)
* `Portuguese` (value: `'PORTUGUESE'`)
* `Italian` (value: `'ITALIAN'`)
* `Spanish` (value: `'SPANISH'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,24 @@
# RegionCodeAlias
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**alias** | **string** | | [default to undefined]
**region** | [**Region**](Region.md) | | [default to undefined]
## Example
```typescript
import { RegionCodeAlias } from './api';
const instance: RegionCodeAlias = {
id,
alias,
region,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -5,15 +5,15 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [default to undefined]
**prefix** | [**SetPrefix**](SetPrefix.md) | | [default to undefined]
**region** | [**Region**](Region.md) | | [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
**id** | **number** | | [optional] [default to undefined]
**prefix** | **string** | | [default to undefined]
**region** | **string** | | [default to undefined]
**cardPrints** | [**Array&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
## Example
```typescript
import { RegionalSet } from 'restClient';
import { RegionalSet } from './api';
const instance: RegionalSet = {
id,

View File

@@ -0,0 +1,20 @@
# SetDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [default to undefined]
## Example
```typescript
import { SetDto } from './api';
const instance: SetDto = {
name,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -5,19 +5,17 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [default to undefined]
**id** | **number** | | [optional] [default to undefined]
**name** | **string** | | [default to undefined]
**regionalSets** | [**Set&lt;RegionalSet&gt;**](RegionalSet.md) | | [default to undefined]
## Example
```typescript
import { SetPrefix } from 'restClient';
import { SetPrefix } from './api';
const instance: SetPrefix = {
id,
name,
regionalSets,
};
```

View File

@@ -0,0 +1,217 @@
# SetService
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**apiSetsNameGet**](#apisetsnameget) | **GET** /api/sets/{name} | Find Set By Name|
|[**apiSetsNameNewGet**](#apisetsnamenewget) | **GET** /api/sets/{name}/new | Fetch And Persist From Upstream|
|[**apiSetsNameScrapeGet**](#apisetsnamescrapeget) | **GET** /api/sets/{name}/scrape | Scrape And Persist From Upstream|
|[**getCardSetPage**](#getcardsetpage) | **GET** /api/sets | Get a page of Card Sets with optional name query parameter|
# **apiSetsNameGet**
> SetDto apiSetsNameGet()
### Example
```typescript
import {
SetService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new SetService(configuration);
let name: string; // (default to undefined)
const { status, data } = await apiInstance.apiSetsNameGet(
name
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | defaults to undefined|
### Return type
**SetDto**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Set retrieved | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **apiSetsNameNewGet**
> Array<SetDto> apiSetsNameNewGet()
### Example
```typescript
import {
SetService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new SetService(configuration);
let name: string; // (default to undefined)
const { status, data } = await apiInstance.apiSetsNameNewGet(
name
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | defaults to undefined|
### Return type
**Array<SetDto>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Set retrieved | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **apiSetsNameScrapeGet**
> apiSetsNameScrapeGet()
### Example
```typescript
import {
SetService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new SetService(configuration);
let name: string; // (default to undefined)
const { status, data } = await apiInstance.apiSetsNameScrapeGet(
name
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | defaults to undefined|
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Set retrieved | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCardSetPage**
> PageSetDto getCardSetPage()
### Example
```typescript
import {
SetService,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new SetService(configuration);
let name: string; // (optional) (default to undefined)
let page: number; // (optional) (default to undefined)
let pageSize: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.getCardSetPage(
name,
page,
pageSize
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | (optional) defaults to undefined|
| **page** | [**number**] | | (optional) defaults to undefined|
| **pageSize** | [**number**] | | (optional) defaults to undefined|
### Return type
**PageSetDto**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Page for the given query | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# SpellCard
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**cardType** | [**CardType**](CardType.md) | | [default to undefined]
**description** | **string** | | [default to undefined]
**name** | **string** | | [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
**subType** | [**SpellCardType**](SpellCardType.md) | | [default to undefined]
## Example
```typescript
import { SpellCard } from './api';
const instance: SpellCard = {
id,
cardType,
description,
name,
cardPrints,
subType,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,18 @@
# SpellCardType
## Enum
* `Normal` (value: `'NORMAL'`)
* `Continuous` (value: `'CONTINUOUS'`)
* `Equip` (value: `'EQUIP'`)
* `QuickPlay` (value: `'QUICK_PLAY'`)
* `Field` (value: `'FIELD'`)
* `Ritual` (value: `'RITUAL'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,4 +1,4 @@
# NewCard
# TrapCard
## Properties
@@ -10,18 +10,20 @@ Name | Type | Description | Notes
**description** | **string** | | [default to undefined]
**name** | **string** | | [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
**subType** | [**TrapCardType**](TrapCardType.md) | | [default to undefined]
## Example
```typescript
import { NewCard } from 'restClient';
import { TrapCard } from './api';
const instance: NewCard = {
const instance: TrapCard = {
id,
cardType,
description,
name,
cardPrints,
subType,
};
```

View File

@@ -0,0 +1,12 @@
# TrapCardType
## Enum
* `Normal` (value: `'NORMAL'`)
* `Continuous` (value: `'CONTINUOUS'`)
* `Counter` (value: `'COUNTER'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const Attribute = {
Wind: 'WIND',
Water: 'WATER',
Fire: 'FIRE',
Earth: 'EARTH',
Light: 'LIGHT',
Dark: 'DARK',
Divine: 'DIVINE'
} as const;
export type Attribute = typeof Attribute[keyof typeof Attribute];

View File

@@ -13,12 +13,6 @@
*/
// May contain unused imports in some cases
// @ts-ignore
import type { NewCard } from './new-card';
// May contain unused imports in some cases
// @ts-ignore
import type { RegionalSet } from './regional-set';
/**
*
@@ -28,27 +22,27 @@ import type { RegionalSet } from './regional-set';
export interface CardPrint {
/**
*
* @type {number}
* @type {string}
* @memberof CardPrint
*/
'id'?: number;
/**
*
* @type {RegionalSet}
* @memberof CardPrint
*/
'regionalSet': RegionalSet;
/**
*
* @type {NewCard}
* @memberof CardPrint
*/
'card': NewCard;
'id': string;
/**
*
* @type {string}
* @memberof CardPrint
*/
'imageApiPath': string;
'name': string;
/**
*
* @type {string}
* @memberof CardPrint
*/
'regionalName'?: string | null;
/**
*
* @type {string}
* @memberof CardPrint
*/
'rarity': string;
}

View File

@@ -0,0 +1,48 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CardUpstreamFetchRequest
*/
export interface CardUpstreamFetchRequest {
/**
*
* @type {Array<string>}
* @memberof CardUpstreamFetchRequest
*/
'services': Array<string>;
/**
*
* @type {boolean}
* @memberof CardUpstreamFetchRequest
*/
'persist'?: boolean;
/**
*
* @type {string}
* @memberof CardUpstreamFetchRequest
*/
'name'?: string | null;
/**
*
* @type {number}
* @memberof CardUpstreamFetchRequest
*/
'id'?: number | null;
}

View File

@@ -13,96 +13,38 @@
*/
// May contain unused imports in some cases
// @ts-ignore
import type { Attribute } from './attribute';
// May contain unused imports in some cases
// @ts-ignore
import type { CardPrint } from './card-print';
// May contain unused imports in some cases
// @ts-ignore
import type { CardType } from './card-type';
// May contain unused imports in some cases
// @ts-ignore
import type { LinkArrow } from './link-arrow';
// May contain unused imports in some cases
// @ts-ignore
import type { MonsterCard } from './monster-card';
// May contain unused imports in some cases
// @ts-ignore
import type { MonsterType } from './monster-type';
// May contain unused imports in some cases
// @ts-ignore
import type { SpellCard } from './spell-card';
// May contain unused imports in some cases
// @ts-ignore
import type { SpellCardType } from './spell-card-type';
// May contain unused imports in some cases
// @ts-ignore
import type { TrapCard } from './trap-card';
/**
*
* @type Card
* @export
* @interface Card
*/
export interface Card {
/**
*
* @type {number}
* @memberof Card
*/
'id'?: number;
/**
*
* @type {string}
* @memberof Card
*/
'description': string;
/**
*
* @type {string}
* @memberof Card
*/
'pendulumDescription'?: string | null;
/**
*
* @type {number}
* @memberof Card
*/
'defense'?: number | null;
/**
*
* @type {number}
* @memberof Card
*/
'attack'?: number | null;
/**
*
* @type {number}
* @memberof Card
*/
'health'?: number | null;
/**
*
* @type {number}
* @memberof Card
*/
'level'?: number | null;
/**
*
* @type {number}
* @memberof Card
*/
'linkValue'?: number | null;
/**
*
* @type {string}
* @memberof Card
*/
'name': string;
/**
*
* @type {string}
* @memberof Card
*/
'type': string;
/**
*
* @type {string}
* @memberof Card
*/
'frameType': string;
/**
*
* @type {string}
* @memberof Card
*/
'archetype'?: string | null;
/**
*
* @type {string}
* @memberof Card
*/
'race'?: string | null;
/**
*
* @type {string}
* @memberof Card
*/
'attribute'?: string | null;
}
export type Card = MonsterCard | SpellCard | TrapCard;

View File

@@ -0,0 +1,30 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DeckCreateRequest
*/
export interface DeckCreateRequest {
/**
*
* @type {string}
* @memberof DeckCreateRequest
*/
'name': string;
}

View File

@@ -13,6 +13,9 @@
*/
// May contain unused imports in some cases
// @ts-ignore
import type { CardPrint } from './card-print';
/**
*
@@ -34,9 +37,9 @@ export interface Deck {
'name': string;
/**
*
* @type {{ [key: string]: number; }}
* @type {Set<CardPrint>}
* @memberof Deck
*/
'cards': { [key: string]: number; };
'prints': Set<CardPrint>;
}

View File

@@ -1,9 +1,26 @@
export * from './attribute';
export * from './card';
export * from './card-print';
export * from './card-type';
export * from './card-upstream-fetch-request';
export * from './deck';
export * from './new-card';
export * from './page-deck';
export * from './deck-create-request';
export * from './job-dto';
export * from './job-status';
export * from './link-arrow';
export * from './monster-card';
export * from './monster-card-type';
export * from './monster-type';
export * from './page';
export * from './page-card-dto';
export * from './page-card-print-dto';
export * from './page-deck-dto';
export * from './page-set-dto';
export * from './region';
export * from './region-code-alias';
export * from './regional-set';
export * from './set-prefix';
export * from './set-dto';
export * from './spell-card';
export * from './spell-card-type';
export * from './trap-card';
export * from './trap-card-type';

View File

@@ -0,0 +1,65 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { JobStatus } from './job-status';
/**
*
* @export
* @interface JobDto
*/
export interface JobDto {
/**
*
* @type {number}
* @memberof JobDto
*/
'id'?: number;
/**
*
* @type {number}
* @memberof JobDto
*/
'pendingJobs'?: number | null;
/**
*
* @type {number}
* @memberof JobDto
*/
'processingJobs'?: number | null;
/**
*
* @type {number}
* @memberof JobDto
*/
'completedJobs'?: number | null;
/**
*
* @type {number}
* @memberof JobDto
*/
'failedJobs'?: number | null;
/**
*
* @type {JobStatus}
* @memberof JobDto
*/
'status': JobStatus;
}

View File

@@ -0,0 +1,33 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const JobStatus = {
Pending: 'PENDING',
Processing: 'PROCESSING',
Completed: 'COMPLETED',
Failed: 'FAILED'
} as const;
export type JobStatus = typeof JobStatus[keyof typeof JobStatus];

View File

@@ -0,0 +1,37 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const LinkArrow = {
TopLeft: 'TOP_LEFT',
Top: 'TOP',
TopRight: 'TOP_RIGHT',
Left: 'LEFT',
Right: 'RIGHT',
BottomLeft: 'BOTTOM_LEFT',
Bottom: 'BOTTOM',
BottomRight: 'BOTTOM_RIGHT'
} as const;
export type LinkArrow = typeof LinkArrow[keyof typeof LinkArrow];

View File

@@ -0,0 +1,36 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const MonsterCardType = {
Normal: 'NORMAL',
Effect: 'EFFECT',
Ritual: 'RITUAL',
Fusion: 'FUSION',
Synchro: 'SYNCHRO',
Xyz: 'XYZ',
Link: 'LINK'
} as const;
export type MonsterCardType = typeof MonsterCardType[keyof typeof MonsterCardType];

View File

@@ -0,0 +1,146 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { Attribute } from './attribute';
// May contain unused imports in some cases
// @ts-ignore
import type { CardPrint } from './card-print';
// May contain unused imports in some cases
// @ts-ignore
import type { CardType } from './card-type';
// May contain unused imports in some cases
// @ts-ignore
import type { LinkArrow } from './link-arrow';
// May contain unused imports in some cases
// @ts-ignore
import type { MonsterCardType } from './monster-card-type';
// May contain unused imports in some cases
// @ts-ignore
import type { MonsterType } from './monster-type';
/**
*
* @export
* @interface MonsterCard
*/
export interface MonsterCard {
/**
*
* @type {number}
* @memberof MonsterCard
*/
'id'?: number;
/**
*
* @type {CardType}
* @memberof MonsterCard
*/
'cardType': CardType;
/**
*
* @type {string}
* @memberof MonsterCard
*/
'description': string;
/**
*
* @type {string}
* @memberof MonsterCard
*/
'name': string;
/**
*
* @type {Set<CardPrint>}
* @memberof MonsterCard
*/
'cardPrints': Set<CardPrint>;
/**
*
* @type {string}
* @memberof MonsterCard
*/
'monsterEffect'?: string | null;
/**
*
* @type {number}
* @memberof MonsterCard
*/
'attack'?: number | null;
/**
*
* @type {number}
* @memberof MonsterCard
*/
'defense'?: number | null;
/**
*
* @type {number}
* @memberof MonsterCard
*/
'level'?: number | null;
/**
*
* @type {boolean}
* @memberof MonsterCard
*/
'isPendulum'?: boolean;
/**
*
* @type {number}
* @memberof MonsterCard
*/
'pendulumScale'?: number | null;
/**
*
* @type {string}
* @memberof MonsterCard
*/
'pendulumEffect'?: string | null;
/**
*
* @type {number}
* @memberof MonsterCard
*/
'linkValue'?: number | null;
/**
*
* @type {MonsterCardType}
* @memberof MonsterCard
*/
'subType': MonsterCardType;
/**
*
* @type {MonsterType}
* @memberof MonsterCard
*/
'monsterType': MonsterType;
/**
*
* @type {Attribute}
* @memberof MonsterCard
*/
'attribute': Attribute;
/**
*
* @type {Set<LinkArrow>}
* @memberof MonsterCard
*/
'linkArrows': Set<LinkArrow>;
}

View File

@@ -0,0 +1,55 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const MonsterType = {
Aqua: 'AQUA',
Beast: 'BEAST',
BeastWarrior: 'BEAST_WARRIOR',
CreatorGod: 'CREATOR_GOD',
Cyberse: 'CYBERSE',
Dinosaur: 'DINOSAUR',
DivineBeast: 'DIVINE_BEAST',
Dragon: 'DRAGON',
Fairy: 'FAIRY',
Fiend: 'FIEND',
Fish: 'FISH',
Insect: 'INSECT',
Illusion: 'ILLUSION',
Machine: 'MACHINE',
Plant: 'PLANT',
Psychic: 'PSYCHIC',
Pyro: 'PYRO',
Reptile: 'REPTILE',
Rock: 'ROCK',
SeaSerpent: 'SEA_SERPENT',
Spellcaster: 'SPELLCASTER',
Thunder: 'THUNDER',
Warrior: 'WARRIOR',
WingedBeast: 'WINGED_BEAST',
Wyrm: 'WYRM',
Zombie: 'ZOMBIE'
} as const;
export type MonsterType = typeof MonsterType[keyof typeof MonsterType];

View File

@@ -0,0 +1,57 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { Card } from './card';
/**
* Page of items
* @export
* @interface PageCardDto
*/
export interface PageCardDto {
/**
* Items in the page
* @type {Array<Card>}
* @memberof PageCardDto
*/
'content': Array<Card>;
/**
*
* @type {number}
* @memberof PageCardDto
*/
'page'?: number;
/**
*
* @type {number}
* @memberof PageCardDto
*/
'pageSize'?: number;
/**
*
* @type {number}
* @memberof PageCardDto
*/
'totalPages'?: number;
/**
*
* @type {number}
* @memberof PageCardDto
*/
'totalRecords'?: number | null;
}

View File

@@ -0,0 +1,57 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { CardPrint } from './card-print';
/**
* Page of items
* @export
* @interface PageCardPrintDto
*/
export interface PageCardPrintDto {
/**
* Items in the page
* @type {Array<CardPrint>}
* @memberof PageCardPrintDto
*/
'content': Array<CardPrint>;
/**
*
* @type {number}
* @memberof PageCardPrintDto
*/
'page'?: number;
/**
*
* @type {number}
* @memberof PageCardPrintDto
*/
'pageSize'?: number;
/**
*
* @type {number}
* @memberof PageCardPrintDto
*/
'totalPages'?: number;
/**
*
* @type {number}
* @memberof PageCardPrintDto
*/
'totalRecords'?: number | null;
}

View File

@@ -18,34 +18,40 @@
import type { Deck } from './deck';
/**
*
* Page of items
* @export
* @interface PageDeck
* @interface PageDeckDto
*/
export interface PageDeck {
export interface PageDeckDto {
/**
*
* Items in the page
* @type {Array<Deck>}
* @memberof PageDeck
* @memberof PageDeckDto
*/
'content': Array<Deck>;
/**
*
* @type {number}
* @memberof PageDeck
* @memberof PageDeckDto
*/
'page'?: number;
/**
*
* @type {number}
* @memberof PageDeck
* @memberof PageDeckDto
*/
'pageSize'?: number;
/**
*
* @type {number}
* @memberof PageDeck
* @memberof PageDeckDto
*/
'totalPages'?: number;
/**
*
* @type {number}
* @memberof PageDeckDto
*/
'totalRecords'?: number | null;
}

View File

@@ -0,0 +1,57 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { SetDto } from './set-dto';
/**
* Page of items
* @export
* @interface PageSetDto
*/
export interface PageSetDto {
/**
* Items in the page
* @type {Array<SetDto>}
* @memberof PageSetDto
*/
'content': Array<SetDto>;
/**
*
* @type {number}
* @memberof PageSetDto
*/
'page'?: number;
/**
*
* @type {number}
* @memberof PageSetDto
*/
'pageSize'?: number;
/**
*
* @type {number}
* @memberof PageSetDto
*/
'totalPages'?: number;
/**
*
* @type {number}
* @memberof PageSetDto
*/
'totalRecords'?: number | null;
}

View File

@@ -0,0 +1,54 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Page of items
* @export
* @interface Page
*/
export interface Page {
/**
* Items in the page
* @type {Array<any>}
* @memberof Page
*/
'content': Array<any>;
/**
*
* @type {number}
* @memberof Page
*/
'page'?: number;
/**
*
* @type {number}
* @memberof Page
*/
'pageSize'?: number;
/**
*
* @type {number}
* @memberof Page
*/
'totalPages'?: number;
/**
*
* @type {number}
* @memberof Page
*/
'totalRecords'?: number | null;
}

View File

@@ -0,0 +1,47 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { Region } from './region';
/**
*
* @export
* @interface RegionCodeAlias
*/
export interface RegionCodeAlias {
/**
*
* @type {number}
* @memberof RegionCodeAlias
*/
'id'?: number;
/**
*
* @type {string}
* @memberof RegionCodeAlias
*/
'alias': string;
/**
*
* @type {Region}
* @memberof RegionCodeAlias
*/
'region': Region;
}

View File

@@ -13,33 +13,31 @@
*/
// May contain unused imports in some cases
// @ts-ignore
import type { RegionalSet } from './regional-set';
/**
*
* @export
* @interface Region
* @enum {string}
*/
export interface Region {
/**
*
* @type {number}
* @memberof Region
*/
'id': number;
/**
*
* @type {string}
* @memberof Region
*/
'name': string;
/**
*
* @type {Set<RegionalSet>}
* @memberof Region
*/
'regionalSets': Set<RegionalSet>;
}
export const Region = {
AsianEnglish: 'ASIAN_ENGLISH',
Japanese: 'JAPANESE',
JapaneseAsian: 'JAPANESE_ASIAN',
English: 'ENGLISH',
EuropeanEnglish: 'EUROPEAN_ENGLISH',
Korean: 'KOREAN',
French: 'FRENCH',
FrenchCanadian: 'FRENCH_CANADIAN',
NaEnglish: 'NA_ENGLISH',
Oceanic: 'OCEANIC',
German: 'GERMAN',
Portuguese: 'PORTUGUESE',
Italian: 'ITALIAN',
Spanish: 'SPANISH'
} as const;
export type Region = typeof Region[keyof typeof Region];

View File

@@ -16,12 +16,6 @@
// May contain unused imports in some cases
// @ts-ignore
import type { CardPrint } from './card-print';
// May contain unused imports in some cases
// @ts-ignore
import type { Region } from './region';
// May contain unused imports in some cases
// @ts-ignore
import type { SetPrefix } from './set-prefix';
/**
*
@@ -34,24 +28,24 @@ export interface RegionalSet {
* @type {number}
* @memberof RegionalSet
*/
'id': number;
'id'?: number;
/**
*
* @type {SetPrefix}
* @type {string}
* @memberof RegionalSet
*/
'prefix': SetPrefix;
'prefix': string;
/**
*
* @type {Region}
* @type {string}
* @memberof RegionalSet
*/
'region': Region;
'region': string;
/**
*
* @type {Set<CardPrint>}
* @type {Array<CardPrint>}
* @memberof RegionalSet
*/
'cardPrints': Set<CardPrint>;
'cardPrints': Array<CardPrint>;
}

View File

@@ -0,0 +1,30 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface SetDto
*/
export interface SetDto {
/**
*
* @type {string}
* @memberof SetDto
*/
'name': string;
}

View File

@@ -13,9 +13,6 @@
*/
// May contain unused imports in some cases
// @ts-ignore
import type { RegionalSet } from './regional-set';
/**
*
@@ -28,18 +25,12 @@ export interface SetPrefix {
* @type {number}
* @memberof SetPrefix
*/
'id': number;
'id'?: number;
/**
*
* @type {string}
* @memberof SetPrefix
*/
'name': string;
/**
*
* @type {Set<RegionalSet>}
* @memberof SetPrefix
*/
'regionalSets': Set<RegionalSet>;
}

View File

@@ -0,0 +1,35 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const SpellCardType = {
Normal: 'NORMAL',
Continuous: 'CONTINUOUS',
Equip: 'EQUIP',
QuickPlay: 'QUICK_PLAY',
Field: 'FIELD',
Ritual: 'RITUAL'
} as const;
export type SpellCardType = typeof SpellCardType[keyof typeof SpellCardType];

View File

@@ -0,0 +1,71 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { CardPrint } from './card-print';
// May contain unused imports in some cases
// @ts-ignore
import type { CardType } from './card-type';
// May contain unused imports in some cases
// @ts-ignore
import type { SpellCardType } from './spell-card-type';
/**
*
* @export
* @interface SpellCard
*/
export interface SpellCard {
/**
*
* @type {number}
* @memberof SpellCard
*/
'id'?: number;
/**
*
* @type {CardType}
* @memberof SpellCard
*/
'cardType': CardType;
/**
*
* @type {string}
* @memberof SpellCard
*/
'description': string;
/**
*
* @type {string}
* @memberof SpellCard
*/
'name': string;
/**
*
* @type {Set<CardPrint>}
* @memberof SpellCard
*/
'cardPrints': Set<CardPrint>;
/**
*
* @type {SpellCardType}
* @memberof SpellCard
*/
'subType': SpellCardType;
}

View File

@@ -0,0 +1,32 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export const TrapCardType = {
Normal: 'NORMAL',
Continuous: 'CONTINUOUS',
Counter: 'COUNTER'
} as const;
export type TrapCardType = typeof TrapCardType[keyof typeof TrapCardType];

View File

@@ -19,43 +19,52 @@ import type { CardPrint } from './card-print';
// May contain unused imports in some cases
// @ts-ignore
import type { CardType } from './card-type';
// May contain unused imports in some cases
// @ts-ignore
import type { TrapCardType } from './trap-card-type';
/**
*
* @export
* @interface NewCard
* @interface TrapCard
*/
export interface NewCard {
export interface TrapCard {
/**
*
* @type {number}
* @memberof NewCard
* @memberof TrapCard
*/
'id'?: number;
/**
*
* @type {CardType}
* @memberof NewCard
* @memberof TrapCard
*/
'cardType': CardType;
/**
*
* @type {string}
* @memberof NewCard
* @memberof TrapCard
*/
'description': string;
/**
*
* @type {string}
* @memberof NewCard
* @memberof TrapCard
*/
'name': string;
/**
*
* @type {Set<CardPrint>}
* @memberof NewCard
* @memberof TrapCard
*/
'cardPrints': Set<CardPrint>;
/**
*
* @type {TrapCardType}
* @memberof TrapCard
*/
'subType': TrapCardType;
}

View File

@@ -1,33 +0,0 @@
{
"name": "restClient",
"version": "0.0.1",
"description": "OpenAPI client for restClient",
"author": "OpenAPI-Generator Contributors",
"repository": {
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
},
"keywords": [
"axios",
"typescript",
"openapi-client",
"openapi-generator",
"restClient"
],
"license": "Unlicense",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"module": "./dist/esm/index.js",
"sideEffects": false,
"scripts": {
"build": "tsc && tsc -p tsconfig.esm.json",
"prepare": "npm run build"
},
"dependencies": {
"axios": "^1.6.1"
},
"devDependencies": {
"@types/node": "12.11.5 - 12.20.42",
"typescript": "^4.0 || ^5.0"
}
}

View File

@@ -0,0 +1,168 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { PageCardPrintDto } from '../model';
/**
* CardPrintService - axios parameter creator
* @export
*/
export const CardPrintServiceAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardPrintPage: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/prints`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (name !== undefined) {
localVarQueryParameter['name'] = name;
}
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* CardPrintService - functional programming interface
* @export
*/
export const CardPrintServiceFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = CardPrintServiceAxiosParamCreator(configuration)
return {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageCardPrintDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardPrintPage(name, page, pageSize, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['CardPrintService.getCardPrintPage']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* CardPrintService - factory interface
* @export
*/
export const CardPrintServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = CardPrintServiceFp(configuration)
return {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageCardPrintDto> {
return localVarFp.getCardPrintPage(name, page, pageSize, options).then((request) => request(axios, basePath));
},
};
};
/**
* CardPrintService - interface
* @export
* @interface CardPrintService
*/
export interface CardPrintServiceInterface {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CardPrintServiceInterface
*/
getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageCardPrintDto>;
}
/**
* CardPrintService - object-oriented interface
* @export
* @class CardPrintService
* @extends {BaseAPI}
*/
export class CardPrintService extends BaseAPI implements CardPrintServiceInterface {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CardPrintService
*/
public getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig) {
return CardPrintServiceFp(this.configuration).getCardPrintPage(name, page, pageSize, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -24,7 +24,9 @@ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError
// @ts-ignore
import type { Card } from '../model';
// @ts-ignore
import type { NewCard } from '../model';
import type { CardUpstreamFetchRequest } from '../model';
// @ts-ignore
import type { PageCardDto } from '../model';
/**
* CardService - axios parameter creator
* @export
@@ -33,16 +35,15 @@ export const CardServiceAxiosParamCreator = function (configuration?: Configurat
return {
/**
*
* @summary Test
* @param {number} id
* @summary Fetch Cards by ID or Name from any upstream service
* @param {CardUpstreamFetchRequest} cardUpstreamFetchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiCardsIdNewPut: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('apiCardsIdNewPut', 'id', id)
const localVarPath = `/api/cards/{id}/new`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
fetchUpstream: async (cardUpstreamFetchRequest: CardUpstreamFetchRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'cardUpstreamFetchRequest' is not null or undefined
assertParamExists('fetchUpstream', 'cardUpstreamFetchRequest', cardUpstreamFetchRequest)
const localVarPath = `/api/cards/fetch`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
@@ -50,15 +51,18 @@ export const CardServiceAxiosParamCreator = function (configuration?: Configurat
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(cardUpstreamFetchRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -142,7 +146,7 @@ export const CardServiceAxiosParamCreator = function (configuration?: Configurat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCards: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
getCardPage: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/cards`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -190,15 +194,15 @@ export const CardServiceFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Test
* @param {number} id
* @summary Fetch Cards by ID or Name from any upstream service
* @param {CardUpstreamFetchRequest} cardUpstreamFetchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiCardsIdNewPut(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.apiCardsIdNewPut(id, options);
async fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Card>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUpstream(cardUpstreamFetchRequest, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['CardService.apiCardsIdNewPut']?.[localVarOperationServerIndex]?.url;
const localVarOperationServerBasePath = operationServerMap['CardService.fetchUpstream']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
@@ -208,7 +212,7 @@ export const CardServiceFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCardById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NewCard>> {
async getCardById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Card>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardById(id, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['CardService.getCardById']?.[localVarOperationServerIndex]?.url;
@@ -236,10 +240,10 @@ export const CardServiceFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCards(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Card>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCards(name, page, pageSize, options);
async getCardPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageCardDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardPage(name, page, pageSize, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['CardService.getCards']?.[localVarOperationServerIndex]?.url;
const localVarOperationServerBasePath = operationServerMap['CardService.getCardPage']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
@@ -254,13 +258,13 @@ export const CardServiceFactory = function (configuration?: Configuration, baseP
return {
/**
*
* @summary Test
* @param {number} id
* @summary Fetch Cards by ID or Name from any upstream service
* @param {CardUpstreamFetchRequest} cardUpstreamFetchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiCardsIdNewPut(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp.apiCardsIdNewPut(id, options).then((request) => request(axios, basePath));
fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Card>> {
return localVarFp.fetchUpstream(cardUpstreamFetchRequest, options).then((request) => request(axios, basePath));
},
/**
*
@@ -269,7 +273,7 @@ export const CardServiceFactory = function (configuration?: Configuration, baseP
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<NewCard> {
getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Card> {
return localVarFp.getCardById(id, options).then((request) => request(axios, basePath));
},
/**
@@ -291,8 +295,8 @@ export const CardServiceFactory = function (configuration?: Configuration, baseP
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCards(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<Card>> {
return localVarFp.getCards(name, page, pageSize, options).then((request) => request(axios, basePath));
getCardPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageCardDto> {
return localVarFp.getCardPage(name, page, pageSize, options).then((request) => request(axios, basePath));
},
};
};
@@ -305,13 +309,13 @@ export const CardServiceFactory = function (configuration?: Configuration, baseP
export interface CardServiceInterface {
/**
*
* @summary Test
* @param {number} id
* @summary Fetch Cards by ID or Name from any upstream service
* @param {CardUpstreamFetchRequest} cardUpstreamFetchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CardServiceInterface
*/
apiCardsIdNewPut(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void>;
fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Card>>;
/**
*
@@ -321,7 +325,7 @@ export interface CardServiceInterface {
* @throws {RequiredError}
* @memberof CardServiceInterface
*/
getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<NewCard>;
getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Card>;
/**
*
@@ -343,7 +347,7 @@ export interface CardServiceInterface {
* @throws {RequiredError}
* @memberof CardServiceInterface
*/
getCards(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<Card>>;
getCardPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageCardDto>;
}
@@ -356,14 +360,14 @@ export interface CardServiceInterface {
export class CardService extends BaseAPI implements CardServiceInterface {
/**
*
* @summary Test
* @param {number} id
* @summary Fetch Cards by ID or Name from any upstream service
* @param {CardUpstreamFetchRequest} cardUpstreamFetchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CardService
*/
public apiCardsIdNewPut(id: number, options?: RawAxiosRequestConfig) {
return CardServiceFp(this.configuration).apiCardsIdNewPut(id, options).then((request) => request(this.axios, this.basePath));
public fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig) {
return CardServiceFp(this.configuration).fetchUpstream(cardUpstreamFetchRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
@@ -400,8 +404,8 @@ export class CardService extends BaseAPI implements CardServiceInterface {
* @throws {RequiredError}
* @memberof CardService
*/
public getCards(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig) {
return CardServiceFp(this.configuration).getCards(name, page, pageSize, options).then((request) => request(this.axios, this.basePath));
public getCardPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig) {
return CardServiceFp(this.configuration).getCardPage(name, page, pageSize, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -24,7 +24,9 @@ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError
// @ts-ignore
import type { Deck } from '../model';
// @ts-ignore
import type { PageDeck } from '../model';
import type { DeckCreateRequest } from '../model';
// @ts-ignore
import type { PageDeckDto } from '../model';
/**
* DeckService - axios parameter creator
* @export
@@ -72,13 +74,13 @@ export const DeckServiceAxiosParamCreator = function (configuration?: Configurat
/**
*
* @summary Create a Deck with a given name
* @param {Deck} deck
* @param {DeckCreateRequest} deckCreateRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createDeck: async (deck: Deck, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'deck' is not null or undefined
assertParamExists('createDeck', 'deck', deck)
createDeck: async (deckCreateRequest: DeckCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'deckCreateRequest' is not null or undefined
assertParamExists('createDeck', 'deckCreateRequest', deckCreateRequest)
const localVarPath = `/api/decks`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -98,7 +100,7 @@ export const DeckServiceAxiosParamCreator = function (configuration?: Configurat
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(deck, localVarRequestOptions, configuration)
localVarRequestOptions.data = serializeDataIfNeeded(deckCreateRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -211,12 +213,12 @@ export const DeckServiceFp = function(configuration?: Configuration) {
/**
*
* @summary Create a Deck with a given name
* @param {Deck} deck
* @param {DeckCreateRequest} deckCreateRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createDeck(deck: Deck, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createDeck(deck, options);
async createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createDeck(deckCreateRequest, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['DeckService.createDeck']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -243,7 +245,7 @@ export const DeckServiceFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageDeck>> {
async getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageDeckDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getDecks(name, page, pageSize, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['DeckService.getDecks']?.[localVarOperationServerIndex]?.url;
@@ -273,12 +275,12 @@ export const DeckServiceFactory = function (configuration?: Configuration, baseP
/**
*
* @summary Create a Deck with a given name
* @param {Deck} deck
* @param {DeckCreateRequest} deckCreateRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createDeck(deck: Deck, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp.createDeck(deck, options).then((request) => request(axios, basePath));
createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp.createDeck(deckCreateRequest, options).then((request) => request(axios, basePath));
},
/**
*
@@ -299,7 +301,7 @@ export const DeckServiceFactory = function (configuration?: Configuration, baseP
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageDeck> {
getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageDeckDto> {
return localVarFp.getDecks(name, page, pageSize, options).then((request) => request(axios, basePath));
},
};
@@ -325,12 +327,12 @@ export interface DeckServiceInterface {
/**
*
* @summary Create a Deck with a given name
* @param {Deck} deck
* @param {DeckCreateRequest} deckCreateRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DeckServiceInterface
*/
createDeck(deck: Deck, options?: RawAxiosRequestConfig): AxiosPromise<void>;
createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
/**
*
@@ -352,7 +354,7 @@ export interface DeckServiceInterface {
* @throws {RequiredError}
* @memberof DeckServiceInterface
*/
getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageDeck>;
getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageDeckDto>;
}
@@ -379,13 +381,13 @@ export class DeckService extends BaseAPI implements DeckServiceInterface {
/**
*
* @summary Create a Deck with a given name
* @param {Deck} deck
* @param {DeckCreateRequest} deckCreateRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DeckService
*/
public createDeck(deck: Deck, options?: RawAxiosRequestConfig) {
return DeckServiceFp(this.configuration).createDeck(deck, options).then((request) => request(this.axios, this.basePath));
public createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig) {
return DeckServiceFp(this.configuration).createDeck(deckCreateRequest, options).then((request) => request(this.axios, this.basePath));
}
/**

View File

@@ -0,0 +1,147 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
/**
* JobControllerService - axios parameter creator
* @export
*/
export const JobControllerServiceAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Get Deck By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiJobsNameGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'name' is not null or undefined
assertParamExists('apiJobsNameGet', 'name', name)
const localVarPath = `/api/jobs/{name}`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* JobControllerService - functional programming interface
* @export
*/
export const JobControllerServiceFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = JobControllerServiceAxiosParamCreator(configuration)
return {
/**
*
* @summary Get Deck By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiJobsNameGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.apiJobsNameGet(name, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['JobControllerService.apiJobsNameGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* JobControllerService - factory interface
* @export
*/
export const JobControllerServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = JobControllerServiceFp(configuration)
return {
/**
*
* @summary Get Deck By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiJobsNameGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
return localVarFp.apiJobsNameGet(name, options).then((request) => request(axios, basePath));
},
};
};
/**
* JobControllerService - interface
* @export
* @interface JobControllerService
*/
export interface JobControllerServiceInterface {
/**
*
* @summary Get Deck By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobControllerServiceInterface
*/
apiJobsNameGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<string>;
}
/**
* JobControllerService - object-oriented interface
* @export
* @class JobControllerService
* @extends {BaseAPI}
*/
export class JobControllerService extends BaseAPI implements JobControllerServiceInterface {
/**
*
* @summary Get Deck By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobControllerService
*/
public apiJobsNameGet(name: string, options?: RawAxiosRequestConfig) {
return JobControllerServiceFp(this.configuration).apiJobsNameGet(name, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -0,0 +1,307 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { JobDto } from '../model';
/**
* JobService - axios parameter creator
* @export
*/
export const JobServiceAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Get status of CardPrintImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardPrintImportJobStatusById: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getCardPrintImportJobStatusById', 'id', id)
const localVarPath = `/api/jobs/cardPrintImport/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get status of CardSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardSetImportJobStatusById: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getCardSetImportJobStatusById', 'id', id)
const localVarPath = `/api/jobs/cardSetImport/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get status of RegionalSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRegionalSetImportJobStatusById: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getRegionalSetImportJobStatusById', 'id', id)
const localVarPath = `/api/jobs/regionalSetImport/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* JobService - functional programming interface
* @export
*/
export const JobServiceFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = JobServiceAxiosParamCreator(configuration)
return {
/**
*
* @summary Get status of CardPrintImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardPrintImportJobStatusById(id, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['JobService.getCardPrintImportJobStatusById']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get status of CardSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardSetImportJobStatusById(id, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['JobService.getCardSetImportJobStatusById']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get status of RegionalSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getRegionalSetImportJobStatusById(id, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['JobService.getRegionalSetImportJobStatusById']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* JobService - factory interface
* @export
*/
export const JobServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = JobServiceFp(configuration)
return {
/**
*
* @summary Get status of CardPrintImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
return localVarFp.getCardPrintImportJobStatusById(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get status of CardSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
return localVarFp.getCardSetImportJobStatusById(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get status of RegionalSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
return localVarFp.getRegionalSetImportJobStatusById(id, options).then((request) => request(axios, basePath));
},
};
};
/**
* JobService - interface
* @export
* @interface JobService
*/
export interface JobServiceInterface {
/**
*
* @summary Get status of CardPrintImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceInterface
*/
getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto>;
/**
*
* @summary Get status of CardSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceInterface
*/
getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto>;
/**
*
* @summary Get status of RegionalSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceInterface
*/
getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto>;
}
/**
* JobService - object-oriented interface
* @export
* @class JobService
* @extends {BaseAPI}
*/
export class JobService extends BaseAPI implements JobServiceInterface {
/**
*
* @summary Get status of CardPrintImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobService
*/
public getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig) {
return JobServiceFp(this.configuration).getCardPrintImportJobStatusById(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get status of CardSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobService
*/
public getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig) {
return JobServiceFp(this.configuration).getCardSetImportJobStatusById(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get status of RegionalSetImportJob
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobService
*/
public getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig) {
return JobServiceFp(this.configuration).getRegionalSetImportJobStatusById(id, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -0,0 +1,407 @@
/* tslint:disable */
/* eslint-disable */
/**
* dex API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { PageSetDto } from '../model';
// @ts-ignore
import type { SetDto } from '../model';
/**
* SetService - axios parameter creator
* @export
*/
export const SetServiceAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Find Set By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSetsNameGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'name' is not null or undefined
assertParamExists('apiSetsNameGet', 'name', name)
const localVarPath = `/api/sets/{name}`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Fetch And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSetsNameNewGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'name' is not null or undefined
assertParamExists('apiSetsNameNewGet', 'name', name)
const localVarPath = `/api/sets/{name}/new`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Scrape And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSetsNameScrapeGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'name' is not null or undefined
assertParamExists('apiSetsNameScrapeGet', 'name', name)
const localVarPath = `/api/sets/{name}/scrape`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get a page of Card Sets with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardSetPage: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sets`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (name !== undefined) {
localVarQueryParameter['name'] = name;
}
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* SetService - functional programming interface
* @export
*/
export const SetServiceFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = SetServiceAxiosParamCreator(configuration)
return {
/**
*
* @summary Find Set By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSetsNameGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SetDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSetsNameGet(name, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Fetch And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSetsNameNewGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SetDto>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSetsNameNewGet(name, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameNewGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Scrape And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSetsNameScrapeGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSetsNameScrapeGet(name, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameScrapeGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get a page of Card Sets with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCardSetPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageSetDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardSetPage(name, page, pageSize, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SetService.getCardSetPage']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* SetService - factory interface
* @export
*/
export const SetServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = SetServiceFp(configuration)
return {
/**
*
* @summary Find Set By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSetsNameGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<SetDto> {
return localVarFp.apiSetsNameGet(name, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Fetch And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSetsNameNewGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<SetDto>> {
return localVarFp.apiSetsNameNewGet(name, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Scrape And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSetsNameScrapeGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp.apiSetsNameScrapeGet(name, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get a page of Card Sets with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardSetPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageSetDto> {
return localVarFp.getCardSetPage(name, page, pageSize, options).then((request) => request(axios, basePath));
},
};
};
/**
* SetService - interface
* @export
* @interface SetService
*/
export interface SetServiceInterface {
/**
*
* @summary Find Set By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetServiceInterface
*/
apiSetsNameGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<SetDto>;
/**
*
* @summary Fetch And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetServiceInterface
*/
apiSetsNameNewGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<SetDto>>;
/**
*
* @summary Scrape And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetServiceInterface
*/
apiSetsNameScrapeGet(name: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
/**
*
* @summary Get a page of Card Sets with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetServiceInterface
*/
getCardSetPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<PageSetDto>;
}
/**
* SetService - object-oriented interface
* @export
* @class SetService
* @extends {BaseAPI}
*/
export class SetService extends BaseAPI implements SetServiceInterface {
/**
*
* @summary Find Set By Name
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetService
*/
public apiSetsNameGet(name: string, options?: RawAxiosRequestConfig) {
return SetServiceFp(this.configuration).apiSetsNameGet(name, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Fetch And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetService
*/
public apiSetsNameNewGet(name: string, options?: RawAxiosRequestConfig) {
return SetServiceFp(this.configuration).apiSetsNameNewGet(name, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Scrape And Persist From Upstream
* @param {string} name
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetService
*/
public apiSetsNameScrapeGet(name: string, options?: RawAxiosRequestConfig) {
return SetServiceFp(this.configuration).apiSetsNameScrapeGet(name, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get a page of Card Sets with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SetService
*/
public getCardSetPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig) {
return SetServiceFp(this.configuration).getCardSetPage(name, page, pageSize, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -1,7 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "esnext",
"outDir": "dist/esm"
}
}

View File

@@ -1,18 +0,0 @@
{
"compilerOptions": {
"declaration": true,
"target": "ES6",
"module": "commonjs",
"noImplicitAny": true,
"outDir": "dist",
"rootDir": ".",
"moduleResolution": "node",
"typeRoots": [
"node_modules/@types"
]
},
"exclude": [
"dist",
"node_modules"
]
}

24
src/auth/oidcConfig.ts Normal file
View File

@@ -0,0 +1,24 @@
import type {UserManagerSettings} from "oidc-client-ts";
export const oidcConfig : UserManagerSettings = {
authority: 'https://auth.smoothbrain.win/application/o/dex/',
client_id: 'K202NAqkgfjceLZr28gAVQgJDc6RjZfdrE1jNx0K',
redirect_uri: 'http://localhost:5173/callback',
response_type: 'code',
scope: 'openid profile email',
post_logout_redirect_uri: 'http://localhost:5173', // Homepage URL
// automaticSilentRenew: true,
loadUserInfo: true,
automaticSilentRenew: true,
extraQueryParams: {
audience: 'https://auth.smoothbrain.win'
},
metadata: {
issuer: "https://auth.smoothbrain.win/application/o/dex/",
authorization_endpoint: "https://auth.smoothbrain.win/application/o/authorize/",
token_endpoint: "https://auth.smoothbrain.win/application/o/token/",
userinfo_endpoint: "https://auth.smoothbrain.win/application/o/userinfo/",
end_session_endpoint: "https://auth.smoothbrain.win/application/o/dex/end-session/",
jwks_uri: "https://auth.smoothbrain.win/application/o/dex/jwks/"
}
}

30
src/components.d.ts vendored
View File

@@ -8,11 +8,41 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
Accordion: typeof import('primevue/accordion')['default']
Avatar: typeof import('primevue/avatar')['default']
Badge: typeof import('primevue/badge')['default']
Button: typeof import('primevue/button')['default']
CardFilterPanel: typeof import('./components/CardFilterPanel.vue')['default']
CardListComponent: typeof import('./components/CardListComponent.vue')['default']
CardListExpansion: typeof import('./components/CardListExpansion.vue')['default']
CardTable: typeof import('./components/CardTable.vue')['default']
Carousel: typeof import('primevue/carousel')['default']
Column: typeof import('primevue/column')['default']
DataTable: typeof import('primevue/datatable')['default']
DataView: typeof import('primevue/dataview')['default']
DeckIcon: typeof import('./components/DeckIcon.vue')['default']
Divider: typeof import('primevue/divider')['default']
Fieldset: typeof import('primevue/fieldset')['default']
FloatLabel: typeof import('primevue/floatlabel')['default']
HelloWorld: typeof import('./components/HelloWorld.vue')['default']
IconField: typeof import('primevue/iconfield')['default']
Image: typeof import('primevue/image')['default']
InputIcon: typeof import('primevue/inputicon')['default']
InputText: typeof import('primevue/inputtext')['default']
LinkArrowsComponent: typeof import('./components/LinkArrowsComponent.vue')['default']
Listbox: typeof import('primevue/listbox')['default']
Menubar: typeof import('primevue/menubar')['default']
MultiSelect: typeof import('primevue/multiselect')['default']
Panel: typeof import('primevue/panel')['default']
Rating: typeof import('primevue/rating')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ScrollPanel: typeof import('primevue/scrollpanel')['default']
SplitButton: typeof import('primevue/splitbutton')['default']
Splitter: typeof import('primevue/splitter')['default']
SplitterPanel: typeof import('primevue/splitterpanel')['default']
TabPanel: typeof import('primevue/tabpanel')['default']
Tag: typeof import('primevue/tag')['default']
VirtualScroller: typeof import('primevue/virtualscroller')['default']
}
}

View File

@@ -0,0 +1,97 @@
<template>
<Panel
header="Search"
>
<FloatLabel variant="in">
<InputText
id="in_label"
v-model="searchValue"
@update="$emit('update:modelValue', $event.target.value)"
autocomplete="off"
/>
<label for="in_label">Search by Card name</label>
</FloatLabel>
<div
class="flex flex-row gap-2 mt-4"
>
<!-- Card Subtype-->
<Listbox
class="w-30"
v-model="selectedCardTypes"
:options="cardTypes"
multiple
optionLabel="name"
/>
<!-- Monster Card Subtype-->
<Listbox
class="w-30"
v-model="selectedMonsterCardTypes"
:options="monsterCardTypes"
multiple
:disabled="!selectedCardTypes.map(type => type.name).includes('Monster')"
/>
<!-- Trap Card Subtype-->
<Listbox
class="w-30"
v-model="selectedTrapCardTypes"
:options="trapCardTypes"
multiple
:disabled="!selectedCardTypes.map(type => type.name).includes('Trap')"
/>
<!-- Spell Card Subtype-->
<Listbox
class="w-30"
v-model="selectedSpellCardTypes"
:options="spellCardTypes"
multiple
:disabled="!selectedCardTypes.map(type => type.name).includes('Spell')"
/>
</div>
</Panel>
</template>
<script setup lang="ts">
import {computed, type Ref, ref, watch} from "vue";
import {MonsterCardType, SpellCardType, TrapCardType} from "../api/openapi";
type StringCardType = {
name: 'Monster' | 'Trap' | 'Spell'
};
const searchValue: Ref<string> = defineModel({
required: true,
})
const selectedCardTypes: Ref<StringCardType[]> = ref([]);
const selectedMonsterCardTypes: Ref<string[]> = ref([]);
const selectedSpellCardTypes: Ref<string[]> = ref([]);
const selectedTrapCardTypes: Ref<string[]> = ref([]);
const cardTypes = ref([
{name: 'Monster'},
{name: 'Trap'},
{name: 'Spell'}
]);
const monsterCardTypes: Ref<string[]> = ref(
Object.values(MonsterCardType)
);
const spellCardTypes: Ref<string[]> = ref(
Object.values(SpellCardType)
);
const trapCardTypes: Ref<string[]> = ref(
Object.values(TrapCardType)
);
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,41 @@
<template>
<div
class="flex flex-row items-center p-6 gap-4"
>
<div class="w-20 relative">
<Avatar image="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" class="mr-2" size="xlarge" shape="circle" />
</div>
<div class="flex flex-col md:flex-row justify-between md:items-center flex-1 gap-2">
<div class="flex flex-row md:flex-col justify-between items-start gap-2">
<div>
<div class="text-lg font-bold mt-2">{{ props.card.name }}</div>
</div>
<Tag
:value="getCardType(props.card)"
:severity="getCardTypeSeverity(props.card.cardType)"
></Tag>
</div>
<div class="flex flex-col md:items-end gap-8">
<div class="flex flex-row-reverse md:flex-row gap-2">
<Button icon="pi pi-heart" outlined></Button>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import type {Card} from "../api/openapi";
import {getCardType, getCardTypeSeverity} from "../util/card-type-util.ts";
interface Props {
card: Card
}
const props = defineProps<Props>()
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,127 @@
<template>
<Panel>
<Tabs value="0">
<TabList>
<Tab value="0" as="div" class="flex items-center gap-2">
<i class="pi pi-user"/>
<span class="font-bold whitespace-nowrap">Stats</span>
</Tab>
<Tab
:disabled="card.cardPrints.length === 0"
value="2"
as="div"
class="flex items-center gap-2"
>
<i class="pi pi-mobile"/>
<span class="font-bold whitespace-nowrap">Prints</span>
<Badge :value="card.cardPrints.length"/>
</Tab>
</TabList>
<TabPanels>
<TabPanel value="0">
<div class="flex flex-row">
<div class="flex flex-col justify-around ml-4 mt-2 w-[20%]">
<div class="flex items-center gap-2">
<i class="pi pi-star"/>
<Tag severity="danger" :value="card.subType"/>
</div>
<!-- Monster Card properties-->
<template v-if="isMonsterCard(card)">
<div class="flex items-center gap-2">
<i class="pi pi-asterisk"/>
<Tag severity="danger" :value="card.attribute"/>
</div>
<div class="flex items-center gap-2">
<i class="pi pi-asterisk"/>
<Tag severity="danger" :value="card.monsterType"/>
</div>
<div class="flex items-center gap-2" v-if="card.attack">
<i class="pi pi-shield"/>
<Tag severity="danger" :value="card.attack + ' ATK'"/>
</div>
<div class="flex items-center gap-2" v-if="card.defense">
<i class="pi pi-shield"/>
<Tag severity="danger" :value="card.defense + ' DEF'"/>
</div>
<div class="flex items-center gap-2" v-if="card.level">
<i class="pi pi-star"/>
<Tag severity="danger" :value="'Level ' + card.level"/>
</div>
<!-- Monster Card Mutations -->
<template v-if="card.isPendulum">
<div class="flex items-center gap-2">
<i class="pi pi-star"/>
<Tag severity="danger" :value="card.pendulumScale + ' Pendulum Scale'"/>
</div>
</template>
<template v-if="card.subType === 'LINK'">
<div class="flex items-center gap-2">
<i class="pi pi-star"/>
<Tag severity="danger" :value="card.linkValue + ' Link Value'"/>
</div>
<LinkArrowsComponent
class="ml-2 mt-6"
v-model="card.linkArrows"
/>
</template>
</template>
</div>
<Divider layout="vertical"/>
<div class="flex flex-col w-[80%] m-2 items-center">
<Fieldset
legend="Description / Effect"
class="m-2 min-h-40 text-center"
>
<p v-if="isMonsterCard(card)">
{{ card.monsterEffect }}
</p>
<p v-else>
{{ card.description }}
</p>
</Fieldset>
<Fieldset
v-if="isMonsterCard(card) && card.isPendulum"
legend="Pendulum Effect"
class="m-2 min-h-40 text-center"
>
<p class="">
{{ card.pendulumEffect }}
</p>
</Fieldset>
</div>
</div>
</TabPanel>
<TabPanel value="2">
<ul>
<li v-for="cardPrint in card.cardPrints">
{{ cardPrint.id }} - {{ cardPrint.name }}
</li>
</ul>
</TabPanel>
</TabPanels>
</Tabs>
</Panel>
</template>
<script setup lang="ts">
import Tabs from "primevue/tabs";
import TabPanels from "primevue/tabpanels";
import TabPanel from "primevue/tabpanel";
import Tab from "primevue/tab";
import TabList from "primevue/tablist";
import {type Card} from "../api/openapi";
import type {Ref} from "vue";
import {isMonsterCard} from "../util/card-type-util.ts";
const card: Ref<Card> = defineModel({
required: true
})
</script>

View File

@@ -0,0 +1,134 @@
<template>
<DataTable
tableStyle="min-width: 50rem"
dataKey="id"
paginator
lazy
removableSort
:expandedRows="expandedCardRows"
:value="cards"
:loading="loading"
:first="first"
:globalFilterFields="['name']"
:rows="5"
:rowsPerPageOptions="[5, 10, 20, 50]"
:totalRecords="totalRecords"
paginatorTemplate="RowsPerPageDropdown FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
currentPageReportTemplate="{first} to {last} of {totalPages} page(s)"
@page="handlePaging"
@sort="handleSorting"
@filter="handleFiltering"
@rowSelect="handleRowSelect"
>
<Column expander style="width: 5rem" />
<Column header="Image">
<template #body>
<Image alt="Image" preview>
<template #previewicon>
<i class="pi pi-search"></i>
</template>
<template #image>
<img src="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" alt="image" width="75" />
</template>
<template #preview="slotProps">
<img src="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>
<!-- <Avatar image="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" class="mr-2" size="xlarge" shape="circle" />-->
</template>
</Column>
<Column field="name" header="Name">
<template #body="slotProps">
<p class="font-bold">
{{slotProps.data.name}}
</p>
</template>
</Column>
<Column field="type" header="Type" filter>
<template #body="slotProps">
<Tag
:value="slotProps.data.cardType"
:severity="getCardTypeSeverity(slotProps.data.cardType)"
></Tag>
</template>
</Column>
<Column field="subType" header="Subtype">
<template #body="slotProps">
<Tag
:value="slotProps.data.subType"
:severity="getCardSubtypeSeverity(slotProps.data)"
></Tag>
</template>
</Column>
<template #expansion="slotProps">
<CardListExpansion v-model="slotProps.data"/>
</template>
<template #footer> In total there are {{ cards ? cards.length : 0 }} cards. </template>
</DataTable>
</template>
<script setup lang="ts">
import {inject, onMounted, ref, type Ref} from "vue";
import {type Card, CardService} from "../api/openapi";
import {getCardSubtypeSeverity, getCardTypeSeverity} from "../util/card-type-util.ts";
import {CardServiceKey} from "../main.ts";
import type {
DataTableFilterEvent,
DataTablePageEvent,
DataTableRowSelectEvent,
DataTableSortEvent
} from "primevue";
const cardService: CardService = inject(CardServiceKey) as CardService;
const cards: Ref<Card[]> = ref([])
const page: Ref<number> = ref(0);
const pageSize = ref(10);
const pageCount: Ref<number> = ref(0);
const totalRecords: Ref<number> = ref(0);
const loading: Ref<boolean> = ref(true);
const first = ref(0);
const expandedCardRows: Ref<Card[]> = ref([]);
const getGetCardPage = async (page: number, pageSize: number): Promise<void> => {
loading.value = true;
const cardPage = (await cardService.getCardPage(
null,
page,
pageSize
)).data
cards.value = cardPage.content
pageCount.value = cardPage.totalPages!!
totalRecords.value = cardPage.totalRecords!!
loading.value = false;
}
const handlePaging = async (e: DataTablePageEvent) => {
page.value = e.page;
pageSize.value = e.rows
await getGetCardPage(page.value, pageSize.value)
}
const handleSorting = (e: DataTableSortEvent) => {
console.log('sort')
}
const handleFiltering = (e: DataTableFilterEvent) => {
console.log('filter')
}
const handleRowSelect = (e: DataTableRowSelectEvent) => {
console.log('row selected')
console.log(JSON.stringify(e.data))
}
onMounted(async () => {
await getGetCardPage(page.value, pageSize.value)
})
</script>
<style scoped>
</style>

View File

@@ -1,35 +0,0 @@
<script setup lang="ts">
import { ref } from 'vue'
defineProps<{ msg: string }>()
const count = ref(0)
</script>
<template>
<h1>{{ msg }}</h1>
<div class="card">
<button type="button" @click="count++">count is {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test HMR
</p>
</div>
<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Learn more about IDE Support for Vue in the
<a
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
target="_blank"
>Vue Docs Scaling up Guide</a
>.
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
</template>

View File

@@ -0,0 +1,57 @@
<template>
<div class="flex flex-col">
<div class="flex flex-row">
<span :class="arrowClass('TOP_LEFT')">
north_west
</span>
<span :class="arrowClass('TOP')">
north
</span>
<span :class="arrowClass('TOP_RIGHT')">
north_east
</span>
</div>
<div class="flex flex-row">
<span :class="arrowClass('LEFT')">
west
</span>
<span :class="arrowClass('LEFT')"/>
<span :class="arrowClass('RIGHT')">
east
</span>
</div>
<div class="flex flex-row">
<span :class="arrowClass('BOTTOM_LEFT')">
south_west
</span>
<span :class="arrowClass('BOTTOM')">
south
</span>
<span :class="arrowClass('BOTTOM_RIGHT')">
south_east
</span>
</div>
</div>
</template>
<script setup lang="ts">
import type {LinkArrow} from "../api/openapi";
import type {Ref} from "vue";
const linkArrows: Ref<LinkArrow[]> = defineModel({
required: true,
})
const arrowClass = (linkArrow: LinkArrow) => {
return {
'material-icons': true,
'size-10': true,
'text-color-emphasis': isActive(linkArrow),
'text-neutral-600': !isActive(linkArrow),
}
}
const isActive = (linkArrow: LinkArrow): boolean => {
return linkArrows.value.includes(linkArrow)
}
</script>

View File

@@ -3,24 +3,26 @@ import './style.css'
import App from './App.vue'
import PrimeVue from 'primevue/config';
import Aura from '@primeuix/themes/aura';
import {createMemoryHistory, createRouter, type Router, type RouteRecordRaw} from "vue-router";
import {CardPrintService, CardService, DeckService, SetService} from "./api/openapi";
import {ToastService} from "primevue";
import {createPinia} from "pinia";
import {createRouter, createWebHistory, type Router, type RouteRecordRaw} from "vue-router";
import HomeView from "./views/HomeView.vue";
import {DeckService} from "./api/openapi";
import axios from "axios";
import CardsView from "./views/card/CardsView.vue";
import CardView from "./views/card/CardView.vue";
import DecksView from "./views/deck/DecksView.vue";
import DeckView from "./views/deck/DeckView.vue";
import Callback from "./views/Callback.vue";
import {useAuthStore} from "./stores/auth.ts";
import axiosInstance from "./api";
import SetsView from "./views/set/SetsView.vue";
const routes: RouteRecordRaw[] = [
{path: '/', component: HomeView}
]
const router: Router = createRouter({
history: createMemoryHistory(),
routes
})
export const axiosInstance = axios.create()
export const DeckServiceKey = Symbol("deckServiceKey")
export const CardServiceKey = Symbol("cardServiceKey")
export const SetServiceKey = Symbol("setServiceKey")
export const CardPrintServiceKey = Symbol("cardPrintServiceKey")
const deckService: DeckService = new DeckService(undefined, "http://localhost:8080", axiosInstance)
const pinia = createPinia();
const app = createApp(App);
app.use(PrimeVue, {
@@ -34,8 +36,54 @@ app.use(PrimeVue, {
}
}
});
app.use(pinia);
const authStore = useAuthStore();
authStore.initialize();
const userManager = authStore.userManager;
userManager.events.addAccessTokenExpired(async() => {
await userManager.signinRedirect()
})
const routes: RouteRecordRaw[] = [
{path: '/', component: HomeView},
{path: '/cards', component: CardsView, meta: {requiresAuth: true}},
{path: '/cards/:id', component: CardView, meta: {requiresAuth: true}},
{path: '/decks', component: DecksView, meta: {requiresAuth: true}},
{path: '/decks/:id', component: DeckView, meta: {requiresAuth: true}},
{path: '/sets', component: SetsView},
{path: '/sets/:id', component: DeckView, meta: {requiresAuth: true}},
{path: '/callback', component: Callback}
]
const router: Router = createRouter({
history: createWebHistory(),
routes
})
router.beforeEach(async (to) => {
if (to.meta.requiresAuth) {
const user = authStore.user;
if (!user) {
await authStore.login();
return false;
}
}
})
app.use(router);
app.use(ToastService)
const deckService: DeckService = new DeckService(undefined, "http://localhost:8080", axiosInstance)
const cardService: CardService = new CardService(undefined, "http://localhost:8080", axiosInstance)
const setService: SetService = new SetService(undefined, "http://localhost:8080", axiosInstance)
const cardPrintService: CardPrintService = new CardPrintService(undefined, "http://localhost:8080", axiosInstance)
app.provide(DeckServiceKey, deckService)
app.provide(CardServiceKey, cardService)
app.provide(SetServiceKey, setService)
app.provide(CardPrintServiceKey, cardPrintService)
app.mount('#app');

46
src/stores/auth.ts Normal file
View File

@@ -0,0 +1,46 @@
import { defineStore } from 'pinia'
import {type User, UserManager} from 'oidc-client-ts'
import { oidcConfig } from '../auth/oidcConfig'
export const userManager = new UserManager(oidcConfig) as UserManager
export const useAuthStore = defineStore('auth', {
state: () => ({
userManager: userManager,
user: null as User | null,
accessToken: null as string | null,
isAuthenticated: false as Boolean
}),
actions: {
initialize() {
this.userManager.getUser().then(user => {
if (user && !user.expired) {
this.user = user
this.accessToken = user.access_token
this.isAuthenticated = true
}
})
},
async login() {
await this.userManager.signinRedirect()
},
async handleCallback() {
const user = await this.userManager.signinRedirectCallback()
this.user = user
this.accessToken = user.access_token
this.isAuthenticated = true
return user
},
async logout() {
await this.userManager.signoutRedirect({
id_token_hint: this.user?.id_token,
post_logout_redirect_uri: oidcConfig.post_logout_redirect_uri,
});
this.$reset()
}
}
})

View File

@@ -1,5 +1,6 @@
@import "tailwindcss";
@import "tailwindcss-primeui";
@import 'primeicons/primeicons.css';
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
@@ -16,58 +17,6 @@
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
.card {
padding: 2em;
}
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;

118
src/util/card-type-util.ts Normal file
View File

@@ -0,0 +1,118 @@
import type {
Card,
CardType,
MonsterCard,
MonsterCardType,
SpellCard, SpellCardType,
TrapCard, TrapCardType
} from "../api/openapi";
export const getCardType = (card: Card) => {
switch (card.cardType) {
case "MONSTER":
return getMonsterCardType(card as MonsterCard)
case "SPELL":
return getSpellCardType(card as SpellCard)
case "TRAP":
return getTrapCardType(card as TrapCard)
default:
return "UNKNOWN"
}
}
export const isMonsterCard = (card: Card): card is MonsterCard => {
return card.cardType === "MONSTER"
}
export const isTrapCard = (card: Card): card is TrapCard => {
return card.cardType === "TRAP"
}
export const isSpellCard = (card: Card): card is SpellCard => {
return card.cardType === "SPELL"
}
export const getMonsterCardType = (monsterCard: MonsterCard) => {
return `${monsterCard.subType} MONSTER `
}
export const getSpellCardType = (spellCard: SpellCard) => {
return `${spellCard.subType} SPELL`
}
export const getTrapCardType = (trapCard: TrapCard) => {
return `${trapCard.subType} TRAP`
}
export const getCardTypeSeverity = (cardType: CardType): string => {
switch (cardType) {
case "MONSTER":
return "warn"
case "SPELL":
return "success"
case "TRAP":
return "danger"
default:
return "warning"
}
}
export const getCardSubtypeSeverity = (card: Card) => {
switch (card.cardType) {
case "MONSTER":
return getSeverityFromMonsterCardType((card as MonsterCard).subType)
case "SPELL":
return getSeverityFromSpellCardType((card as SpellCard).subType)
case "TRAP":
return getSeverityFromTrapCardType((card as TrapCard).subType)
default:
return "CONSTRAST"
}
}
export const getSeverityFromMonsterCardType = (monsterCardType: MonsterCardType) => {
switch (monsterCardType) {
case 'NORMAL':
return "secondary"
case 'EFFECT':
return "secondary"
case 'RITUAL':
return "info"
case 'FUSION':
return "info"
case 'SYNCHRO':
return "warn"
case 'XYZ':
return "danger"
case 'LINK':
return "contrast"
}
}
export const getSeverityFromSpellCardType = (spellCardType: SpellCardType) => {
switch (spellCardType) {
case 'NORMAL':
return "secondary"
case 'CONTINUOUS':
return "warn"
case 'EQUIP':
return "info"
case 'QUICK_PLAY':
return "success"
case 'FIELD':
return "success"
case 'RITUAL':
return "danger"
}
}
export const getSeverityFromTrapCardType = (trapCardType: TrapCardType) => {
switch (trapCardType) {
case 'NORMAL':
return "secondary"
case 'CONTINUOUS':
return "warn"
case 'COUNTER':
return "danger"
}
}

7
src/util/helpers.ts Normal file
View File

@@ -0,0 +1,7 @@
export function debounce<T extends (...args: any[]) => void>(fn: T, delay = 300): T {
let timer: ReturnType<typeof setTimeout> | null = null;
return function (this: any, ...args: any[]) {
if (timer) clearTimeout(timer);
timer = setTimeout(() => fn.apply(this, args), delay);
} as T;
}

26
src/views/Callback.vue Normal file
View File

@@ -0,0 +1,26 @@
<template>
<div>Processing login...</div>
</template>
<script setup lang="ts">
import {onMounted} from "vue";
import {useRouter} from "vue-router";
import {useAuthStore} from "../stores/auth.ts";
const router = useRouter();
const authStore = useAuthStore();
onMounted(async () => {
try {
await authStore.handleCallback()
await router.push('/'); // Redirect to home after login
} catch (error) {
console.error('Login callback error:', error);
await router.push('/error'); // Handle errors
}
});
</script>
<style scoped>
</style>

View File

@@ -1,30 +1,8 @@
<template>
<div class="flex w-full justify-end">
<div class="flex flex-col" v-for="deck of decks">
<Image
src="https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/f1ea70e0-6b84-41e0-945a-9388d618e4a0/dc0ha2k-570434cb-39a2-41c8-8bc0-d6e0333a4f28.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcL2YxZWE3MGUwLTZiODQtNDFlMC05NDVhLTkzODhkNjE4ZTRhMFwvZGMwaGEyay01NzA0MzRjYi0zOWEyLTQxYzgtOGJjMC1kNmUwMzMzYTRmMjgucG5nIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.pUHo0NNlqIO7VPFnb-GFSzQX4e1xmI5ArXJNZBCiIwg"
alt="Image"
width="250"
preview
/>
hi! {{ deck.name}}
</div>
</div>
</template>
<script setup lang="ts">
import {inject, onMounted, ref, type Ref} from "vue";
import {DeckServiceKey} from "../main.ts";
import {type Deck, DeckService} from "../api/openapi";
const deckService: DeckService = inject(DeckServiceKey) as DeckService;
const decks: Ref<Deck[]> = ref([]);
onMounted(async () => {
decks.value = (await deckService.getDecks()).data.content
})
</script>
<style scoped>

View File

@@ -1,41 +0,0 @@
<template>
<div class="card flex justify-center">
<VirtualScroller :items="lazyItems" :itemSize="50" showLoader :delay="250" :loading="lazyLoading" lazy @lazy-load="onLazyLoad" class="border border-surface-200 dark:border-surface-700 rounded" style="width: 200px; height: 200px">
<template v-slot:item="{ item, options }">
<div :class="['flex items-center p-2', { 'bg-surface-100 dark:bg-surface-700': options.odd }]" style="height: 50px">{{ item }}</div>
</template>
</VirtualScroller>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import type {VirtualScrollerLazyEvent} from "primevue";
const lazyItems = ref(Array.from({ length: 10000 }));
const lazyLoading = ref(false);
const loadLazyTimeout = ref();
const onLazyLoad = (event: VirtualScrollerLazyEvent) => {
lazyLoading.value = true;
if (loadLazyTimeout.value) {
clearTimeout(loadLazyTimeout.value);
}
//imitate delay of a backend call
loadLazyTimeout.value = setTimeout(() => {
const { first, last } = event;
const _lazyItems = [...lazyItems.value];
for (let i = first; i < last; i++) {
_lazyItems[i] = `Item #${i}`;
}
lazyItems.value = _lazyItems;
lazyLoading.value = false;
}, Math.random() * 1000 + 250);
};
</script>

View File

@@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped>
</style>

View File

@@ -0,0 +1,150 @@
<template>
<div class="flex w-full">
<DataTable
class="mt-4 ml-4 w-[60%]"
tableStyle="min-width: 50rem"
dataKey="id"
paginator
lazy
removableSort
:expandedRows="expandedCardRows"
:value="cards"
:loading="loading"
:first="first"
:globalFilterFields="['name']"
:rows="5"
:rowsPerPageOptions="[5, 10, 20, 50]"
:totalRecords="totalRecords"
paginatorTemplate="RowsPerPageDropdown FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
currentPageReportTemplate="{first} to {last} of {totalPages} page(s)"
@page="handlePaging"
@sort="handleSorting"
@filter="handleFiltering"
@rowSelect="handleRowSelect"
>
<Column expander style="width: 5rem" />
<Column header="Image">
<template #body>
<Image alt="Image" preview>
<template #previewicon>
<i class="pi pi-search"></i>
</template>
<template #image>
<img src="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" alt="image" width="75" />
</template>
<template #preview="slotProps">
<img src="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>
<!-- <Avatar image="https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg" class="mr-2" size="xlarge" shape="circle" />-->
</template>
</Column>
<Column field="name" header="Name">
<template #body="slotProps">
<p class="font-bold">
{{slotProps.data.name}}
</p>
</template>
</Column>
<Column field="type" header="Type" filter>
<template #body="slotProps">
<Tag
:value="slotProps.data.cardType"
:severity="getCardTypeSeverity(slotProps.data.cardType)"
></Tag>
</template>
</Column>
<Column field="subType" header="Subtype">
<template #body="slotProps">
<Tag
:value="slotProps.data.subType"
:severity="getCardSubtypeSeverity(slotProps.data)"
></Tag>
</template>
</Column>
<template #expansion="slotProps">
<CardListExpansion v-model="slotProps.data"/>
</template>
<template #footer> In total there are {{ cards ? cards.length : 0 }} cards. </template>
</DataTable>
<CardFilterPanel
v-model="searchValue"
class="fixed right-0 w-[35%] m-4"
/>
</div>
</template>
<script setup lang="ts">
import CardFilterPanel from "../../components/CardFilterPanel.vue";
import {getCardSubtypeSeverity, getCardTypeSeverity} from "../../util/card-type-util.ts";
import {type Card, CardService} from "../../api/openapi";
import {inject, onMounted, ref, type Ref, watch} from "vue";
import {CardServiceKey} from "../../main.ts";
import type {
DataTableFilterEvent,
DataTablePageEvent,
DataTableRowSelectEvent,
DataTableSortEvent
} from "primevue";
import {useDebounceFn} from "@vueuse/core";
const cardService: CardService = inject(CardServiceKey) as CardService;
const cards: Ref<Card[]> = ref([])
const page: Ref<number> = ref(0);
const pageSize = ref(10);
const pageCount: Ref<number> = ref(0);
const totalRecords: Ref<number> = ref(0);
const loading: Ref<boolean> = ref(true);
const first = ref(0);
const expandedCardRows: Ref<Card[]> = ref([]);
const searchValue: Ref<string> = ref("");
const getGetCardPage = async (page: number, pageSize: number, cardName: string): Promise<void> => {
loading.value = true;
const cardPage = (await cardService.getCardPage(
cardName,
page,
pageSize
)).data
cards.value = cardPage.content
pageCount.value = cardPage.totalPages!!
totalRecords.value = cardPage.totalRecords!!
loading.value = false;
}
const handlePaging = async (e: DataTablePageEvent) => {
page.value = e.page;
pageSize.value = e.rows
await getGetCardPage(page.value, pageSize.value, searchValue.value)
}
const handleSorting = (e: DataTableSortEvent) => {
console.log('sort')
}
const handleFiltering = (e: DataTableFilterEvent) => {
console.log('filter')
}
const handleRowSelect = (e: DataTableRowSelectEvent) => {
console.log('row selected')
console.log(JSON.stringify(e.data))
}
const debouncedGetCardPage = useDebounceFn(getGetCardPage, 150)
watch(searchValue, async (newSearchValue) => {
await debouncedGetCardPage(
page.value,
pageSize.value,
newSearchValue
)
})
onMounted(async () => {
await getGetCardPage(page.value, pageSize.value, searchValue.value)
})
</script>

View File

@@ -0,0 +1,15 @@
<template>
<p>
Im Deck '{{ route.params.id }}'
</p>
</template>
<script setup lang="ts">
import {useRoute} from "vue-router";
const route = useRoute()
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,76 @@
<template>
<div class="card">
<Carousel :value="decks" :numVisible="3" :numScroll="3">
<template #item="slotProps">
<div class="border border-surface-200 dark:border-surface-700 rounded m-2 p-4 w-96 h-auto">
<div class="mb-4">
<div class="relative mx-auto">
<img
:src="'https://upload.wikimedia.org/wikipedia/en/2/2b/Yugioh_Card_Back.jpg?20201122212343'"
class="w-full rounded"
alt="Deck"
/>
</div>
</div>
<div class="flex justify-between ">
<p class="font-bold">
{{ slotProps.data.name }}
</p>
<Tag
value="[ARCHETYPE]"
/>
</div>
<div class="flex justify- items-center">
<SplitButton
label="View"
:model="deckMenuItems"
@click="viewDeck(slotProps.data.id)"
/>
</div>
</div>
</template>
</Carousel>
</div>
</template>
<script setup lang="ts">
import {type Deck, DeckService} from "../../api/openapi";
import {DeckServiceKey} from "../../main.ts";
import {inject, onMounted, ref, type Ref} from "vue";
import {useToast} from "primevue";
import {useRouter} from "vue-router";
const toast = useToast();
const router = useRouter();
const deckService: DeckService = inject(DeckServiceKey) as DeckService;
const decks: Ref<Deck[]> = ref([])
const deckMenuItems = [
{
label: 'Edit',
command: () => {
toast.add({
severity: 'info',
summary: 'Not Implemented',
detail: 'Deck Editing isn\'t implemented yet',
life: 3000
});
}
},
]
const viewDeck = (deckId: number) => {
router.push(`/decks/${deckId}`);
}
onMounted(async () => {
const decksResponse = await deckService.getDecks()
decks.value = decksResponse.data.content
})
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,99 @@
<template>
<DataTable
tableStyle="min-width: 50rem"
dataKey="id"
paginator
lazy
selectionMode="single"
:value="sets"
:loading="loading"
:first="first"
:rows="5"
:rowsPerPageOptions="[5, 10, 20, 50]"
:totalRecords="totalRecords"
paginatorTemplate="RowsPerPageDropdown FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
currentPageReportTemplate="{first} to {last} of {totalPages} page(s)"
@page="handlePaging"
@sort="handleSorting"
>
<Column header="Image">
<template #body>
<Image alt="Image" preview class="h-64">
<template #previewicon>
<i class="pi pi-search"></i>
</template>
<template #image>
<div class="overflow-hidden">
<img src="https://comicbook.com/wp-content/uploads/sites/4/2024/11/YuGiOh-Early-Days-Collection.png?resize=2000,1125" alt="image" width="650" height="650"/>
</div>
</template>
<template #preview="slotProps">
<img src="https://comicbook.com/wp-content/uploads/sites/4/2024/11/YuGiOh-Early-Days-Collection.png?resize=2000,1125" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>
</template>
</Column>
<Column field="name" header="Name">
<template #body="slotProps">
<p class="font-bold">
{{slotProps.data.name}}
</p>
</template>
</Column>
<Column header="No. of Regional Sets">
<template #body="slotProps">
{{ slotProps.data.regionalSets.length }}
</template>
</Column>
<template #footer> In total there are {{ sets ? sets.length : 0 }} Card Sets </template>
</DataTable>
</template>
<script setup lang="ts">
import {type SetDto, SetService} from "../../api/openapi";
import {inject, onMounted, ref, type Ref} from "vue";
import {SetServiceKey} from "../../main.ts";
import type {DataTablePageEvent, DataTableSortEvent} from "primevue";
const setService: SetService = inject(SetServiceKey) as SetService;
const loading: Ref<boolean> = ref(true);
const sets: Ref<SetDto[]> = ref([])
const page: Ref<number> = ref(0);
const pageSize = ref(10);
const pageCount: Ref<number> = ref(0);
const totalRecords: Ref<number> = ref(0);
const first = ref(0);
const fetchCardSetPage = async (page: number, pageSize: number): Promise<void> => {
loading.value = true;
const cardPage = (await setService.getCardSetPage(
null,
page,
pageSize
)).data
sets.value = cardPage.content
pageCount.value = cardPage.totalPages!!
totalRecords.value = cardPage.totalRecords!!
loading.value = false;
}
const handlePaging = async (e: DataTablePageEvent) => {
page.value = e.page;
pageSize.value = e.rows
await fetchCardSetPage(page.value, pageSize.value)
}
const handleSorting = (e: DataTableSortEvent) => {
console.log('sort')
}
onMounted(async () => {
await fetchCardSetPage(page.value, pageSize.value)
})
</script>
<style scoped>
</style>