diff --git a/nginx.conf.template b/nginx.conf.template index 37be380..dbc6c6e 100644 --- a/nginx.conf.template +++ b/nginx.conf.template @@ -28,7 +28,7 @@ http { resolver 127.0.0.11 valid=10s ipv6=off; upstream backend { - server ${API_HOST}:${API_PORT}; + server ${API_HOST}:8080; } server { @@ -56,22 +56,23 @@ http { access_log off; } - location ^~ /api/ { - # Proxy to Quarkus - proxy_pass http://backend; - proxy_http_version 1.1; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + location /api/ { + proxy_pass http://backend:8080/; - # Relay CORS headers from the backend - proxy_pass_header Access-Control-Allow-Origin; - proxy_pass_header Access-Control-Allow-Methods; - proxy_pass_header Access-Control-Allow-Headers; - proxy_pass_header Access-Control-Allow-Credentials; + # Headers for both simple and preflight requests + add_header 'Access-Control-Allow-Origin' '$http_origin' always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type' always; + add_header 'Access-Control-Expose-Headers' 'Authorization' always; + + # Handle OPTIONS directly + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain; charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; + } } # Cache static assets diff --git a/package-lock.json b/package-lock.json index 7f9fe92..cc9d8d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "dex-ui-vue", - "version": "0.0.7", + "version": "0.0.8", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 9c5029d..5286ee3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dex-ui-vue", "private": true, - "version": "0.0.7", + "version": "0.0.8", "type": "module", "scripts": { "dev": "vite", diff --git a/src/api/openapi/api.ts b/src/api/openapi/api.ts index f9563de..dec07b7 100644 --- a/src/api/openapi/api.ts +++ b/src/api/openapi/api.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/base.ts b/src/api/openapi/base.ts index d94f454..05c55aa 100644 --- a/src/api/openapi/base.ts +++ b/src/api/openapi/base.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/common.ts b/src/api/openapi/common.ts index e29d39d..3377d8f 100644 --- a/src/api/openapi/common.ts +++ b/src/api/openapi/common.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/configuration.ts b/src/api/openapi/configuration.ts index 16b514c..b243782 100644 --- a/src/api/openapi/configuration.ts +++ b/src/api/openapi/configuration.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/docs/SetService.md b/src/api/openapi/docs/SetService.md index 01bbe49..56a4a4a 100644 --- a/src/api/openapi/docs/SetService.md +++ b/src/api/openapi/docs/SetService.md @@ -6,8 +6,8 @@ All URIs are relative to *http://localhost* |------------- | ------------- | -------------| |[**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| +|[**scrapeSetByName**](#scrapesetbyname) | **GET** /api/sets/{name}/scrape | Scrape a CardSet via name query parameter| # **apiSetsNameGet** > SetDto apiSetsNameGet() @@ -102,56 +102,6 @@ No authorization required - **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 | |-------------|-------------|------------------| @@ -215,3 +165,53 @@ 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) +# **scrapeSetByName** +> scrapeSetByName() + + +### 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.scrapeSetByName( + 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) + diff --git a/src/api/openapi/index.ts b/src/api/openapi/index.ts index a1796e9..6737209 100644 --- a/src/api/openapi/index.ts +++ b/src/api/openapi/index.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/attribute.ts b/src/api/openapi/model/attribute.ts index 3395d3f..faa19cb 100644 --- a/src/api/openapi/model/attribute.ts +++ b/src/api/openapi/model/attribute.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/card-page-search-request.ts b/src/api/openapi/model/card-page-search-request.ts index b15abb8..1aed3b8 100644 --- a/src/api/openapi/model/card-page-search-request.ts +++ b/src/api/openapi/model/card-page-search-request.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/card-print.ts b/src/api/openapi/model/card-print.ts index a911bf0..c2990ea 100644 --- a/src/api/openapi/model/card-print.ts +++ b/src/api/openapi/model/card-print.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/card-type.ts b/src/api/openapi/model/card-type.ts index 0307e89..3222efb 100644 --- a/src/api/openapi/model/card-type.ts +++ b/src/api/openapi/model/card-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/card-upstream-fetch-request.ts b/src/api/openapi/model/card-upstream-fetch-request.ts index d035a8c..67c3c48 100644 --- a/src/api/openapi/model/card-upstream-fetch-request.ts +++ b/src/api/openapi/model/card-upstream-fetch-request.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/card.ts b/src/api/openapi/model/card.ts index c45b484..e2ba8d7 100644 --- a/src/api/openapi/model/card.ts +++ b/src/api/openapi/model/card.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/deck-create-request.ts b/src/api/openapi/model/deck-create-request.ts index e01846b..7687c26 100644 --- a/src/api/openapi/model/deck-create-request.ts +++ b/src/api/openapi/model/deck-create-request.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/deck.ts b/src/api/openapi/model/deck.ts index cd7e7a8..af55207 100644 --- a/src/api/openapi/model/deck.ts +++ b/src/api/openapi/model/deck.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/job-dto.ts b/src/api/openapi/model/job-dto.ts index e1e8675..48c8c2b 100644 --- a/src/api/openapi/model/job-dto.ts +++ b/src/api/openapi/model/job-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/job-status.ts b/src/api/openapi/model/job-status.ts index 5f78f43..6ac3620 100644 --- a/src/api/openapi/model/job-status.ts +++ b/src/api/openapi/model/job-status.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/job-type.ts b/src/api/openapi/model/job-type.ts index 04106bd..3e7e7fb 100644 --- a/src/api/openapi/model/job-type.ts +++ b/src/api/openapi/model/job-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/link-arrow.ts b/src/api/openapi/model/link-arrow.ts index 069b3f9..5b11f64 100644 --- a/src/api/openapi/model/link-arrow.ts +++ b/src/api/openapi/model/link-arrow.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/monster-card-sub-type.ts b/src/api/openapi/model/monster-card-sub-type.ts index 17b527b..2eb74db 100644 --- a/src/api/openapi/model/monster-card-sub-type.ts +++ b/src/api/openapi/model/monster-card-sub-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/monster-card-type.ts b/src/api/openapi/model/monster-card-type.ts index d7357e9..aa35623 100644 --- a/src/api/openapi/model/monster-card-type.ts +++ b/src/api/openapi/model/monster-card-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/monster-card.ts b/src/api/openapi/model/monster-card.ts index 3070cf6..6eb872f 100644 --- a/src/api/openapi/model/monster-card.ts +++ b/src/api/openapi/model/monster-card.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/monster-type.ts b/src/api/openapi/model/monster-type.ts index 133e1b4..43c71db 100644 --- a/src/api/openapi/model/monster-type.ts +++ b/src/api/openapi/model/monster-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/page-card-dto.ts b/src/api/openapi/model/page-card-dto.ts index 6b46712..113be25 100644 --- a/src/api/openapi/model/page-card-dto.ts +++ b/src/api/openapi/model/page-card-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/page-card-print-dto.ts b/src/api/openapi/model/page-card-print-dto.ts index 88d5db4..6a09690 100644 --- a/src/api/openapi/model/page-card-print-dto.ts +++ b/src/api/openapi/model/page-card-print-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/page-deck-dto.ts b/src/api/openapi/model/page-deck-dto.ts index 3f4df94..7f4ddda 100644 --- a/src/api/openapi/model/page-deck-dto.ts +++ b/src/api/openapi/model/page-deck-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/page-job-dto.ts b/src/api/openapi/model/page-job-dto.ts index 5f1c049..39114e8 100644 --- a/src/api/openapi/model/page-job-dto.ts +++ b/src/api/openapi/model/page-job-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/page-set-dto.ts b/src/api/openapi/model/page-set-dto.ts index b624978..781058a 100644 --- a/src/api/openapi/model/page-set-dto.ts +++ b/src/api/openapi/model/page-set-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/page.ts b/src/api/openapi/model/page.ts index 22e0d7c..a789b96 100644 --- a/src/api/openapi/model/page.ts +++ b/src/api/openapi/model/page.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/region-code-alias.ts b/src/api/openapi/model/region-code-alias.ts index e0d7747..3696a14 100644 --- a/src/api/openapi/model/region-code-alias.ts +++ b/src/api/openapi/model/region-code-alias.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/region.ts b/src/api/openapi/model/region.ts index dff8f16..622097e 100644 --- a/src/api/openapi/model/region.ts +++ b/src/api/openapi/model/region.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/regional-set.ts b/src/api/openapi/model/regional-set.ts index 11fe2f8..2649ee6 100644 --- a/src/api/openapi/model/regional-set.ts +++ b/src/api/openapi/model/regional-set.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/set-dto.ts b/src/api/openapi/model/set-dto.ts index ed782c6..e7c2a32 100644 --- a/src/api/openapi/model/set-dto.ts +++ b/src/api/openapi/model/set-dto.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/spell-card-type.ts b/src/api/openapi/model/spell-card-type.ts index b6185d5..4ee866d 100644 --- a/src/api/openapi/model/spell-card-type.ts +++ b/src/api/openapi/model/spell-card-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/spell-card.ts b/src/api/openapi/model/spell-card.ts index a5c621f..cdaaf81 100644 --- a/src/api/openapi/model/spell-card.ts +++ b/src/api/openapi/model/spell-card.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/trap-card-type.ts b/src/api/openapi/model/trap-card-type.ts index d80c0bc..910f2e8 100644 --- a/src/api/openapi/model/trap-card-type.ts +++ b/src/api/openapi/model/trap-card-type.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/model/trap-card.ts b/src/api/openapi/model/trap-card.ts index 750c1c5..3cedd3a 100644 --- a/src/api/openapi/model/trap-card.ts +++ b/src/api/openapi/model/trap-card.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/service/card-print-service.ts b/src/api/openapi/service/card-print-service.ts index a899487..8bc6147 100644 --- a/src/api/openapi/service/card-print-service.ts +++ b/src/api/openapi/service/card-print-service.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/service/card-service.ts b/src/api/openapi/service/card-service.ts index 93bc573..c6033f1 100644 --- a/src/api/openapi/service/card-service.ts +++ b/src/api/openapi/service/card-service.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/service/deck-service.ts b/src/api/openapi/service/deck-service.ts index 203dde7..dc18f9f 100644 --- a/src/api/openapi/service/deck-service.ts +++ b/src/api/openapi/service/deck-service.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/service/job-service.ts b/src/api/openapi/service/job-service.ts index 9fdff7a..c3f9fc9 100644 --- a/src/api/openapi/service/job-service.ts +++ b/src/api/openapi/service/job-service.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/api/openapi/service/set-service.ts b/src/api/openapi/service/set-service.ts index 2cae1d1..3633dbe 100644 --- a/src/api/openapi/service/set-service.ts +++ b/src/api/openapi/service/set-service.ts @@ -4,7 +4,7 @@ * dex API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.0.1 + * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -90,40 +90,6 @@ export const SetServiceAxiosParamCreator = function (configuration?: Configurati - 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}; @@ -169,6 +135,40 @@ export const SetServiceAxiosParamCreator = function (configuration?: Configurati + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Scrape a CardSet via name query parameter + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + scrapeSetByName: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('scrapeSetByName', '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}; @@ -214,19 +214,6 @@ export const SetServiceFp = function(configuration?: Configuration) { 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 @@ -242,6 +229,19 @@ export const SetServiceFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['SetService.getCardSetPage']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @summary Scrape a CardSet via name query parameter + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async scrapeSetByName(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.scrapeSetByName(name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SetService.scrapeSetByName']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -272,16 +272,6 @@ export const SetServiceFactory = function (configuration?: Configuration, basePa apiSetsNameNewGet(requestParameters: SetServiceApiSetsNameNewGetRequest, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.apiSetsNameNewGet(requestParameters.name, options).then((request) => request(axios, basePath)); }, - /** - * - * @summary Scrape And Persist From Upstream - * @param {SetServiceApiSetsNameScrapeGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiSetsNameScrapeGet(requestParameters: SetServiceApiSetsNameScrapeGetRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiSetsNameScrapeGet(requestParameters.name, options).then((request) => request(axios, basePath)); - }, /** * * @summary Get a page of Card Sets with optional name query parameter @@ -292,6 +282,16 @@ export const SetServiceFactory = function (configuration?: Configuration, basePa getCardSetPage(requestParameters: SetServiceGetCardSetPageRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getCardSetPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Scrape a CardSet via name query parameter + * @param {SetServiceScrapeSetByNameRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + scrapeSetByName(requestParameters: SetServiceScrapeSetByNameRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.scrapeSetByName(requestParameters.name, options).then((request) => request(axios, basePath)); + }, }; }; @@ -323,20 +323,6 @@ export interface SetServiceApiSetsNameNewGetRequest { readonly name: string } -/** - * Request parameters for apiSetsNameScrapeGet operation in SetService. - * @export - * @interface SetServiceApiSetsNameScrapeGetRequest - */ -export interface SetServiceApiSetsNameScrapeGetRequest { - /** - * - * @type {string} - * @memberof SetServiceApiSetsNameScrapeGet - */ - readonly name: string -} - /** * Request parameters for getCardSetPage operation in SetService. * @export @@ -365,6 +351,20 @@ export interface SetServiceGetCardSetPageRequest { readonly pageSize?: number } +/** + * Request parameters for scrapeSetByName operation in SetService. + * @export + * @interface SetServiceScrapeSetByNameRequest + */ +export interface SetServiceScrapeSetByNameRequest { + /** + * + * @type {string} + * @memberof SetServiceScrapeSetByName + */ + readonly name: string +} + /** * SetService - object-oriented interface * @export @@ -396,18 +396,6 @@ export class SetService extends BaseAPI { return SetServiceFp(this.configuration).apiSetsNameNewGet(requestParameters.name, options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @summary Scrape And Persist From Upstream - * @param {SetServiceApiSetsNameScrapeGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SetService - */ - public apiSetsNameScrapeGet(requestParameters: SetServiceApiSetsNameScrapeGetRequest, options?: RawAxiosRequestConfig) { - return SetServiceFp(this.configuration).apiSetsNameScrapeGet(requestParameters.name, options).then((request) => request(this.axios, this.basePath)); - } - /** * * @summary Get a page of Card Sets with optional name query parameter @@ -419,5 +407,17 @@ export class SetService extends BaseAPI { public getCardSetPage(requestParameters: SetServiceGetCardSetPageRequest = {}, options?: RawAxiosRequestConfig) { return SetServiceFp(this.configuration).getCardSetPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @summary Scrape a CardSet via name query parameter + * @param {SetServiceScrapeSetByNameRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SetService + */ + public scrapeSetByName(requestParameters: SetServiceScrapeSetByNameRequest, options?: RawAxiosRequestConfig) { + return SetServiceFp(this.configuration).scrapeSetByName(requestParameters.name, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/src/main.ts b/src/main.ts index d9ac92c..6f98462 100644 --- a/src/main.ts +++ b/src/main.ts @@ -139,16 +139,12 @@ router.beforeEach(async (to) => { app.use(router); app.use(ToastService) -let apiUrl: string | undefined - -if (!getApiUrl()) { - apiUrl = `http://${getApiUrl()}` -} else { - apiUrl = "http://localhost:7070" -} +const devProxy = import.meta.env.DEV && !import.meta.env.VITE_API_HOST && !import.meta.env.VITE_API_PORT + ? '' + : `http://${getApiUrl()}` const axiosInstance = axios.create({ - baseURL: apiUrl, + baseURL: devProxy, headers: { 'Content-Type': 'application/json' } @@ -173,7 +169,6 @@ axiosInstance.interceptors.response.use( } ) -console.log(apiUrl) const deckService: DeckService = new DeckService(undefined, undefined, axiosInstance) const cardService: CardService = new CardService(undefined, undefined, axiosInstance) const setService: SetService = new SetService(undefined, undefined, axiosInstance)