From 54a4f7e08a7f1e276ac63d5b561c75d25045ad55 Mon Sep 17 00:00:00 2001 From: Katarina Date: Sat, 5 Jul 2025 22:32:52 +0200 Subject: [PATCH] Add OpenAPI --- index.html | 4 + openapitools.json | 5 +- package-lock.json | 309 +++++++++++-- package.json | 8 +- src/App.vue | 94 +++- src/api/index.ts | 27 ++ src/api/openapi/.openapi-generator/FILES | 57 ++- src/api/openapi/README.md | 81 ---- src/api/openapi/api.ts | 3 + src/api/openapi/docs/Attribute.md | 20 + src/api/openapi/docs/Card.md | 50 ++- src/api/openapi/docs/CardPrint.md | 16 +- src/api/openapi/docs/CardPrintService.md | 64 +++ src/api/openapi/docs/CardService.md | 48 ++- .../openapi/docs/CardUpstreamFetchRequest.md | 26 ++ src/api/openapi/docs/Deck.md | 6 +- src/api/openapi/docs/DeckCreateRequest.md | 20 + src/api/openapi/docs/DeckService.md | 22 +- src/api/openapi/docs/JobControllerService.md | 58 +++ src/api/openapi/docs/JobDto.md | 30 ++ src/api/openapi/docs/JobService.md | 160 +++++++ src/api/openapi/docs/JobStatus.md | 14 + src/api/openapi/docs/LinkArrow.md | 22 + src/api/openapi/docs/MonsterCard.md | 52 +++ src/api/openapi/docs/MonsterCardType.md | 20 + src/api/openapi/docs/MonsterType.md | 58 +++ src/api/openapi/docs/{PageDeck.md => Page.md} | 11 +- src/api/openapi/docs/PageCardDto.md | 29 ++ src/api/openapi/docs/PageCardPrintDto.md | 29 ++ src/api/openapi/docs/PageDeckDto.md | 29 ++ src/api/openapi/docs/PageSetDto.md | 29 ++ src/api/openapi/docs/Region.md | 40 +- src/api/openapi/docs/RegionCodeAlias.md | 24 ++ src/api/openapi/docs/RegionalSet.md | 10 +- src/api/openapi/docs/SetDto.md | 20 + src/api/openapi/docs/SetPrefix.md | 6 +- src/api/openapi/docs/SetService.md | 217 ++++++++++ src/api/openapi/docs/SpellCard.md | 30 ++ src/api/openapi/docs/SpellCardType.md | 18 + .../openapi/docs/{NewCard.md => TrapCard.md} | 8 +- src/api/openapi/docs/TrapCardType.md | 12 + src/api/openapi/model/attribute.ts | 36 ++ src/api/openapi/model/card-print.ts | 36 +- .../model/card-upstream-fetch-request.ts | 48 +++ src/api/openapi/model/card.ts | 118 ++--- src/api/openapi/model/deck-create-request.ts | 30 ++ src/api/openapi/model/deck.ts | 7 +- src/api/openapi/model/index.ts | 23 +- src/api/openapi/model/job-dto.ts | 65 +++ src/api/openapi/model/job-status.ts | 33 ++ src/api/openapi/model/link-arrow.ts | 37 ++ src/api/openapi/model/monster-card-type.ts | 36 ++ src/api/openapi/model/monster-card.ts | 146 +++++++ src/api/openapi/model/monster-type.ts | 55 +++ src/api/openapi/model/page-card-dto.ts | 57 +++ src/api/openapi/model/page-card-print-dto.ts | 57 +++ .../model/{page-deck.ts => page-deck-dto.ts} | 22 +- src/api/openapi/model/page-set-dto.ts | 57 +++ src/api/openapi/model/page.ts | 54 +++ src/api/openapi/model/region-code-alias.ts | 47 ++ src/api/openapi/model/region.ts | 46 +- src/api/openapi/model/regional-set.ts | 20 +- src/api/openapi/model/set-dto.ts | 30 ++ src/api/openapi/model/set-prefix.ts | 11 +- src/api/openapi/model/spell-card-type.ts | 35 ++ src/api/openapi/model/spell-card.ts | 71 +++ src/api/openapi/model/trap-card-type.ts | 32 ++ .../model/{new-card.ts => trap-card.ts} | 23 +- src/api/openapi/package.json | 33 -- src/api/openapi/service/card-print-service.ts | 168 ++++++++ src/api/openapi/service/card-service.ts | 78 ++-- src/api/openapi/service/deck-service.ts | 42 +- .../openapi/service/job-controller-service.ts | 147 +++++++ src/api/openapi/service/job-service.ts | 307 +++++++++++++ src/api/openapi/service/set-service.ts | 407 ++++++++++++++++++ src/api/openapi/tsconfig.esm.json | 7 - src/api/openapi/tsconfig.json | 18 - src/auth/oidcConfig.ts | 24 ++ src/components.d.ts | 30 ++ src/components/CardFilterPanel.vue | 97 +++++ src/components/CardListComponent.vue | 41 ++ src/components/CardListExpansion.vue | 127 ++++++ src/components/CardTable.vue | 134 ++++++ src/components/HelloWorld.vue | 35 -- src/components/LinkArrowsComponent.vue | 57 +++ src/main.ts | 76 +++- src/stores/auth.ts | 46 ++ src/style.css | 53 +-- src/util/card-type-util.ts | 118 +++++ src/util/helpers.ts | 7 + src/views/Callback.vue | 26 ++ src/views/HomeView.vue | 24 +- src/views/Playground.vue | 41 -- src/views/card/CardView.vue | 11 + src/views/card/CardsView.vue | 150 +++++++ src/views/deck/DeckView.vue | 15 + src/views/deck/DecksView.vue | 76 ++++ src/views/set/SetsView.vue | 99 +++++ 98 files changed, 4816 insertions(+), 696 deletions(-) create mode 100644 src/api/index.ts delete mode 100644 src/api/openapi/README.md create mode 100644 src/api/openapi/docs/Attribute.md create mode 100644 src/api/openapi/docs/CardPrintService.md create mode 100644 src/api/openapi/docs/CardUpstreamFetchRequest.md create mode 100644 src/api/openapi/docs/DeckCreateRequest.md create mode 100644 src/api/openapi/docs/JobControllerService.md create mode 100644 src/api/openapi/docs/JobDto.md create mode 100644 src/api/openapi/docs/JobService.md create mode 100644 src/api/openapi/docs/JobStatus.md create mode 100644 src/api/openapi/docs/LinkArrow.md create mode 100644 src/api/openapi/docs/MonsterCard.md create mode 100644 src/api/openapi/docs/MonsterCardType.md create mode 100644 src/api/openapi/docs/MonsterType.md rename src/api/openapi/docs/{PageDeck.md => Page.md} (69%) create mode 100644 src/api/openapi/docs/PageCardDto.md create mode 100644 src/api/openapi/docs/PageCardPrintDto.md create mode 100644 src/api/openapi/docs/PageDeckDto.md create mode 100644 src/api/openapi/docs/PageSetDto.md create mode 100644 src/api/openapi/docs/RegionCodeAlias.md create mode 100644 src/api/openapi/docs/SetDto.md create mode 100644 src/api/openapi/docs/SetService.md create mode 100644 src/api/openapi/docs/SpellCard.md create mode 100644 src/api/openapi/docs/SpellCardType.md rename src/api/openapi/docs/{NewCard.md => TrapCard.md} (80%) create mode 100644 src/api/openapi/docs/TrapCardType.md create mode 100644 src/api/openapi/model/attribute.ts create mode 100644 src/api/openapi/model/card-upstream-fetch-request.ts create mode 100644 src/api/openapi/model/deck-create-request.ts create mode 100644 src/api/openapi/model/job-dto.ts create mode 100644 src/api/openapi/model/job-status.ts create mode 100644 src/api/openapi/model/link-arrow.ts create mode 100644 src/api/openapi/model/monster-card-type.ts create mode 100644 src/api/openapi/model/monster-card.ts create mode 100644 src/api/openapi/model/monster-type.ts create mode 100644 src/api/openapi/model/page-card-dto.ts create mode 100644 src/api/openapi/model/page-card-print-dto.ts rename src/api/openapi/model/{page-deck.ts => page-deck-dto.ts} (71%) create mode 100644 src/api/openapi/model/page-set-dto.ts create mode 100644 src/api/openapi/model/page.ts create mode 100644 src/api/openapi/model/region-code-alias.ts create mode 100644 src/api/openapi/model/set-dto.ts create mode 100644 src/api/openapi/model/spell-card-type.ts create mode 100644 src/api/openapi/model/spell-card.ts create mode 100644 src/api/openapi/model/trap-card-type.ts rename src/api/openapi/model/{new-card.ts => trap-card.ts} (71%) delete mode 100644 src/api/openapi/package.json create mode 100644 src/api/openapi/service/card-print-service.ts create mode 100644 src/api/openapi/service/job-controller-service.ts create mode 100644 src/api/openapi/service/job-service.ts create mode 100644 src/api/openapi/service/set-service.ts delete mode 100644 src/api/openapi/tsconfig.esm.json delete mode 100644 src/api/openapi/tsconfig.json create mode 100644 src/auth/oidcConfig.ts create mode 100644 src/components/CardFilterPanel.vue create mode 100644 src/components/CardListComponent.vue create mode 100644 src/components/CardListExpansion.vue create mode 100644 src/components/CardTable.vue delete mode 100644 src/components/HelloWorld.vue create mode 100644 src/components/LinkArrowsComponent.vue create mode 100644 src/stores/auth.ts create mode 100644 src/util/card-type-util.ts create mode 100644 src/util/helpers.ts create mode 100644 src/views/Callback.vue delete mode 100644 src/views/Playground.vue create mode 100644 src/views/card/CardView.vue create mode 100644 src/views/card/CardsView.vue create mode 100644 src/views/deck/DeckView.vue create mode 100644 src/views/deck/DecksView.vue create mode 100644 src/views/set/SetsView.vue diff --git a/index.html b/index.html index dde16aa..d5ad5b5 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,10 @@ Vite + Vue + TS +
diff --git a/openapitools.json b/openapitools.json index 4278655..624d047 100644 --- a/openapitools.json +++ b/openapitools.json @@ -13,9 +13,8 @@ "apiPackage": "service", "modelPackage": "model", "withSeparateModelsAndApi": true, - "npmName": "restClient", - "supportsES6": "true", - "withInterfaces": true + "supportsES6": true, + "withInterfaces": false } } } diff --git a/package-lock.json b/package-lock.json index 5c233f7..dbf747c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index fcf8c1b..021b020 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/App.vue b/src/App.vue index 11e29b5..c661a41 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,19 +1,81 @@ - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000..6625b53 --- /dev/null +++ b/src/api/index.ts @@ -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; \ No newline at end of file diff --git a/src/api/openapi/.openapi-generator/FILES b/src/api/openapi/.openapi-generator/FILES index 469e2ae..2d43e14 100644 --- a/src/api/openapi/.openapi-generator/FILES +++ b/src/api/openapi/.openapi-generator/FILES @@ -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 diff --git a/src/api/openapi/README.md b/src/api/openapi/README.md deleted file mode 100644 index 3a1b24e..0000000 --- a/src/api/openapi/README.md +++ /dev/null @@ -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) - - - -## Documentation For Authorization - -Endpoints do not require authorization. - diff --git a/src/api/openapi/api.ts b/src/api/openapi/api.ts index 4941c35..f9563de 100644 --- a/src/api/openapi/api.ts +++ b/src/api/openapi/api.ts @@ -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'; diff --git a/src/api/openapi/docs/Attribute.md b/src/api/openapi/docs/Attribute.md new file mode 100644 index 0000000..9286179 --- /dev/null +++ b/src/api/openapi/docs/Attribute.md @@ -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) diff --git a/src/api/openapi/docs/Card.md b/src/api/openapi/docs/Card.md index b3a429b..3331515 100644 --- a/src/api/openapi/docs/Card.md +++ b/src/api/openapi/docs/Card.md @@ -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<CardPrint>**](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<LinkArrow>**](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, }; ``` diff --git a/src/api/openapi/docs/CardPrint.md b/src/api/openapi/docs/CardPrint.md index 6662212..6ad7837 100644 --- a/src/api/openapi/docs/CardPrint.md +++ b/src/api/openapi/docs/CardPrint.md @@ -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, }; ``` diff --git a/src/api/openapi/docs/CardPrintService.md b/src/api/openapi/docs/CardPrintService.md new file mode 100644 index 0000000..630e66b --- /dev/null +++ b/src/api/openapi/docs/CardPrintService.md @@ -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) + diff --git a/src/api/openapi/docs/CardService.md b/src/api/openapi/docs/CardService.md index c07f951..77091ba 100644 --- a/src/api/openapi/docs/CardService.md +++ b/src/api/openapi/docs/CardService.md @@ -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 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** ### 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 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** +**PageCardDto** ### Authorization diff --git a/src/api/openapi/docs/CardUpstreamFetchRequest.md b/src/api/openapi/docs/CardUpstreamFetchRequest.md new file mode 100644 index 0000000..fb9b890 --- /dev/null +++ b/src/api/openapi/docs/CardUpstreamFetchRequest.md @@ -0,0 +1,26 @@ +# CardUpstreamFetchRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **Array<string>** | | [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) diff --git a/src/api/openapi/docs/Deck.md b/src/api/openapi/docs/Deck.md index c45223b..c379fca 100644 --- a/src/api/openapi/docs/Deck.md +++ b/src/api/openapi/docs/Deck.md @@ -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<CardPrint>**](CardPrint.md) | | [default to undefined] ## Example ```typescript -import { Deck } from 'restClient'; +import { Deck } from './api'; const instance: Deck = { id, name, - cards, + prints, }; ``` diff --git a/src/api/openapi/docs/DeckCreateRequest.md b/src/api/openapi/docs/DeckCreateRequest.md new file mode 100644 index 0000000..030ab57 --- /dev/null +++ b/src/api/openapi/docs/DeckCreateRequest.md @@ -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) diff --git a/src/api/openapi/docs/DeckService.md b/src/api/openapi/docs/DeckService.md index 8409d2a..89025fd 100644 --- a/src/api/openapi/docs/DeckService.md +++ b/src/api/openapi/docs/DeckService.md @@ -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 diff --git a/src/api/openapi/docs/JobControllerService.md b/src/api/openapi/docs/JobControllerService.md new file mode 100644 index 0000000..b686d8c --- /dev/null +++ b/src/api/openapi/docs/JobControllerService.md @@ -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) + diff --git a/src/api/openapi/docs/JobDto.md b/src/api/openapi/docs/JobDto.md new file mode 100644 index 0000000..2a16484 --- /dev/null +++ b/src/api/openapi/docs/JobDto.md @@ -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) diff --git a/src/api/openapi/docs/JobService.md b/src/api/openapi/docs/JobService.md new file mode 100644 index 0000000..524b0fc --- /dev/null +++ b/src/api/openapi/docs/JobService.md @@ -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) + diff --git a/src/api/openapi/docs/JobStatus.md b/src/api/openapi/docs/JobStatus.md new file mode 100644 index 0000000..6f616f6 --- /dev/null +++ b/src/api/openapi/docs/JobStatus.md @@ -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) diff --git a/src/api/openapi/docs/LinkArrow.md b/src/api/openapi/docs/LinkArrow.md new file mode 100644 index 0000000..a1ac4b1 --- /dev/null +++ b/src/api/openapi/docs/LinkArrow.md @@ -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) diff --git a/src/api/openapi/docs/MonsterCard.md b/src/api/openapi/docs/MonsterCard.md new file mode 100644 index 0000000..2ddcc59 --- /dev/null +++ b/src/api/openapi/docs/MonsterCard.md @@ -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<CardPrint>**](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<LinkArrow>**](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) diff --git a/src/api/openapi/docs/MonsterCardType.md b/src/api/openapi/docs/MonsterCardType.md new file mode 100644 index 0000000..746c5af --- /dev/null +++ b/src/api/openapi/docs/MonsterCardType.md @@ -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) diff --git a/src/api/openapi/docs/MonsterType.md b/src/api/openapi/docs/MonsterType.md new file mode 100644 index 0000000..848b094 --- /dev/null +++ b/src/api/openapi/docs/MonsterType.md @@ -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) diff --git a/src/api/openapi/docs/PageDeck.md b/src/api/openapi/docs/Page.md similarity index 69% rename from src/api/openapi/docs/PageDeck.md rename to src/api/openapi/docs/Page.md index ec5dc47..240fc42 100644 --- a/src/api/openapi/docs/PageDeck.md +++ b/src/api/openapi/docs/Page.md @@ -1,25 +1,28 @@ -# PageDeck +# Page +Page of items ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**Array<Deck>**](Deck.md) | | [default to undefined] +**content** | **Array<any>** | 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, }; ``` diff --git a/src/api/openapi/docs/PageCardDto.md b/src/api/openapi/docs/PageCardDto.md new file mode 100644 index 0000000..aa85ff7 --- /dev/null +++ b/src/api/openapi/docs/PageCardDto.md @@ -0,0 +1,29 @@ +# PageCardDto + +Page of items + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**Array<Card>**](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) diff --git a/src/api/openapi/docs/PageCardPrintDto.md b/src/api/openapi/docs/PageCardPrintDto.md new file mode 100644 index 0000000..8cb4907 --- /dev/null +++ b/src/api/openapi/docs/PageCardPrintDto.md @@ -0,0 +1,29 @@ +# PageCardPrintDto + +Page of items + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**Array<CardPrint>**](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) diff --git a/src/api/openapi/docs/PageDeckDto.md b/src/api/openapi/docs/PageDeckDto.md new file mode 100644 index 0000000..a85165d --- /dev/null +++ b/src/api/openapi/docs/PageDeckDto.md @@ -0,0 +1,29 @@ +# PageDeckDto + +Page of items + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**Array<Deck>**](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) diff --git a/src/api/openapi/docs/PageSetDto.md b/src/api/openapi/docs/PageSetDto.md new file mode 100644 index 0000000..c6245de --- /dev/null +++ b/src/api/openapi/docs/PageSetDto.md @@ -0,0 +1,29 @@ +# PageSetDto + +Page of items + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**Array<SetDto>**](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) diff --git a/src/api/openapi/docs/Region.md b/src/api/openapi/docs/Region.md index 5b4fe4e..26bea94 100644 --- a/src/api/openapi/docs/Region.md +++ b/src/api/openapi/docs/Region.md @@ -1,24 +1,34 @@ # Region -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **number** | | [default to undefined] -**name** | **string** | | [default to undefined] -**regionalSets** | [**Set<RegionalSet>**](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) diff --git a/src/api/openapi/docs/RegionCodeAlias.md b/src/api/openapi/docs/RegionCodeAlias.md new file mode 100644 index 0000000..7ba18c5 --- /dev/null +++ b/src/api/openapi/docs/RegionCodeAlias.md @@ -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) diff --git a/src/api/openapi/docs/RegionalSet.md b/src/api/openapi/docs/RegionalSet.md index 6ee9fc8..59bde54 100644 --- a/src/api/openapi/docs/RegionalSet.md +++ b/src/api/openapi/docs/RegionalSet.md @@ -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<CardPrint>**](CardPrint.md) | | [default to undefined] +**id** | **number** | | [optional] [default to undefined] +**prefix** | **string** | | [default to undefined] +**region** | **string** | | [default to undefined] +**cardPrints** | [**Array<CardPrint>**](CardPrint.md) | | [default to undefined] ## Example ```typescript -import { RegionalSet } from 'restClient'; +import { RegionalSet } from './api'; const instance: RegionalSet = { id, diff --git a/src/api/openapi/docs/SetDto.md b/src/api/openapi/docs/SetDto.md new file mode 100644 index 0000000..eea2847 --- /dev/null +++ b/src/api/openapi/docs/SetDto.md @@ -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) diff --git a/src/api/openapi/docs/SetPrefix.md b/src/api/openapi/docs/SetPrefix.md index f8ba94e..cc0cc1d 100644 --- a/src/api/openapi/docs/SetPrefix.md +++ b/src/api/openapi/docs/SetPrefix.md @@ -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<RegionalSet>**](RegionalSet.md) | | [default to undefined] ## Example ```typescript -import { SetPrefix } from 'restClient'; +import { SetPrefix } from './api'; const instance: SetPrefix = { id, name, - regionalSets, }; ``` diff --git a/src/api/openapi/docs/SetService.md b/src/api/openapi/docs/SetService.md new file mode 100644 index 0000000..01bbe49 --- /dev/null +++ b/src/api/openapi/docs/SetService.md @@ -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 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** + +### 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) + diff --git a/src/api/openapi/docs/SpellCard.md b/src/api/openapi/docs/SpellCard.md new file mode 100644 index 0000000..68a8c8a --- /dev/null +++ b/src/api/openapi/docs/SpellCard.md @@ -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<CardPrint>**](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) diff --git a/src/api/openapi/docs/SpellCardType.md b/src/api/openapi/docs/SpellCardType.md new file mode 100644 index 0000000..d21abe1 --- /dev/null +++ b/src/api/openapi/docs/SpellCardType.md @@ -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) diff --git a/src/api/openapi/docs/NewCard.md b/src/api/openapi/docs/TrapCard.md similarity index 80% rename from src/api/openapi/docs/NewCard.md rename to src/api/openapi/docs/TrapCard.md index 4edce94..8387b54 100644 --- a/src/api/openapi/docs/NewCard.md +++ b/src/api/openapi/docs/TrapCard.md @@ -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<CardPrint>**](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, }; ``` diff --git a/src/api/openapi/docs/TrapCardType.md b/src/api/openapi/docs/TrapCardType.md new file mode 100644 index 0000000..3dbd358 --- /dev/null +++ b/src/api/openapi/docs/TrapCardType.md @@ -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) diff --git a/src/api/openapi/model/attribute.ts b/src/api/openapi/model/attribute.ts new file mode 100644 index 0000000..3395d3f --- /dev/null +++ b/src/api/openapi/model/attribute.ts @@ -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]; + + + diff --git a/src/api/openapi/model/card-print.ts b/src/api/openapi/model/card-print.ts index da686b5..a911bf0 100644 --- a/src/api/openapi/model/card-print.ts +++ b/src/api/openapi/model/card-print.ts @@ -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; } diff --git a/src/api/openapi/model/card-upstream-fetch-request.ts b/src/api/openapi/model/card-upstream-fetch-request.ts new file mode 100644 index 0000000..d035a8c --- /dev/null +++ b/src/api/openapi/model/card-upstream-fetch-request.ts @@ -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} + * @memberof CardUpstreamFetchRequest + */ + 'services': Array; + /** + * + * @type {boolean} + * @memberof CardUpstreamFetchRequest + */ + 'persist'?: boolean; + /** + * + * @type {string} + * @memberof CardUpstreamFetchRequest + */ + 'name'?: string | null; + /** + * + * @type {number} + * @memberof CardUpstreamFetchRequest + */ + 'id'?: number | null; +} + diff --git a/src/api/openapi/model/card.ts b/src/api/openapi/model/card.ts index a2a0bfe..0cd9b6f 100644 --- a/src/api/openapi/model/card.ts +++ b/src/api/openapi/model/card.ts @@ -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; + diff --git a/src/api/openapi/model/deck-create-request.ts b/src/api/openapi/model/deck-create-request.ts new file mode 100644 index 0000000..e01846b --- /dev/null +++ b/src/api/openapi/model/deck-create-request.ts @@ -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; +} + diff --git a/src/api/openapi/model/deck.ts b/src/api/openapi/model/deck.ts index 1b08735..cd7e7a8 100644 --- a/src/api/openapi/model/deck.ts +++ b/src/api/openapi/model/deck.ts @@ -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} * @memberof Deck */ - 'cards': { [key: string]: number; }; + 'prints': Set; } diff --git a/src/api/openapi/model/index.ts b/src/api/openapi/model/index.ts index 2885478..0e62bda 100644 --- a/src/api/openapi/model/index.ts +++ b/src/api/openapi/model/index.ts @@ -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'; diff --git a/src/api/openapi/model/job-dto.ts b/src/api/openapi/model/job-dto.ts new file mode 100644 index 0000000..e5c6a0c --- /dev/null +++ b/src/api/openapi/model/job-dto.ts @@ -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; +} + + + diff --git a/src/api/openapi/model/job-status.ts b/src/api/openapi/model/job-status.ts new file mode 100644 index 0000000..5f78f43 --- /dev/null +++ b/src/api/openapi/model/job-status.ts @@ -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]; + + + diff --git a/src/api/openapi/model/link-arrow.ts b/src/api/openapi/model/link-arrow.ts new file mode 100644 index 0000000..069b3f9 --- /dev/null +++ b/src/api/openapi/model/link-arrow.ts @@ -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]; + + + diff --git a/src/api/openapi/model/monster-card-type.ts b/src/api/openapi/model/monster-card-type.ts new file mode 100644 index 0000000..d7357e9 --- /dev/null +++ b/src/api/openapi/model/monster-card-type.ts @@ -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]; + + + diff --git a/src/api/openapi/model/monster-card.ts b/src/api/openapi/model/monster-card.ts new file mode 100644 index 0000000..0dcafe4 --- /dev/null +++ b/src/api/openapi/model/monster-card.ts @@ -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} + * @memberof MonsterCard + */ + 'cardPrints': Set; + /** + * + * @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} + * @memberof MonsterCard + */ + 'linkArrows': Set; +} + + + diff --git a/src/api/openapi/model/monster-type.ts b/src/api/openapi/model/monster-type.ts new file mode 100644 index 0000000..133e1b4 --- /dev/null +++ b/src/api/openapi/model/monster-type.ts @@ -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]; + + + diff --git a/src/api/openapi/model/page-card-dto.ts b/src/api/openapi/model/page-card-dto.ts new file mode 100644 index 0000000..6b46712 --- /dev/null +++ b/src/api/openapi/model/page-card-dto.ts @@ -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} + * @memberof PageCardDto + */ + 'content': Array; + /** + * + * @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; +} + diff --git a/src/api/openapi/model/page-card-print-dto.ts b/src/api/openapi/model/page-card-print-dto.ts new file mode 100644 index 0000000..88d5db4 --- /dev/null +++ b/src/api/openapi/model/page-card-print-dto.ts @@ -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} + * @memberof PageCardPrintDto + */ + 'content': Array; + /** + * + * @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; +} + diff --git a/src/api/openapi/model/page-deck.ts b/src/api/openapi/model/page-deck-dto.ts similarity index 71% rename from src/api/openapi/model/page-deck.ts rename to src/api/openapi/model/page-deck-dto.ts index 2b1047e..3f4df94 100644 --- a/src/api/openapi/model/page-deck.ts +++ b/src/api/openapi/model/page-deck-dto.ts @@ -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} - * @memberof PageDeck + * @memberof PageDeckDto */ 'content': Array; /** * * @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; } diff --git a/src/api/openapi/model/page-set-dto.ts b/src/api/openapi/model/page-set-dto.ts new file mode 100644 index 0000000..b624978 --- /dev/null +++ b/src/api/openapi/model/page-set-dto.ts @@ -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} + * @memberof PageSetDto + */ + 'content': Array; + /** + * + * @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; +} + diff --git a/src/api/openapi/model/page.ts b/src/api/openapi/model/page.ts new file mode 100644 index 0000000..22e0d7c --- /dev/null +++ b/src/api/openapi/model/page.ts @@ -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} + * @memberof Page + */ + 'content': Array; + /** + * + * @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; +} + diff --git a/src/api/openapi/model/region-code-alias.ts b/src/api/openapi/model/region-code-alias.ts new file mode 100644 index 0000000..e0d7747 --- /dev/null +++ b/src/api/openapi/model/region-code-alias.ts @@ -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; +} + + + diff --git a/src/api/openapi/model/region.ts b/src/api/openapi/model/region.ts index 5d69db8..dff8f16 100644 --- a/src/api/openapi/model/region.ts +++ b/src/api/openapi/model/region.ts @@ -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} - * @memberof Region - */ - 'regionalSets': Set; -} + +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]; + + diff --git a/src/api/openapi/model/regional-set.ts b/src/api/openapi/model/regional-set.ts index 88208e3..11fe2f8 100644 --- a/src/api/openapi/model/regional-set.ts +++ b/src/api/openapi/model/regional-set.ts @@ -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} + * @type {Array} * @memberof RegionalSet */ - 'cardPrints': Set; + 'cardPrints': Array; } diff --git a/src/api/openapi/model/set-dto.ts b/src/api/openapi/model/set-dto.ts new file mode 100644 index 0000000..ed782c6 --- /dev/null +++ b/src/api/openapi/model/set-dto.ts @@ -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; +} + diff --git a/src/api/openapi/model/set-prefix.ts b/src/api/openapi/model/set-prefix.ts index 4be52e9..5f1708e 100644 --- a/src/api/openapi/model/set-prefix.ts +++ b/src/api/openapi/model/set-prefix.ts @@ -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} - * @memberof SetPrefix - */ - 'regionalSets': Set; } diff --git a/src/api/openapi/model/spell-card-type.ts b/src/api/openapi/model/spell-card-type.ts new file mode 100644 index 0000000..b6185d5 --- /dev/null +++ b/src/api/openapi/model/spell-card-type.ts @@ -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]; + + + diff --git a/src/api/openapi/model/spell-card.ts b/src/api/openapi/model/spell-card.ts new file mode 100644 index 0000000..92a3134 --- /dev/null +++ b/src/api/openapi/model/spell-card.ts @@ -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} + * @memberof SpellCard + */ + 'cardPrints': Set; + /** + * + * @type {SpellCardType} + * @memberof SpellCard + */ + 'subType': SpellCardType; +} + + + diff --git a/src/api/openapi/model/trap-card-type.ts b/src/api/openapi/model/trap-card-type.ts new file mode 100644 index 0000000..d80c0bc --- /dev/null +++ b/src/api/openapi/model/trap-card-type.ts @@ -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]; + + + diff --git a/src/api/openapi/model/new-card.ts b/src/api/openapi/model/trap-card.ts similarity index 71% rename from src/api/openapi/model/new-card.ts rename to src/api/openapi/model/trap-card.ts index aa68c22..b08d8d5 100644 --- a/src/api/openapi/model/new-card.ts +++ b/src/api/openapi/model/trap-card.ts @@ -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} - * @memberof NewCard + * @memberof TrapCard */ 'cardPrints': Set; + /** + * + * @type {TrapCardType} + * @memberof TrapCard + */ + 'subType': TrapCardType; } diff --git a/src/api/openapi/package.json b/src/api/openapi/package.json deleted file mode 100644 index 5be5715..0000000 --- a/src/api/openapi/package.json +++ /dev/null @@ -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" - } -} diff --git a/src/api/openapi/service/card-print-service.ts b/src/api/openapi/service/card-print-service.ts new file mode 100644 index 0000000..c7fe87c --- /dev/null +++ b/src/api/openapi/service/card-print-service.ts @@ -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 => { + 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> { + 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 { + 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; + +} + +/** + * 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)); + } +} + diff --git a/src/api/openapi/service/card-service.ts b/src/api/openapi/service/card-service.ts index d385d0b..487e830 100644 --- a/src/api/openapi/service/card-service.ts +++ b/src/api/openapi/service/card-service.ts @@ -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 => { - // 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 => { + // 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 => { + getCardPage: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise => { 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> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiCardsIdNewPut(id, options); + async fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + 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> { + async getCardById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 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>> { - 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> { + 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 { - return localVarFp.apiCardsIdNewPut(id, options).then((request) => request(axios, basePath)); + fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig): AxiosPromise> { + 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 { + getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise { 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> { - return localVarFp.getCards(name, page, pageSize, options).then((request) => request(axios, basePath)); + getCardPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise { + 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; + fetchUpstream(cardUpstreamFetchRequest: CardUpstreamFetchRequest, options?: RawAxiosRequestConfig): AxiosPromise>; /** * @@ -321,7 +325,7 @@ export interface CardServiceInterface { * @throws {RequiredError} * @memberof CardServiceInterface */ - getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise; + getCardById(id: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -343,7 +347,7 @@ export interface CardServiceInterface { * @throws {RequiredError} * @memberof CardServiceInterface */ - getCards(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise>; + getCardPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -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)); } } diff --git a/src/api/openapi/service/deck-service.ts b/src/api/openapi/service/deck-service.ts index c8eae5a..ad05d85 100644 --- a/src/api/openapi/service/deck-service.ts +++ b/src/api/openapi/service/deck-service.ts @@ -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 => { - // verify required parameter 'deck' is not null or undefined - assertParamExists('createDeck', 'deck', deck) + createDeck: async (deckCreateRequest: DeckCreateRequest, options: RawAxiosRequestConfig = {}): Promise => { + // 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> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createDeck(deck, options); + async createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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> { + async getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 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 { - return localVarFp.createDeck(deck, options).then((request) => request(axios, basePath)); + createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { + 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 { + getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise { 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; + createDeck(deckCreateRequest: DeckCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -352,7 +354,7 @@ export interface DeckServiceInterface { * @throws {RequiredError} * @memberof DeckServiceInterface */ - getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise; + getDecks(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -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)); } /** diff --git a/src/api/openapi/service/job-controller-service.ts b/src/api/openapi/service/job-controller-service.ts new file mode 100644 index 0000000..5f2a2e4 --- /dev/null +++ b/src/api/openapi/service/job-controller-service.ts @@ -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 => { + // 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> { + 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 { + 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; + +} + +/** + * 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)); + } +} + diff --git a/src/api/openapi/service/job-service.ts b/src/api/openapi/service/job-service.ts new file mode 100644 index 0000000..caf745f --- /dev/null +++ b/src/api/openapi/service/job-service.ts @@ -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 => { + // 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 => { + // 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 => { + // 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> { + 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> { + 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> { + 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 { + 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 { + 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 { + 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; + + /** + * + * @summary Get status of CardSetImportJob + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JobServiceInterface + */ + getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * + * @summary Get status of RegionalSetImportJob + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JobServiceInterface + */ + getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * 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)); + } +} + diff --git a/src/api/openapi/service/set-service.ts b/src/api/openapi/service/set-service.ts new file mode 100644 index 0000000..0de0c6a --- /dev/null +++ b/src/api/openapi/service/set-service.ts @@ -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 => { + // 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 => { + // 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 => { + // 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 => { + 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> { + 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>> { + 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> { + 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> { + 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 { + 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> { + 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 { + 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 { + 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; + + /** + * + * @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>; + + /** + * + * @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; + + /** + * + * @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; + +} + +/** + * 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)); + } +} + diff --git a/src/api/openapi/tsconfig.esm.json b/src/api/openapi/tsconfig.esm.json deleted file mode 100644 index 2c0331c..0000000 --- a/src/api/openapi/tsconfig.esm.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "esnext", - "outDir": "dist/esm" - } -} diff --git a/src/api/openapi/tsconfig.json b/src/api/openapi/tsconfig.json deleted file mode 100644 index 30dc264..0000000 --- a/src/api/openapi/tsconfig.json +++ /dev/null @@ -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" - ] -} diff --git a/src/auth/oidcConfig.ts b/src/auth/oidcConfig.ts new file mode 100644 index 0000000..dbb5537 --- /dev/null +++ b/src/auth/oidcConfig.ts @@ -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/" + } +} \ No newline at end of file diff --git a/src/components.d.ts b/src/components.d.ts index 8d3b4bb..dc5167e 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -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'] } } diff --git a/src/components/CardFilterPanel.vue b/src/components/CardFilterPanel.vue new file mode 100644 index 0000000..fd9a66d --- /dev/null +++ b/src/components/CardFilterPanel.vue @@ -0,0 +1,97 @@ + + + + + \ No newline at end of file diff --git a/src/components/CardListComponent.vue b/src/components/CardListComponent.vue new file mode 100644 index 0000000..85fa175 --- /dev/null +++ b/src/components/CardListComponent.vue @@ -0,0 +1,41 @@ + + + + + \ No newline at end of file diff --git a/src/components/CardListExpansion.vue b/src/components/CardListExpansion.vue new file mode 100644 index 0000000..c5eb925 --- /dev/null +++ b/src/components/CardListExpansion.vue @@ -0,0 +1,127 @@ + + + \ No newline at end of file diff --git a/src/components/CardTable.vue b/src/components/CardTable.vue new file mode 100644 index 0000000..23820a6 --- /dev/null +++ b/src/components/CardTable.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 2efd1cb..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/LinkArrowsComponent.vue b/src/components/LinkArrowsComponent.vue new file mode 100644 index 0000000..6f05e83 --- /dev/null +++ b/src/components/LinkArrowsComponent.vue @@ -0,0 +1,57 @@ + + + \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 0de42c1..ff8cdbc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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'); \ No newline at end of file diff --git a/src/stores/auth.ts b/src/stores/auth.ts new file mode 100644 index 0000000..3318f32 --- /dev/null +++ b/src/stores/auth.ts @@ -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() + } + } +}) \ No newline at end of file diff --git a/src/style.css b/src/style.css index b523ac2..9376946 100644 --- a/src/style.css +++ b/src/style.css @@ -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; diff --git a/src/util/card-type-util.ts b/src/util/card-type-util.ts new file mode 100644 index 0000000..c1ee964 --- /dev/null +++ b/src/util/card-type-util.ts @@ -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" + } +} \ No newline at end of file diff --git a/src/util/helpers.ts b/src/util/helpers.ts new file mode 100644 index 0000000..2935c35 --- /dev/null +++ b/src/util/helpers.ts @@ -0,0 +1,7 @@ +export function debounce void>(fn: T, delay = 300): T { + let timer: ReturnType | null = null; + return function (this: any, ...args: any[]) { + if (timer) clearTimeout(timer); + timer = setTimeout(() => fn.apply(this, args), delay); + } as T; +} \ No newline at end of file diff --git a/src/views/Callback.vue b/src/views/Callback.vue new file mode 100644 index 0000000..293182c --- /dev/null +++ b/src/views/Callback.vue @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index d35ac6b..d686722 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,30 +1,8 @@ \ No newline at end of file diff --git a/src/views/card/CardsView.vue b/src/views/card/CardsView.vue new file mode 100644 index 0000000..54592e9 --- /dev/null +++ b/src/views/card/CardsView.vue @@ -0,0 +1,150 @@ + + + \ No newline at end of file diff --git a/src/views/deck/DeckView.vue b/src/views/deck/DeckView.vue new file mode 100644 index 0000000..40eedf2 --- /dev/null +++ b/src/views/deck/DeckView.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/views/deck/DecksView.vue b/src/views/deck/DecksView.vue new file mode 100644 index 0000000..6450a3a --- /dev/null +++ b/src/views/deck/DecksView.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/set/SetsView.vue b/src/views/set/SetsView.vue new file mode 100644 index 0000000..15b0044 --- /dev/null +++ b/src/views/set/SetsView.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file