diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index 842b43a35..6d105f79e 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -424,9 +424,9 @@ def parse_keywords(keyword_json, request): if len(kw) != 0: kw = automation_engine.apply_keyword_automation(kw) if k := Keyword.objects.filter(name__iexact=kw, space=request.space).first(): - keywords.append({'label': str(k), 'name': k.name, 'id': k.id}) + keywords.append({'label': str(k), 'name': k.name, 'id': k.id, 'import_keyword': True}) else: - keywords.append({'label': kw, 'name': kw}) + keywords.append({'label': kw, 'name': kw, 'import_keyword': False}) return keywords diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 9b5f86d35..d969e8181 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -1559,6 +1559,60 @@ class RecipeFromSourceSerializer(serializers.Serializer): data = serializers.CharField(required=False, allow_null=True, allow_blank=True) bookmarklet = serializers.IntegerField(required=False, allow_null=True, ) +class SourceImportFoodSerializer(serializers.Serializer): + name = serializers.CharField() + +class SourceImportUnitSerializer(serializers.Serializer): + name = serializers.CharField() + +class SourceImportIngredientSerializer(serializers.Serializer): + amount = serializers.FloatField() + food = SourceImportFoodSerializer() + unit = SourceImportUnitSerializer() + note = serializers.CharField(required=False) + original_text = serializers.CharField() + +class SourceImportStepSerializer(serializers.Serializer): + instruction = serializers.CharField() + ingredients = SourceImportIngredientSerializer(many=True) + show_ingredients_table = serializers.BooleanField() + +class SourceImportKeywordSerializer(serializers.Serializer): + id = serializers.IntegerField(allow_null=True) + label = serializers.CharField() + name = serializers.CharField() + import_keyword = serializers.BooleanField() + +class SourceImportPropertyTypeSerializer(serializers.Serializer): + id = serializers.IntegerField() + name = serializers.CharField() + +class SourceImportPropertySerializer(serializers.Serializer): + property_type = SourceImportPropertyTypeSerializer(many=False) + property_amount = serializers.FloatField() + +class SourceImportRecipeSerializer(serializers.Serializer): + steps = SourceImportStepSerializer(many=True) + internal = serializers.BooleanField() + source_url = serializers.URLField() + name = serializers.CharField() + description = serializers.CharField() + servings = serializers.IntegerField() + servings_text = serializers.CharField() + working_time = serializers.IntegerField() + waiting_time = serializers.IntegerField() + image = serializers.URLField() + keywords = SourceImportKeywordSerializer(many=True) + + properties = serializers.ListField(child=SourceImportPropertySerializer()) + +class RecipeFromSourceResponseSerializer(serializers.Serializer): + recipe = SourceImportRecipeSerializer(default=None) + images = serializers.ListField( default=[]) + error = serializers.BooleanField(default=False) + msg = serializers.CharField(max_length=1024, default='') + duplicate = serializers.ListField(child=serializers.IntegerField(), default=[]) + class ImportImageSerializer(serializers.Serializer): image = serializers.ImageField() diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 51b654646..35264d189 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -105,7 +105,7 @@ from cookbook.serializer import (AccessTokenSerializer, AutomationSerializer, Au SupermarketSerializer, SyncLogSerializer, SyncSerializer, UnitConversionSerializer, UnitSerializer, UserFileSerializer, UserPreferenceSerializer, UserSerializer, UserSpaceSerializer, ViewLogSerializer, ImportImageSerializer, - LocalizationSerializer, ServerSettingsSerializer + LocalizationSerializer, ServerSettingsSerializer, RecipeFromSourceResponseSerializer ) from cookbook.version_info import TANDOOR_VERSION from cookbook.views.import_export import get_integration @@ -1655,11 +1655,12 @@ class CustomAuthToken(ObtainAuthToken): }) -# TODO implement proper schema https://drf-spectacular.readthedocs.io/en/latest/customization.html#replace-views-with-openapiviewextension class RecipeUrlImportView(APIView): throttle_classes = [RecipeImportThrottle] permission_classes = [CustomIsUser & CustomTokenHasReadWriteScope] + # TODO add response serializer + @extend_schema(request=RecipeFromSourceSerializer(many=False), responses=RecipeFromSourceResponseSerializer(many=False)) def post(self, request, *args, **kwargs): """ function to retrieve a recipe from a given url or source string @@ -1671,6 +1672,8 @@ class RecipeUrlImportView(APIView): """ scrape = None serializer = RecipeFromSourceSerializer(data=request.data) + response = {} + if serializer.is_valid(): if (b_pk := serializer.validated_data.get('bookmarklet', None)) and ( @@ -1680,21 +1683,17 @@ class RecipeUrlImportView(APIView): bookmarklet.delete() url = serializer.validated_data.get('url', None) - data = unquote(serializer.validated_data.get('data', None)) - - duplicate = False - if url: - # Check for existing recipes with provided url - existing_recipe = Recipe.objects.filter(source_url=url).first() - if existing_recipe: - duplicate = True + data = unquote(serializer.validated_data.get('data', '')) if not url and not data: - return Response({'error': True, 'msg': _('Nothing to do.')}, status=status.HTTP_400_BAD_REQUEST) + response['error'] = True + response['msg'] = _('Nothing to do.') + return Response(RecipeFromSourceResponseSerializer().to_representation(response), status=status.HTTP_400_BAD_REQUEST) elif url and not data: if re.match('^(https?://)?(www\\.youtube\\.com|youtu\\.be)/.+$', url): if validate_import_url(url): + # TODO new serializer return Response({'recipe_json': get_from_youtube_scraper(url, request), 'recipe_images': [], 'duplicate': duplicate}, status=status.HTTP_200_OK) if re.match('^(.)*/view/recipe/[0-9]+/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$', url): recipe_json = requests.get( @@ -1713,6 +1712,7 @@ class RecipeUrlImportView(APIView): filetype=pathlib.Path(recipe_json['image']).suffix), name=f'{uuid.uuid4()}_{recipe.pk}{pathlib.Path(recipe_json["image"]).suffix}') recipe.save() + # TODO new serializer return Response({'link': request.build_absolute_uri(reverse('view_recipe', args={recipe.pk})), 'duplicate': duplicate}, status=status.HTTP_201_CREATED) else: try: @@ -1724,16 +1724,19 @@ class RecipeUrlImportView(APIView): ).content scrape = scrape_html(org_url=url, html=html, supported_only=False) else: - return Response({'error': True, 'msg': _('Invalid Url')}, - status=status.HTTP_400_BAD_REQUEST) + response['error'] = True + response['msg'] = _('Invalid Url') + return Response(RecipeFromSourceResponseSerializer().to_representation(response), status=status.HTTP_400_BAD_REQUEST) except NoSchemaFoundInWildMode: pass except requests.exceptions.ConnectionError: - return Response({'error': True, 'msg': _('Connection Refused.')}, - status=status.HTTP_400_BAD_REQUEST) + response['error'] = True + response['msg'] = _('Connection Refused.') + return Response(RecipeFromSourceResponseSerializer().to_representation(response), status=status.HTTP_400_BAD_REQUEST) except requests.exceptions.MissingSchema: - return Response({'error': True, 'msg': _('Bad URL Schema.')}, - status=status.HTTP_400_BAD_REQUEST) + response['error'] = True + response['msg'] = _('Bad URL Schema.') + return Response(RecipeFromSourceResponseSerializer().to_representation(response), status=status.HTTP_400_BAD_REQUEST) else: try: data_json = json.loads(data) @@ -1749,18 +1752,19 @@ class RecipeUrlImportView(APIView): scrape = scrape_html(html=data, org_url=found_url, supported_only=False) if scrape: - return Response({ - 'recipe_json': helper.get_from_scraper(scrape, request), - 'recipe_images': list(dict.fromkeys(get_images_from_soup(scrape.soup, url))), - 'duplicate': duplicate - }, - status=status.HTTP_200_OK) + response['recipe'] = helper.get_from_scraper(scrape, request) + response['images'] = list(dict.fromkeys(get_images_from_soup(scrape.soup, url))) + response['duplicate'] = Recipe.objects.filter(source_url=url).values_list('id', flat=True).all() + return Response(RecipeFromSourceResponseSerializer(context={'request': request}).to_representation(response), status=status.HTTP_200_OK) else: - return Response({'error': True, 'msg': _('No usable data could be found.')}, - status=status.HTTP_400_BAD_REQUEST) + response['error'] = True + response['msg'] = _('No usable data could be found.') + return Response(RecipeFromSourceResponseSerializer().to_representation(response), status=status.HTTP_400_BAD_REQUEST) else: - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + response['error'] = True + response['msg'] = serializer.errors + return Response(RecipeFromSourceResponseSerializer().to_representation(response), status=status.HTTP_400_BAD_REQUEST) class ImageToRecipeView(APIView): diff --git a/vue3/src/locales/ar.json b/vue3/src/locales/ar.json index 4f0fc4ef1..ca6c2ca81 100644 --- a/vue3/src/locales/ar.json +++ b/vue3/src/locales/ar.json @@ -20,6 +20,7 @@ "Auto_Planner": "", "Automate": "", "Automation": "", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/bg.json b/vue3/src/locales/bg.json index bef4f3f74..f4bdcee3e 100644 --- a/vue3/src/locales/bg.json +++ b/vue3/src/locales/bg.json @@ -20,6 +20,7 @@ "Auto_Planner": "Автоматичен плановик", "Automate": "Автоматизация", "Automation": "Автоматизация", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/ca.json b/vue3/src/locales/ca.json index 0b9138432..8af7e4130 100644 --- a/vue3/src/locales/ca.json +++ b/vue3/src/locales/ca.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Moveu tots els ingredients al pas més adequat.", "Automate": "", "Automation": "", + "Available": "", "AvailableCategories": "", "Back": "", "BaseUnit": "", diff --git a/vue3/src/locales/cs.json b/vue3/src/locales/cs.json index 807b5d589..4f571b0c3 100644 --- a/vue3/src/locales/cs.json +++ b/vue3/src/locales/cs.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Přiřadit všechny ingredience k nejlépe vyhovujícímu kroku.", "Automate": "Automatizovat", "Automation": "Automatizace", + "Available": "", "AvailableCategories": "", "Back": "Zpět", "BaseUnit": "", diff --git a/vue3/src/locales/da.json b/vue3/src/locales/da.json index 278c03785..93c56f529 100644 --- a/vue3/src/locales/da.json +++ b/vue3/src/locales/da.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Flyt alle ingredienser til mest egnede trin.", "Automate": "Automatiser", "Automation": "Automatisering", + "Available": "", "AvailableCategories": "", "Back": "Tilbage", "BaseUnit": "", diff --git a/vue3/src/locales/de.json b/vue3/src/locales/de.json index 0d799160c..07296c052 100644 --- a/vue3/src/locales/de.json +++ b/vue3/src/locales/de.json @@ -27,6 +27,7 @@ "Auto_Sort_Help": "Verschiebe alle Zutaten zu dem Schritt, der am Besten passt.", "Automate": "Automatisieren", "Automation": "Automatisierung", + "Available": "Verfügbar", "AvailableCategories": "Verfügbare Kategorien", "Back": "Zurück", "BaseUnit": "Basiseinheit", diff --git a/vue3/src/locales/el.json b/vue3/src/locales/el.json index 435371642..4a3ad2dae 100644 --- a/vue3/src/locales/el.json +++ b/vue3/src/locales/el.json @@ -25,6 +25,7 @@ "Auto_Sort_Help": "Μετακίνηση όλων των υλικών στο καταλληλότερο βήμα.", "Automate": "Αυτοματοποίηση", "Automation": "Αυτοματισμός", + "Available": "", "AvailableCategories": "", "Back": "Πίσω", "BaseUnit": "", diff --git a/vue3/src/locales/en.json b/vue3/src/locales/en.json index d9ce094e4..7fb636757 100644 --- a/vue3/src/locales/en.json +++ b/vue3/src/locales/en.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Move all ingredients to the best fitting step.", "Automate": "Automate", "Automation": "Automation", + "Available": "Available", "AvailableCategories": "Available Categories", "Back": "Back", "BaseUnit": "Base Unit", diff --git a/vue3/src/locales/es.json b/vue3/src/locales/es.json index 82d5feedc..b57f502e9 100644 --- a/vue3/src/locales/es.json +++ b/vue3/src/locales/es.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Mueva todos los ingredientes al paso que mejor se adapte.", "Automate": "Automatizar", "Automation": "Automatización", + "Available": "", "AvailableCategories": "", "Back": "Atrás", "BaseUnit": "", diff --git a/vue3/src/locales/fi.json b/vue3/src/locales/fi.json index f18d91333..a8cb1c05c 100644 --- a/vue3/src/locales/fi.json +++ b/vue3/src/locales/fi.json @@ -13,6 +13,7 @@ "Auto_Planner": "Automaattinen Suunnittelija", "Automate": "Automatisoi", "Automation": "Automaatio", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/fr.json b/vue3/src/locales/fr.json index 8cc126232..5de7153ef 100644 --- a/vue3/src/locales/fr.json +++ b/vue3/src/locales/fr.json @@ -27,6 +27,7 @@ "Auto_Sort_Help": "Déplacer tous les ingrédients à l’étape la mieux adaptée.", "Automate": "Automatiser", "Automation": "Automatisation", + "Available": "", "AvailableCategories": "", "Back": "Retour", "BaseUnit": "", diff --git a/vue3/src/locales/he.json b/vue3/src/locales/he.json index 146b36652..8ffb8ffb3 100644 --- a/vue3/src/locales/he.json +++ b/vue3/src/locales/he.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "העברת כל המרכיבים למיקום המתאים ביותר.", "Automate": "אוטומט", "Automation": "אוטומטציה", + "Available": "", "AvailableCategories": "", "Back": "חזור", "BaseUnit": "", diff --git a/vue3/src/locales/hu.json b/vue3/src/locales/hu.json index 2f1ec6d63..96875fa5e 100644 --- a/vue3/src/locales/hu.json +++ b/vue3/src/locales/hu.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Az összes összetevőt helyezze át a legmegfelelőbb lépéshez.", "Automate": "Automatizálás", "Automation": "Automatizálás", + "Available": "", "AvailableCategories": "", "Back": "Vissza", "BaseUnit": "", diff --git a/vue3/src/locales/hy.json b/vue3/src/locales/hy.json index 4712e7a32..e2534a680 100644 --- a/vue3/src/locales/hy.json +++ b/vue3/src/locales/hy.json @@ -10,6 +10,7 @@ "Add_to_Shopping": "Ավելացնել գնումներին", "Advanced Search Settings": "Ընդլայնված փնտրման կարգավորումներ", "Automate": "Ավտոմատացնել", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/id.json b/vue3/src/locales/id.json index e2c36ad32..e84eea402 100644 --- a/vue3/src/locales/id.json +++ b/vue3/src/locales/id.json @@ -22,6 +22,7 @@ "Auto_Planner": "", "Automate": "", "Automation": "Automatis", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/is.json b/vue3/src/locales/is.json index b5b23656d..bcfaa2dfb 100644 --- a/vue3/src/locales/is.json +++ b/vue3/src/locales/is.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "", "Automate": "", "Automation": "", + "Available": "", "AvailableCategories": "", "Back": "", "BaseUnit": "", diff --git a/vue3/src/locales/it.json b/vue3/src/locales/it.json index 4783d4c6e..07b7c92aa 100644 --- a/vue3/src/locales/it.json +++ b/vue3/src/locales/it.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Sposta tutti gli ingredienti allo step più adatto.", "Automate": "Automatizza", "Automation": "Automazione", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/lt.json b/vue3/src/locales/lt.json index d3690a861..4a0cf4fe4 100644 --- a/vue3/src/locales/lt.json +++ b/vue3/src/locales/lt.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "", "Automate": "", "Automation": "", + "Available": "", "AvailableCategories": "", "Back": "", "BaseUnit": "", diff --git a/vue3/src/locales/nb_NO.json b/vue3/src/locales/nb_NO.json index 23fc1f4ac..a98d7efb3 100644 --- a/vue3/src/locales/nb_NO.json +++ b/vue3/src/locales/nb_NO.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Flytt alle ingredienser til det mest passende steget.", "Automate": "Automatiser", "Automation": "Automatiser", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/nl.json b/vue3/src/locales/nl.json index 018922cf1..e05cb4565 100644 --- a/vue3/src/locales/nl.json +++ b/vue3/src/locales/nl.json @@ -27,6 +27,7 @@ "Auto_Sort_Help": "Verplaats alle ingrediënten naar de best passende stap.", "Automate": "Automatiseer", "Automation": "Automatisering", + "Available": "", "AvailableCategories": "", "Back": "Terug", "BaseUnit": "", diff --git a/vue3/src/locales/pl.json b/vue3/src/locales/pl.json index 14bb20c75..b53682f78 100644 --- a/vue3/src/locales/pl.json +++ b/vue3/src/locales/pl.json @@ -27,6 +27,7 @@ "Auto_Sort_Help": "Przenieś wszystkie składniki do najlepiej dopasowanego kroku.", "Automate": "Automatyzacja", "Automation": "Automatyzacja", + "Available": "", "AvailableCategories": "", "Back": "Z powrotem", "BaseUnit": "", diff --git a/vue3/src/locales/pt.json b/vue3/src/locales/pt.json index d31636c64..1217e5e83 100644 --- a/vue3/src/locales/pt.json +++ b/vue3/src/locales/pt.json @@ -21,6 +21,7 @@ "Auto_Sort_Help": "Mover todos os ingredientes para o passo mais indicado.", "Automate": "Automatizar", "Automation": "Automação", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/pt_BR.json b/vue3/src/locales/pt_BR.json index 7541bd29c..f21312ea2 100644 --- a/vue3/src/locales/pt_BR.json +++ b/vue3/src/locales/pt_BR.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Mover todos os ingredientes para o passo mais indicado.", "Automate": "Automatizar", "Automation": "Automação", + "Available": "", "AvailableCategories": "", "Back": "Voltar", "BaseUnit": "", diff --git a/vue3/src/locales/ro.json b/vue3/src/locales/ro.json index 30fe48fa4..8dc669169 100644 --- a/vue3/src/locales/ro.json +++ b/vue3/src/locales/ro.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Mutați toate ingredientele la cel mai potrivit pas.", "Automate": "Automatizat", "Automation": "Automatizare", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/ru.json b/vue3/src/locales/ru.json index 7d02213ec..64ab4e758 100644 --- a/vue3/src/locales/ru.json +++ b/vue3/src/locales/ru.json @@ -20,6 +20,7 @@ "Auto_Planner": "Автопланировщик", "Automate": "Автоматизировать", "Automation": "Автоматизация", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/sl.json b/vue3/src/locales/sl.json index 049322151..f0321b132 100644 --- a/vue3/src/locales/sl.json +++ b/vue3/src/locales/sl.json @@ -19,6 +19,7 @@ "Auto_Sort_Help": "Vse sestavine prestavi v najprimernejši korak.", "Automate": "Avtomatiziraj", "Automation": "Avtomatizacija", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/sv.json b/vue3/src/locales/sv.json index dc590c67e..a26f9e5fb 100644 --- a/vue3/src/locales/sv.json +++ b/vue3/src/locales/sv.json @@ -27,6 +27,7 @@ "Auto_Sort_Help": "Flytta alla ingredienser till det bästa passande steget.", "Automate": "Automatisera", "Automation": "Automatisering", + "Available": "", "AvailableCategories": "", "Back": "Tillbaka", "BaseUnit": "", diff --git a/vue3/src/locales/tr.json b/vue3/src/locales/tr.json index 391db94e3..cfcc53fb6 100644 --- a/vue3/src/locales/tr.json +++ b/vue3/src/locales/tr.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "Tüm malzemeleri en uygun adıma taşı.", "Automate": "Otomatikleştir", "Automation": "Otomasyon", + "Available": "", "AvailableCategories": "", "Back": "Geri", "BaseUnit": "", diff --git a/vue3/src/locales/uk.json b/vue3/src/locales/uk.json index da49fdf53..9d2dc7ad5 100644 --- a/vue3/src/locales/uk.json +++ b/vue3/src/locales/uk.json @@ -23,6 +23,7 @@ "Auto_Sort_Help": "Перемістити всі інгредієнти до більш підходящого кроку.", "Automate": "Автоматично", "Automation": "Автоматизація", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/locales/zh_Hans.json b/vue3/src/locales/zh_Hans.json index c5d4315c3..66cc51387 100644 --- a/vue3/src/locales/zh_Hans.json +++ b/vue3/src/locales/zh_Hans.json @@ -26,6 +26,7 @@ "Auto_Sort_Help": "将所有食材移动到最恰当的步骤。", "Automate": "自动化", "Automation": "自动化", + "Available": "", "AvailableCategories": "", "Back": "后退", "BaseUnit": "", diff --git a/vue3/src/locales/zh_Hant.json b/vue3/src/locales/zh_Hant.json index c45a23df5..4d61d4449 100644 --- a/vue3/src/locales/zh_Hant.json +++ b/vue3/src/locales/zh_Hant.json @@ -7,6 +7,7 @@ "Add_nutrition_recipe": "為食譜添加營養資訊", "Add_to_Plan": "加入計劃", "Add_to_Shopping": "加入購物清單", + "Available": "", "AvailableCategories": "", "BaseUnit": "", "BaseUnitHelp": "", diff --git a/vue3/src/openapi/.openapi-generator/FILES b/vue3/src/openapi/.openapi-generator/FILES index ffc2e29b5..cde338439 100644 --- a/vue3/src/openapi/.openapi-generator/FILES +++ b/vue3/src/openapi/.openapi-generator/FILES @@ -123,6 +123,8 @@ models/Recipe.ts models/RecipeBook.ts models/RecipeBookEntry.ts models/RecipeFlat.ts +models/RecipeFromSource.ts +models/RecipeFromSourceResponse.ts models/RecipeImage.ts models/RecipeOverview.ts models/RecipeShoppingUpdate.ts @@ -132,6 +134,14 @@ models/ShareLink.ts models/ShoppingListEntry.ts models/ShoppingListEntryBulk.ts models/ShoppingListRecipe.ts +models/SourceImportFood.ts +models/SourceImportIngredient.ts +models/SourceImportKeyword.ts +models/SourceImportProperty.ts +models/SourceImportPropertyType.ts +models/SourceImportRecipe.ts +models/SourceImportStep.ts +models/SourceImportUnit.ts models/Space.ts models/SpaceNavTextColorEnum.ts models/SpaceThemeEnum.ts diff --git a/vue3/src/openapi/apis/ApiApi.ts b/vue3/src/openapi/apis/ApiApi.ts index 6c6ca4409..2177813e0 100644 --- a/vue3/src/openapi/apis/ApiApi.ts +++ b/vue3/src/openapi/apis/ApiApi.ts @@ -122,6 +122,8 @@ import type { RecipeBook, RecipeBookEntry, RecipeFlat, + RecipeFromSource, + RecipeFromSourceResponse, RecipeImage, RecipeShoppingUpdate, RecipeSimple, @@ -361,6 +363,10 @@ import { RecipeBookEntryToJSON, RecipeFlatFromJSON, RecipeFlatToJSON, + RecipeFromSourceFromJSON, + RecipeFromSourceToJSON, + RecipeFromSourceResponseFromJSON, + RecipeFromSourceResponseToJSON, RecipeImageFromJSON, RecipeImageToJSON, RecipeShoppingUpdateFromJSON, @@ -1161,6 +1167,10 @@ export interface ApiRecipeDestroyRequest { id: number; } +export interface ApiRecipeFromSourceCreateRequest { + recipeFromSource?: RecipeFromSource; +} + export interface ApiRecipeImageUpdateRequest { id: number; image?: string | null; @@ -8567,11 +8577,13 @@ export class ApiApi extends runtime.BaseAPI { /** * function to retrieve a recipe from a given url or source string :param request: standard request with additional post parameters - url: url to use for importing recipe - data: if no url is given recipe is imported from provided source data - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes :return: JsonResponse containing the parsed json and images */ - async apiRecipeFromSourceCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async apiRecipeFromSourceCreateRaw(requestParameters: ApiRecipeFromSourceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } @@ -8581,16 +8593,18 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, + body: RecipeFromSourceToJSON(requestParameters['recipeFromSource']), }, initOverrides); - return new runtime.VoidApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromSourceResponseFromJSON(jsonValue)); } /** * function to retrieve a recipe from a given url or source string :param request: standard request with additional post parameters - url: url to use for importing recipe - data: if no url is given recipe is imported from provided source data - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes :return: JsonResponse containing the parsed json and images */ - async apiRecipeFromSourceCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiRecipeFromSourceCreateRaw(initOverrides); + async apiRecipeFromSourceCreate(requestParameters: ApiRecipeFromSourceCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiRecipeFromSourceCreateRaw(requestParameters, initOverrides); + return await response.value(); } /** diff --git a/vue3/src/openapi/apis/OpenapiApi.ts b/vue3/src/openapi/apis/OpenapiApi.ts deleted file mode 100644 index d63c5ea30..000000000 --- a/vue3/src/openapi/apis/OpenapiApi.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -export interface OpenapiRetrieveRequest { - format?: OpenapiRetrieveFormatEnum; - lang?: OpenapiRetrieveLangEnum; -} - -/** - * - */ -export class OpenapiApi extends runtime.BaseAPI { - - /** - * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json - */ - async openapiRetrieveRaw(requestParameters: OpenapiRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.format !== undefined) { - queryParameters['format'] = requestParameters.format; - } - - if (requestParameters.lang !== undefined) { - queryParameters['lang'] = requestParameters.lang; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/openapi/`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json - */ - async openapiRetrieve(requestParameters: OpenapiRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { - const response = await this.openapiRetrieveRaw(requestParameters, initOverrides); - return await response.value(); - } - -} - -/** - * @export - */ -export const OpenapiRetrieveFormatEnum = { - Json: 'json', - Yaml: 'yaml' -} as const; -export type OpenapiRetrieveFormatEnum = typeof OpenapiRetrieveFormatEnum[keyof typeof OpenapiRetrieveFormatEnum]; -/** - * @export - */ -export const OpenapiRetrieveLangEnum = { - Bg: 'bg', - Ca: 'ca', - Cs: 'cs', - Da: 'da', - De: 'de', - En: 'en', - Es: 'es', - Fr: 'fr', - Hu: 'hu', - Hy: 'hy', - It: 'it', - Lv: 'lv', - Nb: 'nb', - Nl: 'nl', - Pl: 'pl', - Ru: 'ru', - Sv: 'sv' -} as const; -export type OpenapiRetrieveLangEnum = typeof OpenapiRetrieveLangEnum[keyof typeof OpenapiRetrieveLangEnum]; diff --git a/vue3/src/openapi/models/AccessTokenRequest.ts b/vue3/src/openapi/models/AccessTokenRequest.ts deleted file mode 100644 index 1d5e2b84d..000000000 --- a/vue3/src/openapi/models/AccessTokenRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface AccessTokenRequest - */ -export interface AccessTokenRequest { - /** - * - * @type {Date} - * @memberof AccessTokenRequest - */ - expires: Date; - /** - * - * @type {string} - * @memberof AccessTokenRequest - */ - scope?: string; - /** - * - * @type {number} - * @memberof AccessTokenRequest - */ - id?: number; -} - -/** - * Check if a given object implements the AccessTokenRequest interface. - */ -export function instanceOfAccessTokenRequest(value: object): boolean { - if (!('expires' in value)) return false; - return true; -} - -export function AccessTokenRequestFromJSON(json: any): AccessTokenRequest { - return AccessTokenRequestFromJSONTyped(json, false); -} - -export function AccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessTokenRequest { - if (json == null) { - return json; - } - return { - - 'expires': (new Date(json['expires'])), - 'scope': json['scope'] == null ? undefined : json['scope'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any { - if (value == null) { - return value; - } - return { - - 'expires': ((value['expires']).toISOString()), - 'scope': value['scope'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/AuthTokenRequest.ts b/vue3/src/openapi/models/AuthTokenRequest.ts deleted file mode 100644 index fdabefe50..000000000 --- a/vue3/src/openapi/models/AuthTokenRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface AuthTokenRequest - */ -export interface AuthTokenRequest { - /** - * - * @type {string} - * @memberof AuthTokenRequest - */ - username: string; - /** - * - * @type {string} - * @memberof AuthTokenRequest - */ - password: string; -} - -/** - * Check if a given object implements the AuthTokenRequest interface. - */ -export function instanceOfAuthTokenRequest(value: object): boolean { - if (!('username' in value)) return false; - if (!('password' in value)) return false; - return true; -} - -export function AuthTokenRequestFromJSON(json: any): AuthTokenRequest { - return AuthTokenRequestFromJSONTyped(json, false); -} - -export function AuthTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthTokenRequest { - if (json == null) { - return json; - } - return { - - 'username': json['username'], - 'password': json['password'], - }; -} - -export function AuthTokenRequestToJSON(value?: AuthTokenRequest | null): any { - if (value == null) { - return value; - } - return { - - 'username': value['username'], - 'password': value['password'], - }; -} - diff --git a/vue3/src/openapi/models/AutoMealPlanRequest.ts b/vue3/src/openapi/models/AutoMealPlanRequest.ts deleted file mode 100644 index d781a35dc..000000000 --- a/vue3/src/openapi/models/AutoMealPlanRequest.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * - * @export - * @interface AutoMealPlanRequest - */ -export interface AutoMealPlanRequest { - /** - * - * @type {Date} - * @memberof AutoMealPlanRequest - */ - startDate: Date; - /** - * - * @type {Date} - * @memberof AutoMealPlanRequest - */ - endDate: Date; - /** - * - * @type {number} - * @memberof AutoMealPlanRequest - */ - mealTypeId: number; - /** - * - * @type {Array} - * @memberof AutoMealPlanRequest - */ - keywordIds: Array; - /** - * - * @type {number} - * @memberof AutoMealPlanRequest - */ - servings: number; - /** - * - * @type {Array} - * @memberof AutoMealPlanRequest - */ - shared?: Array; - /** - * - * @type {boolean} - * @memberof AutoMealPlanRequest - */ - addshopping: boolean; -} - -/** - * Check if a given object implements the AutoMealPlanRequest interface. - */ -export function instanceOfAutoMealPlanRequest(value: object): boolean { - if (!('startDate' in value)) return false; - if (!('endDate' in value)) return false; - if (!('mealTypeId' in value)) return false; - if (!('keywordIds' in value)) return false; - if (!('servings' in value)) return false; - if (!('addshopping' in value)) return false; - return true; -} - -export function AutoMealPlanRequestFromJSON(json: any): AutoMealPlanRequest { - return AutoMealPlanRequestFromJSONTyped(json, false); -} - -export function AutoMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoMealPlanRequest { - if (json == null) { - return json; - } - return { - - 'startDate': (new Date(json['start_date'])), - 'endDate': (new Date(json['end_date'])), - 'mealTypeId': json['meal_type_id'], - 'keywordIds': json['keyword_ids'], - 'servings': json['servings'], - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'addshopping': json['addshopping'], - }; -} - -export function AutoMealPlanRequestToJSON(value?: AutoMealPlanRequest | null): any { - if (value == null) { - return value; - } - return { - - 'start_date': ((value['startDate']).toISOString().substring(0,10)), - 'end_date': ((value['endDate']).toISOString().substring(0,10)), - 'meal_type_id': value['mealTypeId'], - 'keyword_ids': value['keywordIds'], - 'servings': value['servings'], - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'addshopping': value['addshopping'], - }; -} - diff --git a/vue3/src/openapi/models/AutomationRequest.ts b/vue3/src/openapi/models/AutomationRequest.ts deleted file mode 100644 index 09e09e419..000000000 --- a/vue3/src/openapi/models/AutomationRequest.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { TypeEnum } from './TypeEnum'; -import { - TypeEnumFromJSON, - TypeEnumFromJSONTyped, - TypeEnumToJSON, -} from './TypeEnum'; - -/** - * - * @export - * @interface AutomationRequest - */ -export interface AutomationRequest { - /** - * - * @type {TypeEnum} - * @memberof AutomationRequest - */ - type: TypeEnum; - /** - * - * @type {string} - * @memberof AutomationRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof AutomationRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof AutomationRequest - */ - param1?: string; - /** - * - * @type {string} - * @memberof AutomationRequest - */ - param2?: string; - /** - * - * @type {string} - * @memberof AutomationRequest - */ - param3?: string; - /** - * - * @type {number} - * @memberof AutomationRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof AutomationRequest - */ - disabled?: boolean; - /** - * - * @type {number} - * @memberof AutomationRequest - */ - id?: number; -} - -/** - * Check if a given object implements the AutomationRequest interface. - */ -export function instanceOfAutomationRequest(value: object): boolean { - if (!('type' in value)) return false; - return true; -} - -export function AutomationRequestFromJSON(json: any): AutomationRequest { - return AutomationRequestFromJSONTyped(json, false); -} - -export function AutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationRequest { - if (json == null) { - return json; - } - return { - - 'type': TypeEnumFromJSON(json['type']), - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'param1': json['param_1'] == null ? undefined : json['param_1'], - 'param2': json['param_2'] == null ? undefined : json['param_2'], - 'param3': json['param_3'] == null ? undefined : json['param_3'], - 'order': json['order'] == null ? undefined : json['order'], - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function AutomationRequestToJSON(value?: AutomationRequest | null): any { - if (value == null) { - return value; - } - return { - - 'type': TypeEnumToJSON(value['type']), - 'name': value['name'], - 'description': value['description'], - 'param_1': value['param1'], - 'param_2': value['param2'], - 'param_3': value['param3'], - 'order': value['order'], - 'disabled': value['disabled'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/BlankEnum.ts b/vue3/src/openapi/models/BlankEnum.ts deleted file mode 100644 index fc3ae8041..000000000 --- a/vue3/src/openapi/models/BlankEnum.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * - * @export - */ -export const BlankEnum = { - Empty: '' -} as const; -export type BlankEnum = typeof BlankEnum[keyof typeof BlankEnum]; - - -export function BlankEnumFromJSON(json: any): BlankEnum { - return BlankEnumFromJSONTyped(json, false); -} - -export function BlankEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlankEnum { - return json as BlankEnum; -} - -export function BlankEnumToJSON(value?: BlankEnum | null): any { - return value as any; -} - diff --git a/vue3/src/openapi/models/BookmarkletImportRequest.ts b/vue3/src/openapi/models/BookmarkletImportRequest.ts deleted file mode 100644 index ce8d87c63..000000000 --- a/vue3/src/openapi/models/BookmarkletImportRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface BookmarkletImportRequest - */ -export interface BookmarkletImportRequest { - /** - * - * @type {string} - * @memberof BookmarkletImportRequest - */ - url?: string; - /** - * - * @type {string} - * @memberof BookmarkletImportRequest - */ - html: string; - /** - * - * @type {number} - * @memberof BookmarkletImportRequest - */ - id?: number; -} - -/** - * Check if a given object implements the BookmarkletImportRequest interface. - */ -export function instanceOfBookmarkletImportRequest(value: object): boolean { - if (!('html' in value)) return false; - return true; -} - -export function BookmarkletImportRequestFromJSON(json: any): BookmarkletImportRequest { - return BookmarkletImportRequestFromJSONTyped(json, false); -} - -export function BookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkletImportRequest { - if (json == null) { - return json; - } - return { - - 'url': json['url'] == null ? undefined : json['url'], - 'html': json['html'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest | null): any { - if (value == null) { - return value; - } - return { - - 'url': value['url'], - 'html': value['html'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/ConnectorConfigConfigRequest.ts b/vue3/src/openapi/models/ConnectorConfigConfigRequest.ts deleted file mode 100644 index 58c06a23d..000000000 --- a/vue3/src/openapi/models/ConnectorConfigConfigRequest.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ConnectorConfigConfigRequest - */ -export interface ConnectorConfigConfigRequest { - /** - * - * @type {string} - * @memberof ConnectorConfigConfigRequest - */ - name: string; - /** - * - * @type {string} - * @memberof ConnectorConfigConfigRequest - */ - url?: string; - /** - * - * @type {string} - * @memberof ConnectorConfigConfigRequest - */ - token?: string; - /** - * - * @type {string} - * @memberof ConnectorConfigConfigRequest - */ - todoEntity?: string; - /** - * Is Connector Enabled - * @type {boolean} - * @memberof ConnectorConfigConfigRequest - */ - enabled?: boolean; - /** - * - * @type {boolean} - * @memberof ConnectorConfigConfigRequest - */ - onShoppingListEntryCreatedEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof ConnectorConfigConfigRequest - */ - onShoppingListEntryUpdatedEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof ConnectorConfigConfigRequest - */ - onShoppingListEntryDeletedEnabled?: boolean; - /** - * - * @type {number} - * @memberof ConnectorConfigConfigRequest - */ - id?: number; -} - -/** - * Check if a given object implements the ConnectorConfigConfigRequest interface. - */ -export function instanceOfConnectorConfigConfigRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function ConnectorConfigConfigRequestFromJSON(json: any): ConnectorConfigConfigRequest { - return ConnectorConfigConfigRequestFromJSONTyped(json, false); -} - -export function ConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorConfigConfigRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'url': json['url'] == null ? undefined : json['url'], - 'token': json['token'] == null ? undefined : json['token'], - 'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'], - 'enabled': json['enabled'] == null ? undefined : json['enabled'], - 'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'], - 'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'], - 'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function ConnectorConfigConfigRequestToJSON(value?: ConnectorConfigConfigRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'url': value['url'], - 'token': value['token'], - 'todo_entity': value['todoEntity'], - 'enabled': value['enabled'], - 'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'], - 'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'], - 'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/CookLogCreatedBy.ts b/vue3/src/openapi/models/CookLogCreatedBy.ts deleted file mode 100644 index a46621b8a..000000000 --- a/vue3/src/openapi/models/CookLogCreatedBy.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CookLogCreatedBy - */ -export interface CookLogCreatedBy { - /** - * - * @type {number} - * @memberof CookLogCreatedBy - */ - readonly id?: number; - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - * @type {string} - * @memberof CookLogCreatedBy - */ - readonly username?: string; - /** - * - * @type {string} - * @memberof CookLogCreatedBy - */ - firstName?: string; - /** - * - * @type {string} - * @memberof CookLogCreatedBy - */ - lastName?: string; - /** - * - * @type {string} - * @memberof CookLogCreatedBy - */ - readonly displayName?: string; -} - -/** - * Check if a given object implements the CookLogCreatedBy interface. - */ -export function instanceOfCookLogCreatedBy(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function CookLogCreatedByFromJSON(json: any): CookLogCreatedBy { - return CookLogCreatedByFromJSONTyped(json, false); -} - -export function CookLogCreatedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogCreatedBy { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'username': !exists(json, 'username') ? undefined : json['username'], - 'firstName': !exists(json, 'first_name') ? undefined : json['first_name'], - 'lastName': !exists(json, 'last_name') ? undefined : json['last_name'], - 'displayName': !exists(json, 'display_name') ? undefined : json['display_name'], - }; -} - -export function CookLogCreatedByToJSON(value?: CookLogCreatedBy | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'first_name': value.firstName, - 'last_name': value.lastName, - }; -} - diff --git a/vue3/src/openapi/models/CookLogRequest.ts b/vue3/src/openapi/models/CookLogRequest.ts deleted file mode 100644 index 247cf072e..000000000 --- a/vue3/src/openapi/models/CookLogRequest.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface CookLogRequest - */ -export interface CookLogRequest { - /** - * - * @type {number} - * @memberof CookLogRequest - */ - recipe: number; - /** - * - * @type {number} - * @memberof CookLogRequest - */ - servings?: number; - /** - * - * @type {number} - * @memberof CookLogRequest - */ - rating?: number; - /** - * - * @type {string} - * @memberof CookLogRequest - */ - comment?: string; - /** - * - * @type {Date} - * @memberof CookLogRequest - */ - createdAt?: Date; - /** - * - * @type {number} - * @memberof CookLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the CookLogRequest interface. - */ -export function instanceOfCookLogRequest(value: object): boolean { - if (!('recipe' in value)) return false; - return true; -} - -export function CookLogRequestFromJSON(json: any): CookLogRequest { - return CookLogRequestFromJSONTyped(json, false); -} - -export function CookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogRequest { - if (json == null) { - return json; - } - return { - - 'recipe': json['recipe'], - 'servings': json['servings'] == null ? undefined : json['servings'], - 'rating': json['rating'] == null ? undefined : json['rating'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function CookLogRequestToJSON(value?: CookLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'recipe': value['recipe'], - 'servings': value['servings'], - 'rating': value['rating'], - 'comment': value['comment'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/CustomFilterRequest.ts b/vue3/src/openapi/models/CustomFilterRequest.ts deleted file mode 100644 index cb22523b1..000000000 --- a/vue3/src/openapi/models/CustomFilterRequest.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface CustomFilterRequest - */ -export interface CustomFilterRequest { - /** - * - * @type {string} - * @memberof CustomFilterRequest - */ - name: string; - /** - * - * @type {string} - * @memberof CustomFilterRequest - */ - search: string; - /** - * - * @type {Array} - * @memberof CustomFilterRequest - */ - shared?: Array; - /** - * - * @type {number} - * @memberof CustomFilterRequest - */ - id?: number; -} - -/** - * Check if a given object implements the CustomFilterRequest interface. - */ -export function instanceOfCustomFilterRequest(value: object): boolean { - if (!('name' in value)) return false; - if (!('search' in value)) return false; - return true; -} - -export function CustomFilterRequestFromJSON(json: any): CustomFilterRequest { - return CustomFilterRequestFromJSONTyped(json, false); -} - -export function CustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'search': json['search'], - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function CustomFilterRequestToJSON(value?: CustomFilterRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'search': value['search'], - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/CustomFilterSharedInner.ts b/vue3/src/openapi/models/CustomFilterSharedInner.ts deleted file mode 100644 index 136085e05..000000000 --- a/vue3/src/openapi/models/CustomFilterSharedInner.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CustomFilterSharedInner - */ -export interface CustomFilterSharedInner { - /** - * - * @type {number} - * @memberof CustomFilterSharedInner - */ - readonly id?: number; - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - * @type {string} - * @memberof CustomFilterSharedInner - */ - readonly username?: string; - /** - * - * @type {string} - * @memberof CustomFilterSharedInner - */ - firstName?: string; - /** - * - * @type {string} - * @memberof CustomFilterSharedInner - */ - lastName?: string; - /** - * - * @type {string} - * @memberof CustomFilterSharedInner - */ - readonly displayName?: string; -} - -/** - * Check if a given object implements the CustomFilterSharedInner interface. - */ -export function instanceOfCustomFilterSharedInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function CustomFilterSharedInnerFromJSON(json: any): CustomFilterSharedInner { - return CustomFilterSharedInnerFromJSONTyped(json, false); -} - -export function CustomFilterSharedInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterSharedInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'username': !exists(json, 'username') ? undefined : json['username'], - 'firstName': !exists(json, 'first_name') ? undefined : json['first_name'], - 'lastName': !exists(json, 'last_name') ? undefined : json['last_name'], - 'displayName': !exists(json, 'display_name') ? undefined : json['display_name'], - }; -} - -export function CustomFilterSharedInnerToJSON(value?: CustomFilterSharedInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'first_name': value.firstName, - 'last_name': value.lastName, - }; -} - diff --git a/vue3/src/openapi/models/ExportLogRequest.ts b/vue3/src/openapi/models/ExportLogRequest.ts deleted file mode 100644 index d2bd09517..000000000 --- a/vue3/src/openapi/models/ExportLogRequest.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ExportLogRequest - */ -export interface ExportLogRequest { - /** - * - * @type {string} - * @memberof ExportLogRequest - */ - type: string; - /** - * - * @type {string} - * @memberof ExportLogRequest - */ - msg?: string; - /** - * - * @type {boolean} - * @memberof ExportLogRequest - */ - running?: boolean; - /** - * - * @type {number} - * @memberof ExportLogRequest - */ - totalRecipes?: number; - /** - * - * @type {number} - * @memberof ExportLogRequest - */ - exportedRecipes?: number; - /** - * - * @type {number} - * @memberof ExportLogRequest - */ - cacheDuration?: number; - /** - * - * @type {boolean} - * @memberof ExportLogRequest - */ - possiblyNotExpired?: boolean; - /** - * - * @type {number} - * @memberof ExportLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the ExportLogRequest interface. - */ -export function instanceOfExportLogRequest(value: object): boolean { - if (!('type' in value)) return false; - return true; -} - -export function ExportLogRequestFromJSON(json: any): ExportLogRequest { - return ExportLogRequestFromJSONTyped(json, false); -} - -export function ExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportLogRequest { - if (json == null) { - return json; - } - return { - - 'type': json['type'], - 'msg': json['msg'] == null ? undefined : json['msg'], - 'running': json['running'] == null ? undefined : json['running'], - 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], - 'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'], - 'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'], - 'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function ExportLogRequestToJSON(value?: ExportLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'type': value['type'], - 'msg': value['msg'], - 'running': value['running'], - 'total_recipes': value['totalRecipes'], - 'exported_recipes': value['exportedRecipes'], - 'cache_duration': value['cacheDuration'], - 'possibly_not_expired': value['possiblyNotExpired'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/FoodInheritFieldRequest.ts b/vue3/src/openapi/models/FoodInheritFieldRequest.ts deleted file mode 100644 index 7029be831..000000000 --- a/vue3/src/openapi/models/FoodInheritFieldRequest.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface FoodInheritFieldRequest - */ -export interface FoodInheritFieldRequest { - /** - * - * @type {string} - * @memberof FoodInheritFieldRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof FoodInheritFieldRequest - */ - field?: string; - /** - * - * @type {number} - * @memberof FoodInheritFieldRequest - */ - id?: number; -} - -/** - * Check if a given object implements the FoodInheritFieldRequest interface. - */ -export function instanceOfFoodInheritFieldRequest(value: object): boolean { - return true; -} - -export function FoodInheritFieldRequestFromJSON(json: any): FoodInheritFieldRequest { - return FoodInheritFieldRequestFromJSONTyped(json, false); -} - -export function FoodInheritFieldRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'field': json['field'] == null ? undefined : json['field'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'field': value['field'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/FoodInheritFieldsInner.ts b/vue3/src/openapi/models/FoodInheritFieldsInner.ts deleted file mode 100644 index a78cf1ccb..000000000 --- a/vue3/src/openapi/models/FoodInheritFieldsInner.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodInheritFieldsInner - */ -export interface FoodInheritFieldsInner { - /** - * - * @type {number} - * @memberof FoodInheritFieldsInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof FoodInheritFieldsInner - */ - name?: string | null; - /** - * - * @type {string} - * @memberof FoodInheritFieldsInner - */ - field?: string | null; -} - -/** - * Check if a given object implements the FoodInheritFieldsInner interface. - */ -export function instanceOfFoodInheritFieldsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function FoodInheritFieldsInnerFromJSON(json: any): FoodInheritFieldsInner { - return FoodInheritFieldsInnerFromJSONTyped(json, false); -} - -export function FoodInheritFieldsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'field': !exists(json, 'field') ? undefined : json['field'], - }; -} - -export function FoodInheritFieldsInnerToJSON(value?: FoodInheritFieldsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'field': value.field, - }; -} - diff --git a/vue3/src/openapi/models/FoodPropertiesFoodUnit.ts b/vue3/src/openapi/models/FoodPropertiesFoodUnit.ts deleted file mode 100644 index 9597799d9..000000000 --- a/vue3/src/openapi/models/FoodPropertiesFoodUnit.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodPropertiesFoodUnit - */ -export interface FoodPropertiesFoodUnit { - /** - * - * @type {number} - * @memberof FoodPropertiesFoodUnit - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof FoodPropertiesFoodUnit - */ - name: string; - /** - * - * @type {string} - * @memberof FoodPropertiesFoodUnit - */ - pluralName?: string | null; - /** - * - * @type {string} - * @memberof FoodPropertiesFoodUnit - */ - description?: string | null; - /** - * - * @type {string} - * @memberof FoodPropertiesFoodUnit - */ - baseUnit?: string | null; - /** - * - * @type {string} - * @memberof FoodPropertiesFoodUnit - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the FoodPropertiesFoodUnit interface. - */ -export function instanceOfFoodPropertiesFoodUnit(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function FoodPropertiesFoodUnitFromJSON(json: any): FoodPropertiesFoodUnit { - return FoodPropertiesFoodUnitFromJSONTyped(json, false); -} - -export function FoodPropertiesFoodUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesFoodUnit { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'], - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - }; -} - -export function FoodPropertiesFoodUnitToJSON(value?: FoodPropertiesFoodUnit | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'plural_name': value.pluralName, - 'description': value.description, - 'base_unit': value.baseUnit, - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/vue3/src/openapi/models/FoodPropertiesInner.ts b/vue3/src/openapi/models/FoodPropertiesInner.ts deleted file mode 100644 index 95554ac08..000000000 --- a/vue3/src/openapi/models/FoodPropertiesInner.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { FoodPropertiesInnerPropertyType } from './FoodPropertiesInnerPropertyType'; -import { - FoodPropertiesInnerPropertyTypeFromJSON, - FoodPropertiesInnerPropertyTypeFromJSONTyped, - FoodPropertiesInnerPropertyTypeToJSON, -} from './FoodPropertiesInnerPropertyType'; - -/** - * - * @export - * @interface FoodPropertiesInner - */ -export interface FoodPropertiesInner { - /** - * - * @type {number} - * @memberof FoodPropertiesInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof FoodPropertiesInner - */ - propertyAmount: string | null; - /** - * - * @type {FoodPropertiesInnerPropertyType} - * @memberof FoodPropertiesInner - */ - propertyType: FoodPropertiesInnerPropertyType; -} - -/** - * Check if a given object implements the FoodPropertiesInner interface. - */ -export function instanceOfFoodPropertiesInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "propertyAmount" in value; - isInstance = isInstance && "propertyType" in value; - - return isInstance; -} - -export function FoodPropertiesInnerFromJSON(json: any): FoodPropertiesInner { - return FoodPropertiesInnerFromJSONTyped(json, false); -} - -export function FoodPropertiesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'propertyAmount': json['property_amount'], - 'propertyType': FoodPropertiesInnerPropertyTypeFromJSON(json['property_type']), - }; -} - -export function FoodPropertiesInnerToJSON(value?: FoodPropertiesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'property_amount': value.propertyAmount, - 'property_type': FoodPropertiesInnerPropertyTypeToJSON(value.propertyType), - }; -} - diff --git a/vue3/src/openapi/models/FoodPropertiesInnerPropertyType.ts b/vue3/src/openapi/models/FoodPropertiesInnerPropertyType.ts deleted file mode 100644 index ceaaa2e79..000000000 --- a/vue3/src/openapi/models/FoodPropertiesInnerPropertyType.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodPropertiesInnerPropertyType - */ -export interface FoodPropertiesInnerPropertyType { - /** - * - * @type {number} - * @memberof FoodPropertiesInnerPropertyType - */ - id?: number; - /** - * - * @type {string} - * @memberof FoodPropertiesInnerPropertyType - */ - name: string; - /** - * - * @type {string} - * @memberof FoodPropertiesInnerPropertyType - */ - unit?: string | null; - /** - * - * @type {string} - * @memberof FoodPropertiesInnerPropertyType - */ - description?: string | null; - /** - * - * @type {number} - * @memberof FoodPropertiesInnerPropertyType - */ - order?: number; - /** - * - * @type {string} - * @memberof FoodPropertiesInnerPropertyType - */ - openDataSlug?: string | null; - /** - * - * @type {number} - * @memberof FoodPropertiesInnerPropertyType - */ - fdcId?: number | null; -} - -/** - * Check if a given object implements the FoodPropertiesInnerPropertyType interface. - */ -export function instanceOfFoodPropertiesInnerPropertyType(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function FoodPropertiesInnerPropertyTypeFromJSON(json: any): FoodPropertiesInnerPropertyType { - return FoodPropertiesInnerPropertyTypeFromJSONTyped(json, false); -} - -export function FoodPropertiesInnerPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesInnerPropertyType { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'unit': !exists(json, 'unit') ? undefined : json['unit'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - 'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'], - }; -} - -export function FoodPropertiesInnerPropertyTypeToJSON(value?: FoodPropertiesInnerPropertyType | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - 'unit': value.unit, - 'description': value.description, - 'order': value.order, - 'open_data_slug': value.openDataSlug, - 'fdc_id': value.fdcId, - }; -} - diff --git a/vue3/src/openapi/models/FoodRecipe.ts b/vue3/src/openapi/models/FoodRecipe.ts deleted file mode 100644 index 7dc673cde..000000000 --- a/vue3/src/openapi/models/FoodRecipe.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodRecipe - */ -export interface FoodRecipe { - /** - * - * @type {number} - * @memberof FoodRecipe - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof FoodRecipe - */ - name: string; - /** - * - * @type {string} - * @memberof FoodRecipe - */ - readonly url?: string; -} - -/** - * Check if a given object implements the FoodRecipe interface. - */ -export function instanceOfFoodRecipe(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function FoodRecipeFromJSON(json: any): FoodRecipe { - return FoodRecipeFromJSONTyped(json, false); -} - -export function FoodRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRecipe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'url': !exists(json, 'url') ? undefined : json['url'], - }; -} - -export function FoodRecipeToJSON(value?: FoodRecipe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/vue3/src/openapi/models/FoodRequest.ts b/vue3/src/openapi/models/FoodRequest.ts deleted file mode 100644 index b2fcce0fa..000000000 --- a/vue3/src/openapi/models/FoodRequest.ts +++ /dev/null @@ -1,276 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodInheritFieldRequest } from './FoodInheritFieldRequest'; -import { - FoodInheritFieldRequestFromJSON, - FoodInheritFieldRequestFromJSONTyped, - FoodInheritFieldRequestToJSON, -} from './FoodInheritFieldRequest'; -import type { FoodSimpleRequest } from './FoodSimpleRequest'; -import { - FoodSimpleRequestFromJSON, - FoodSimpleRequestFromJSONTyped, - FoodSimpleRequestToJSON, -} from './FoodSimpleRequest'; -import type { PropertyRequest } from './PropertyRequest'; -import { - PropertyRequestFromJSON, - PropertyRequestFromJSONTyped, - PropertyRequestToJSON, -} from './PropertyRequest'; -import type { RecipeSimpleRequest } from './RecipeSimpleRequest'; -import { - RecipeSimpleRequestFromJSON, - RecipeSimpleRequestFromJSONTyped, - RecipeSimpleRequestToJSON, -} from './RecipeSimpleRequest'; -import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest'; -import { - SupermarketCategoryRequestFromJSON, - SupermarketCategoryRequestFromJSONTyped, - SupermarketCategoryRequestToJSON, -} from './SupermarketCategoryRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface FoodRequest - */ -export interface FoodRequest { - /** - * - * @type {string} - * @memberof FoodRequest - */ - name: string; - /** - * - * @type {string} - * @memberof FoodRequest - */ - pluralName?: string; - /** - * - * @type {string} - * @memberof FoodRequest - */ - description?: string; - /** - * - * @type {RecipeSimpleRequest} - * @memberof FoodRequest - */ - recipe?: RecipeSimpleRequest; - /** - * - * @type {string} - * @memberof FoodRequest - */ - url?: string; - /** - * - * @type {Array} - * @memberof FoodRequest - */ - properties?: Array; - /** - * - * @type {number} - * @memberof FoodRequest - */ - propertiesFoodAmount?: number; - /** - * - * @type {UnitRequest} - * @memberof FoodRequest - */ - propertiesFoodUnit?: UnitRequest; - /** - * - * @type {number} - * @memberof FoodRequest - */ - fdcId?: number; - /** - * - * @type {boolean} - * @memberof FoodRequest - */ - foodOnhand?: boolean; - /** - * - * @type {SupermarketCategoryRequest} - * @memberof FoodRequest - */ - supermarketCategory?: SupermarketCategoryRequest; - /** - * - * @type {Array} - * @memberof FoodRequest - */ - inheritFields?: Array; - /** - * - * @type {boolean} - * @memberof FoodRequest - */ - ignoreShopping?: boolean; - /** - * - * @type {Array} - * @memberof FoodRequest - */ - substitute?: Array; - /** - * - * @type {boolean} - * @memberof FoodRequest - */ - substituteSiblings?: boolean; - /** - * - * @type {boolean} - * @memberof FoodRequest - */ - substituteChildren?: boolean; - /** - * - * @type {Array} - * @memberof FoodRequest - */ - childInheritFields?: Array; - /** - * - * @type {string} - * @memberof FoodRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof FoodRequest - */ - id?: number; -} - -/** - * Check if a given object implements the FoodRequest interface. - */ -export function instanceOfFoodRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function FoodRequestFromJSON(json: any): FoodRequest { - return FoodRequestFromJSONTyped(json, false); -} - -export function FoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'description': json['description'] == null ? undefined : json['description'], - 'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']), - 'url': json['url'] == null ? undefined : json['url'], - 'properties': json['properties'] == null ? undefined : ((json['properties'] as Array).map(PropertyRequestFromJSON)), - 'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'], - 'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']), - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - 'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'], - 'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']), - 'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array).map(FoodInheritFieldRequestFromJSON)), - 'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'], - 'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array).map(FoodSimpleRequestFromJSON)), - 'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'], - 'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'], - 'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array).map(FoodInheritFieldRequestFromJSON)), - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function FoodRequestToJSON(value?: FoodRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'plural_name': value['pluralName'], - 'description': value['description'], - 'recipe': RecipeSimpleRequestToJSON(value['recipe']), - 'url': value['url'], - 'properties': value['properties'] == null ? undefined : ((value['properties'] as Array).map(PropertyRequestToJSON)), - 'properties_food_amount': value['propertiesFoodAmount'], - 'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']), - 'fdc_id': value['fdcId'], - 'food_onhand': value['foodOnhand'], - 'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']), - 'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array).map(FoodInheritFieldRequestToJSON)), - 'ignore_shopping': value['ignoreShopping'], - 'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array).map(FoodSimpleRequestToJSON)), - 'substitute_siblings': value['substituteSiblings'], - 'substitute_children': value['substituteChildren'], - 'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array).map(FoodInheritFieldRequestToJSON)), - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/FoodShoppingUpdateDelete.ts b/vue3/src/openapi/models/FoodShoppingUpdateDelete.ts deleted file mode 100644 index 1e912051f..000000000 --- a/vue3/src/openapi/models/FoodShoppingUpdateDelete.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * 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 { BlankEnum } from './BlankEnum'; -import { - instanceOfBlankEnum, - BlankEnumFromJSON, - BlankEnumFromJSONTyped, - BlankEnumToJSON, -} from './BlankEnum'; -import type { DeleteEnum } from './DeleteEnum'; -import { - instanceOfDeleteEnum, - DeleteEnumFromJSON, - DeleteEnumFromJSONTyped, - DeleteEnumToJSON, -} from './DeleteEnum'; - -/** - * @type FoodShoppingUpdateDelete - * When set to true will delete all food from active shopping lists. - * - * * `true` - true - * @export - */ -export type FoodShoppingUpdateDelete = BlankEnum | DeleteEnum; - -export function FoodShoppingUpdateDeleteFromJSON(json: any): FoodShoppingUpdateDelete { - return FoodShoppingUpdateDeleteFromJSONTyped(json, false); -} - -export function FoodShoppingUpdateDeleteFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateDelete { - if ((json === undefined) || (json === null)) { - return json; - } - return { ...BlankEnumFromJSONTyped(json, true), ...DeleteEnumFromJSONTyped(json, true) }; -} - -export function FoodShoppingUpdateDeleteToJSON(value?: FoodShoppingUpdateDelete | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - - if (instanceOfBlankEnum(value)) { - return BlankEnumToJSON(value as BlankEnum); - } - if (instanceOfDeleteEnum(value)) { - return DeleteEnumToJSON(value as DeleteEnum); - } - - return {}; -} - diff --git a/vue3/src/openapi/models/FoodShoppingUpdateRequest.ts b/vue3/src/openapi/models/FoodShoppingUpdateRequest.ts deleted file mode 100644 index bfafc991d..000000000 --- a/vue3/src/openapi/models/FoodShoppingUpdateRequest.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { DeleteEnum } from './DeleteEnum'; -import { - DeleteEnumFromJSON, - DeleteEnumFromJSONTyped, - DeleteEnumToJSON, -} from './DeleteEnum'; - -/** - * - * @export - * @interface FoodShoppingUpdateRequest - */ -export interface FoodShoppingUpdateRequest { - /** - * Amount of food to add to the shopping list - * @type {number} - * @memberof FoodShoppingUpdateRequest - */ - amount?: number; - /** - * ID of unit to use for the shopping list - * @type {number} - * @memberof FoodShoppingUpdateRequest - */ - unit?: number; - /** - * When set to true will delete all food from active shopping lists. - * - * * `true` - true - * @type {DeleteEnum} - * @memberof FoodShoppingUpdateRequest - */ - _delete: DeleteEnum | null; - /** - * - * @type {number} - * @memberof FoodShoppingUpdateRequest - */ - id?: number; -} - -/** - * Check if a given object implements the FoodShoppingUpdateRequest interface. - */ -export function instanceOfFoodShoppingUpdateRequest(value: object): boolean { - if (!('_delete' in value)) return false; - return true; -} - -export function FoodShoppingUpdateRequestFromJSON(json: any): FoodShoppingUpdateRequest { - return FoodShoppingUpdateRequestFromJSONTyped(json, false); -} - -export function FoodShoppingUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateRequest { - if (json == null) { - return json; - } - return { - - 'amount': json['amount'] == null ? undefined : json['amount'], - 'unit': json['unit'] == null ? undefined : json['unit'], - '_delete': DeleteEnumFromJSON(json['delete']), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateRequest | null): any { - if (value == null) { - return value; - } - return { - - 'amount': value['amount'], - 'unit': value['unit'], - 'delete': DeleteEnumToJSON(value['_delete']), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/FoodSimpleRequest.ts b/vue3/src/openapi/models/FoodSimpleRequest.ts deleted file mode 100644 index 26baceb4c..000000000 --- a/vue3/src/openapi/models/FoodSimpleRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodSimpleRequest - */ -export interface FoodSimpleRequest { - /** - * - * @type {string} - * @memberof FoodSimpleRequest - */ - name: string; - /** - * - * @type {string} - * @memberof FoodSimpleRequest - */ - pluralName?: string; - /** - * - * @type {number} - * @memberof FoodSimpleRequest - */ - id?: number; -} - -/** - * Check if a given object implements the FoodSimpleRequest interface. - */ -export function instanceOfFoodSimpleRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function FoodSimpleRequestFromJSON(json: any): FoodSimpleRequest { - return FoodSimpleRequestFromJSONTyped(json, false); -} - -export function FoodSimpleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSimpleRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'plural_name': value['pluralName'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/FoodSubstituteInner.ts b/vue3/src/openapi/models/FoodSubstituteInner.ts deleted file mode 100644 index e6f9b7995..000000000 --- a/vue3/src/openapi/models/FoodSubstituteInner.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodSubstituteInner - */ -export interface FoodSubstituteInner { - /** - * - * @type {number} - * @memberof FoodSubstituteInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof FoodSubstituteInner - */ - name: string; - /** - * - * @type {string} - * @memberof FoodSubstituteInner - */ - pluralName?: string | null; -} - -/** - * Check if a given object implements the FoodSubstituteInner interface. - */ -export function instanceOfFoodSubstituteInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function FoodSubstituteInnerFromJSON(json: any): FoodSubstituteInner { - return FoodSubstituteInnerFromJSONTyped(json, false); -} - -export function FoodSubstituteInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSubstituteInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'], - }; -} - -export function FoodSubstituteInnerToJSON(value?: FoodSubstituteInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'plural_name': value.pluralName, - }; -} - diff --git a/vue3/src/openapi/models/FoodSupermarketCategory.ts b/vue3/src/openapi/models/FoodSupermarketCategory.ts deleted file mode 100644 index 8c9ba503b..000000000 --- a/vue3/src/openapi/models/FoodSupermarketCategory.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FoodSupermarketCategory - */ -export interface FoodSupermarketCategory { - /** - * - * @type {number} - * @memberof FoodSupermarketCategory - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof FoodSupermarketCategory - */ - name: string; - /** - * - * @type {string} - * @memberof FoodSupermarketCategory - */ - description?: string | null; -} - -/** - * Check if a given object implements the FoodSupermarketCategory interface. - */ -export function instanceOfFoodSupermarketCategory(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function FoodSupermarketCategoryFromJSON(json: any): FoodSupermarketCategory { - return FoodSupermarketCategoryFromJSONTyped(json, false); -} - -export function FoodSupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSupermarketCategory { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function FoodSupermarketCategoryToJSON(value?: FoodSupermarketCategory | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - }; -} - diff --git a/vue3/src/openapi/models/GroupRequest.ts b/vue3/src/openapi/models/GroupRequest.ts deleted file mode 100644 index c14fd7857..000000000 --- a/vue3/src/openapi/models/GroupRequest.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface GroupRequest - */ -export interface GroupRequest { - /** - * - * @type {string} - * @memberof GroupRequest - */ - name: string; - /** - * - * @type {number} - * @memberof GroupRequest - */ - id?: number; -} - -/** - * Check if a given object implements the GroupRequest interface. - */ -export function instanceOfGroupRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function GroupRequestFromJSON(json: any): GroupRequest { - return GroupRequestFromJSONTyped(json, false); -} - -export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function GroupRequestToJSON(value?: GroupRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/ImportLogKeyword.ts b/vue3/src/openapi/models/ImportLogKeyword.ts deleted file mode 100644 index 5feb33a0b..000000000 --- a/vue3/src/openapi/models/ImportLogKeyword.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ImportLogKeyword - */ -export interface ImportLogKeyword { - /** - * - * @type {number} - * @memberof ImportLogKeyword - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ImportLogKeyword - */ - name: string; - /** - * - * @type {string} - * @memberof ImportLogKeyword - */ - readonly label?: string; - /** - * - * @type {string} - * @memberof ImportLogKeyword - */ - description?: string; - /** - * - * @type {string} - * @memberof ImportLogKeyword - */ - readonly parent?: string; - /** - * - * @type {number} - * @memberof ImportLogKeyword - */ - readonly numchild?: number; - /** - * - * @type {Date} - * @memberof ImportLogKeyword - */ - readonly createdAt?: Date; - /** - * - * @type {Date} - * @memberof ImportLogKeyword - */ - readonly updatedAt?: Date; - /** - * - * @type {string} - * @memberof ImportLogKeyword - */ - readonly fullName?: string; -} - -/** - * Check if a given object implements the ImportLogKeyword interface. - */ -export function instanceOfImportLogKeyword(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function ImportLogKeywordFromJSON(json: any): ImportLogKeyword { - return ImportLogKeywordFromJSONTyped(json, false); -} - -export function ImportLogKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogKeyword { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'label': !exists(json, 'label') ? undefined : json['label'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'parent': !exists(json, 'parent') ? undefined : json['parent'], - 'numchild': !exists(json, 'numchild') ? undefined : json['numchild'], - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), - 'fullName': !exists(json, 'full_name') ? undefined : json['full_name'], - }; -} - -export function ImportLogKeywordToJSON(value?: ImportLogKeyword | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - }; -} - diff --git a/vue3/src/openapi/models/ImportLogRequest.ts b/vue3/src/openapi/models/ImportLogRequest.ts deleted file mode 100644 index 209d2dc4b..000000000 --- a/vue3/src/openapi/models/ImportLogRequest.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ImportLogRequest - */ -export interface ImportLogRequest { - /** - * - * @type {string} - * @memberof ImportLogRequest - */ - type: string; - /** - * - * @type {string} - * @memberof ImportLogRequest - */ - msg?: string; - /** - * - * @type {boolean} - * @memberof ImportLogRequest - */ - running?: boolean; - /** - * - * @type {number} - * @memberof ImportLogRequest - */ - totalRecipes?: number; - /** - * - * @type {number} - * @memberof ImportLogRequest - */ - importedRecipes?: number; - /** - * - * @type {number} - * @memberof ImportLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the ImportLogRequest interface. - */ -export function instanceOfImportLogRequest(value: object): boolean { - if (!('type' in value)) return false; - return true; -} - -export function ImportLogRequestFromJSON(json: any): ImportLogRequest { - return ImportLogRequestFromJSONTyped(json, false); -} - -export function ImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogRequest { - if (json == null) { - return json; - } - return { - - 'type': json['type'], - 'msg': json['msg'] == null ? undefined : json['msg'], - 'running': json['running'] == null ? undefined : json['running'], - 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], - 'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function ImportLogRequestToJSON(value?: ImportLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'type': value['type'], - 'msg': value['msg'], - 'running': value['running'], - 'total_recipes': value['totalRecipes'], - 'imported_recipes': value['importedRecipes'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/IngredientFood.ts b/vue3/src/openapi/models/IngredientFood.ts deleted file mode 100644 index d0171619b..000000000 --- a/vue3/src/openapi/models/IngredientFood.ts +++ /dev/null @@ -1,281 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { FoodInheritFieldsInner } from './FoodInheritFieldsInner'; -import { - FoodInheritFieldsInnerFromJSON, - FoodInheritFieldsInnerFromJSONTyped, - FoodInheritFieldsInnerToJSON, -} from './FoodInheritFieldsInner'; -import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit'; -import { - FoodPropertiesFoodUnitFromJSON, - FoodPropertiesFoodUnitFromJSONTyped, - FoodPropertiesFoodUnitToJSON, -} from './FoodPropertiesFoodUnit'; -import type { FoodPropertiesInner } from './FoodPropertiesInner'; -import { - FoodPropertiesInnerFromJSON, - FoodPropertiesInnerFromJSONTyped, - FoodPropertiesInnerToJSON, -} from './FoodPropertiesInner'; -import type { FoodRecipe } from './FoodRecipe'; -import { - FoodRecipeFromJSON, - FoodRecipeFromJSONTyped, - FoodRecipeToJSON, -} from './FoodRecipe'; -import type { FoodSubstituteInner } from './FoodSubstituteInner'; -import { - FoodSubstituteInnerFromJSON, - FoodSubstituteInnerFromJSONTyped, - FoodSubstituteInnerToJSON, -} from './FoodSubstituteInner'; -import type { FoodSupermarketCategory } from './FoodSupermarketCategory'; -import { - FoodSupermarketCategoryFromJSON, - FoodSupermarketCategoryFromJSONTyped, - FoodSupermarketCategoryToJSON, -} from './FoodSupermarketCategory'; - -/** - * - * @export - * @interface IngredientFood - */ -export interface IngredientFood { - /** - * - * @type {number} - * @memberof IngredientFood - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof IngredientFood - */ - name: string; - /** - * - * @type {string} - * @memberof IngredientFood - */ - pluralName?: string | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - description?: string; - /** - * - * @type {string} - * @memberof IngredientFood - */ - readonly shopping?: string; - /** - * - * @type {FoodRecipe} - * @memberof IngredientFood - */ - recipe?: FoodRecipe | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - url?: string | null; - /** - * - * @type {Array} - * @memberof IngredientFood - */ - properties?: Array | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - propertiesFoodAmount?: string; - /** - * - * @type {FoodPropertiesFoodUnit} - * @memberof IngredientFood - */ - propertiesFoodUnit?: FoodPropertiesFoodUnit | null; - /** - * - * @type {number} - * @memberof IngredientFood - */ - fdcId?: number | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - foodOnhand?: string | null; - /** - * - * @type {FoodSupermarketCategory} - * @memberof IngredientFood - */ - supermarketCategory?: FoodSupermarketCategory | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - readonly parent?: string; - /** - * - * @type {number} - * @memberof IngredientFood - */ - readonly numchild?: number; - /** - * - * @type {Array} - * @memberof IngredientFood - */ - inheritFields?: Array | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - readonly fullName?: string; - /** - * - * @type {boolean} - * @memberof IngredientFood - */ - ignoreShopping?: boolean; - /** - * - * @type {Array} - * @memberof IngredientFood - */ - substitute?: Array | null; - /** - * - * @type {boolean} - * @memberof IngredientFood - */ - substituteSiblings?: boolean; - /** - * - * @type {boolean} - * @memberof IngredientFood - */ - substituteChildren?: boolean; - /** - * - * @type {string} - * @memberof IngredientFood - */ - readonly substituteOnhand?: string; - /** - * - * @type {Array} - * @memberof IngredientFood - */ - childInheritFields?: Array | null; - /** - * - * @type {string} - * @memberof IngredientFood - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the IngredientFood interface. - */ -export function instanceOfIngredientFood(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function IngredientFoodFromJSON(json: any): IngredientFood { - return IngredientFoodFromJSONTyped(json, false); -} - -export function IngredientFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientFood { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'shopping': !exists(json, 'shopping') ? undefined : json['shopping'], - 'recipe': !exists(json, 'recipe') ? undefined : FoodRecipeFromJSON(json['recipe']), - 'url': !exists(json, 'url') ? undefined : json['url'], - 'properties': !exists(json, 'properties') ? undefined : (json['properties'] === null ? null : (json['properties'] as Array).map(FoodPropertiesInnerFromJSON)), - 'propertiesFoodAmount': !exists(json, 'properties_food_amount') ? undefined : json['properties_food_amount'], - 'propertiesFoodUnit': !exists(json, 'properties_food_unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['properties_food_unit']), - 'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'], - 'foodOnhand': !exists(json, 'food_onhand') ? undefined : json['food_onhand'], - 'supermarketCategory': !exists(json, 'supermarket_category') ? undefined : FoodSupermarketCategoryFromJSON(json['supermarket_category']), - 'parent': !exists(json, 'parent') ? undefined : json['parent'], - 'numchild': !exists(json, 'numchild') ? undefined : json['numchild'], - 'inheritFields': !exists(json, 'inherit_fields') ? undefined : (json['inherit_fields'] === null ? null : (json['inherit_fields'] as Array).map(FoodInheritFieldsInnerFromJSON)), - 'fullName': !exists(json, 'full_name') ? undefined : json['full_name'], - 'ignoreShopping': !exists(json, 'ignore_shopping') ? undefined : json['ignore_shopping'], - 'substitute': !exists(json, 'substitute') ? undefined : (json['substitute'] === null ? null : (json['substitute'] as Array).map(FoodSubstituteInnerFromJSON)), - 'substituteSiblings': !exists(json, 'substitute_siblings') ? undefined : json['substitute_siblings'], - 'substituteChildren': !exists(json, 'substitute_children') ? undefined : json['substitute_children'], - 'substituteOnhand': !exists(json, 'substitute_onhand') ? undefined : json['substitute_onhand'], - 'childInheritFields': !exists(json, 'child_inherit_fields') ? undefined : (json['child_inherit_fields'] === null ? null : (json['child_inherit_fields'] as Array).map(FoodInheritFieldsInnerFromJSON)), - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - }; -} - -export function IngredientFoodToJSON(value?: IngredientFood | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'plural_name': value.pluralName, - 'description': value.description, - 'recipe': FoodRecipeToJSON(value.recipe), - 'url': value.url, - 'properties': value.properties === undefined ? undefined : (value.properties === null ? null : (value.properties as Array).map(FoodPropertiesInnerToJSON)), - 'properties_food_amount': value.propertiesFoodAmount, - 'properties_food_unit': FoodPropertiesFoodUnitToJSON(value.propertiesFoodUnit), - 'fdc_id': value.fdcId, - 'food_onhand': value.foodOnhand, - 'supermarket_category': FoodSupermarketCategoryToJSON(value.supermarketCategory), - 'inherit_fields': value.inheritFields === undefined ? undefined : (value.inheritFields === null ? null : (value.inheritFields as Array).map(FoodInheritFieldsInnerToJSON)), - 'ignore_shopping': value.ignoreShopping, - 'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array).map(FoodSubstituteInnerToJSON)), - 'substitute_siblings': value.substituteSiblings, - 'substitute_children': value.substituteChildren, - 'child_inherit_fields': value.childInheritFields === undefined ? undefined : (value.childInheritFields === null ? null : (value.childInheritFields as Array).map(FoodInheritFieldsInnerToJSON)), - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/vue3/src/openapi/models/IngredientRequest.ts b/vue3/src/openapi/models/IngredientRequest.ts deleted file mode 100644 index 0a1f2c1f3..000000000 --- a/vue3/src/openapi/models/IngredientRequest.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodRequest } from './FoodRequest'; -import { - FoodRequestFromJSON, - FoodRequestFromJSONTyped, - FoodRequestToJSON, -} from './FoodRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Adds nested create feature - * @export - * @interface IngredientRequest - */ -export interface IngredientRequest { - /** - * - * @type {FoodRequest} - * @memberof IngredientRequest - */ - food: FoodRequest | null; - /** - * - * @type {UnitRequest} - * @memberof IngredientRequest - */ - unit: UnitRequest | null; - /** - * - * @type {number} - * @memberof IngredientRequest - */ - amount: number; - /** - * - * @type {string} - * @memberof IngredientRequest - */ - note?: string; - /** - * - * @type {number} - * @memberof IngredientRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof IngredientRequest - */ - isHeader?: boolean; - /** - * - * @type {boolean} - * @memberof IngredientRequest - */ - noAmount?: boolean; - /** - * - * @type {string} - * @memberof IngredientRequest - */ - originalText?: string; - /** - * - * @type {boolean} - * @memberof IngredientRequest - */ - alwaysUsePluralUnit?: boolean; - /** - * - * @type {boolean} - * @memberof IngredientRequest - */ - alwaysUsePluralFood?: boolean; - /** - * - * @type {number} - * @memberof IngredientRequest - */ - id?: number; -} - -/** - * Check if a given object implements the IngredientRequest interface. - */ -export function instanceOfIngredientRequest(value: object): boolean { - if (!('food' in value)) return false; - if (!('unit' in value)) return false; - if (!('amount' in value)) return false; - return true; -} - -export function IngredientRequestFromJSON(json: any): IngredientRequest { - return IngredientRequestFromJSONTyped(json, false); -} - -export function IngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientRequest { - if (json == null) { - return json; - } - return { - - 'food': FoodRequestFromJSON(json['food']), - 'unit': UnitRequestFromJSON(json['unit']), - 'amount': json['amount'], - 'note': json['note'] == null ? undefined : json['note'], - 'order': json['order'] == null ? undefined : json['order'], - 'isHeader': json['is_header'] == null ? undefined : json['is_header'], - 'noAmount': json['no_amount'] == null ? undefined : json['no_amount'], - 'originalText': json['original_text'] == null ? undefined : json['original_text'], - 'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'], - 'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function IngredientRequestToJSON(value?: IngredientRequest | null): any { - if (value == null) { - return value; - } - return { - - 'food': FoodRequestToJSON(value['food']), - 'unit': UnitRequestToJSON(value['unit']), - 'amount': value['amount'], - 'note': value['note'], - 'order': value['order'], - 'is_header': value['isHeader'], - 'no_amount': value['noAmount'], - 'original_text': value['originalText'], - 'always_use_plural_unit': value['alwaysUsePluralUnit'], - 'always_use_plural_food': value['alwaysUsePluralFood'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/IngredientStringRequest.ts b/vue3/src/openapi/models/IngredientStringRequest.ts deleted file mode 100644 index a14bbca19..000000000 --- a/vue3/src/openapi/models/IngredientStringRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface IngredientStringRequest - */ -export interface IngredientStringRequest { - /** - * - * @type {string} - * @memberof IngredientStringRequest - */ - text: string; -} - -/** - * Check if a given object implements the IngredientStringRequest interface. - */ -export function instanceOfIngredientStringRequest(value: object): boolean { - if (!('text' in value)) return false; - return true; -} - -export function IngredientStringRequestFromJSON(json: any): IngredientStringRequest { - return IngredientStringRequestFromJSONTyped(json, false); -} - -export function IngredientStringRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientStringRequest { - if (json == null) { - return json; - } - return { - - 'text': json['text'], - }; -} - -export function IngredientStringRequestToJSON(value?: IngredientStringRequest | null): any { - if (value == null) { - return value; - } - return { - - 'text': value['text'], - }; -} - diff --git a/vue3/src/openapi/models/InviteLinkGroup.ts b/vue3/src/openapi/models/InviteLinkGroup.ts deleted file mode 100644 index 0ccfcbbf9..000000000 --- a/vue3/src/openapi/models/InviteLinkGroup.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface InviteLinkGroup - */ -export interface InviteLinkGroup { - /** - * - * @type {number} - * @memberof InviteLinkGroup - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof InviteLinkGroup - */ - name: string; -} - -/** - * Check if a given object implements the InviteLinkGroup interface. - */ -export function instanceOfInviteLinkGroup(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function InviteLinkGroupFromJSON(json: any): InviteLinkGroup { - return InviteLinkGroupFromJSONTyped(json, false); -} - -export function InviteLinkGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkGroup { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - }; -} - -export function InviteLinkGroupToJSON(value?: InviteLinkGroup | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/vue3/src/openapi/models/InviteLinkRequest.ts b/vue3/src/openapi/models/InviteLinkRequest.ts deleted file mode 100644 index 38dc30c84..000000000 --- a/vue3/src/openapi/models/InviteLinkRequest.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { GroupRequest } from './GroupRequest'; -import { - GroupRequestFromJSON, - GroupRequestFromJSONTyped, - GroupRequestToJSON, -} from './GroupRequest'; - -/** - * Adds nested create feature - * @export - * @interface InviteLinkRequest - */ -export interface InviteLinkRequest { - /** - * - * @type {string} - * @memberof InviteLinkRequest - */ - email?: string; - /** - * - * @type {GroupRequest} - * @memberof InviteLinkRequest - */ - group: GroupRequest; - /** - * - * @type {Date} - * @memberof InviteLinkRequest - */ - validUntil?: Date; - /** - * - * @type {number} - * @memberof InviteLinkRequest - */ - usedBy?: number; - /** - * - * @type {boolean} - * @memberof InviteLinkRequest - */ - reusable?: boolean; - /** - * - * @type {string} - * @memberof InviteLinkRequest - */ - internalNote?: string; - /** - * - * @type {number} - * @memberof InviteLinkRequest - */ - id?: number; -} - -/** - * Check if a given object implements the InviteLinkRequest interface. - */ -export function instanceOfInviteLinkRequest(value: object): boolean { - if (!('group' in value)) return false; - return true; -} - -export function InviteLinkRequestFromJSON(json: any): InviteLinkRequest { - return InviteLinkRequestFromJSONTyped(json, false); -} - -export function InviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkRequest { - if (json == null) { - return json; - } - return { - - 'email': json['email'] == null ? undefined : json['email'], - 'group': GroupRequestFromJSON(json['group']), - 'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])), - 'usedBy': json['used_by'] == null ? undefined : json['used_by'], - 'reusable': json['reusable'] == null ? undefined : json['reusable'], - 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function InviteLinkRequestToJSON(value?: InviteLinkRequest | null): any { - if (value == null) { - return value; - } - return { - - 'email': value['email'], - 'group': GroupRequestToJSON(value['group']), - 'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)), - 'used_by': value['usedBy'], - 'reusable': value['reusable'], - 'internal_note': value['internalNote'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/KeywordRequest.ts b/vue3/src/openapi/models/KeywordRequest.ts deleted file mode 100644 index e42338630..000000000 --- a/vue3/src/openapi/models/KeywordRequest.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface KeywordRequest - */ -export interface KeywordRequest { - /** - * - * @type {string} - * @memberof KeywordRequest - */ - name: string; - /** - * - * @type {string} - * @memberof KeywordRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof KeywordRequest - */ - id?: number; -} - -/** - * Check if a given object implements the KeywordRequest interface. - */ -export function instanceOfKeywordRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function KeywordRequestFromJSON(json: any): KeywordRequest { - return KeywordRequestFromJSONTyped(json, false); -} - -export function KeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeywordRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function KeywordRequestToJSON(value?: KeywordRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/ListAutomations200Response.ts b/vue3/src/openapi/models/ListAutomations200Response.ts deleted file mode 100644 index 3e7eee7a8..000000000 --- a/vue3/src/openapi/models/ListAutomations200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { Automation } from './Automation'; -import { - AutomationFromJSON, - AutomationFromJSONTyped, - AutomationToJSON, -} from './Automation'; - -/** - * - * @export - * @interface ListAutomations200Response - */ -export interface ListAutomations200Response { - /** - * - * @type {number} - * @memberof ListAutomations200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListAutomations200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListAutomations200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListAutomations200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListAutomations200Response interface. - */ -export function instanceOfListAutomations200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListAutomations200ResponseFromJSON(json: any): ListAutomations200Response { - return ListAutomations200ResponseFromJSONTyped(json, false); -} - -export function ListAutomations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAutomations200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(AutomationFromJSON)), - }; -} - -export function ListAutomations200ResponseToJSON(value?: ListAutomations200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(AutomationToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListCookLogs200Response.ts b/vue3/src/openapi/models/ListCookLogs200Response.ts deleted file mode 100644 index c0f17f0cc..000000000 --- a/vue3/src/openapi/models/ListCookLogs200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CookLog } from './CookLog'; -import { - CookLogFromJSON, - CookLogFromJSONTyped, - CookLogToJSON, -} from './CookLog'; - -/** - * - * @export - * @interface ListCookLogs200Response - */ -export interface ListCookLogs200Response { - /** - * - * @type {number} - * @memberof ListCookLogs200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListCookLogs200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListCookLogs200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListCookLogs200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListCookLogs200Response interface. - */ -export function instanceOfListCookLogs200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListCookLogs200ResponseFromJSON(json: any): ListCookLogs200Response { - return ListCookLogs200ResponseFromJSONTyped(json, false); -} - -export function ListCookLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListCookLogs200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(CookLogFromJSON)), - }; -} - -export function ListCookLogs200ResponseToJSON(value?: ListCookLogs200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(CookLogToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListCustomFilters200Response.ts b/vue3/src/openapi/models/ListCustomFilters200Response.ts deleted file mode 100644 index 6fb1205a1..000000000 --- a/vue3/src/openapi/models/ListCustomFilters200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CustomFilter } from './CustomFilter'; -import { - CustomFilterFromJSON, - CustomFilterFromJSONTyped, - CustomFilterToJSON, -} from './CustomFilter'; - -/** - * - * @export - * @interface ListCustomFilters200Response - */ -export interface ListCustomFilters200Response { - /** - * - * @type {number} - * @memberof ListCustomFilters200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListCustomFilters200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListCustomFilters200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListCustomFilters200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListCustomFilters200Response interface. - */ -export function instanceOfListCustomFilters200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListCustomFilters200ResponseFromJSON(json: any): ListCustomFilters200Response { - return ListCustomFilters200ResponseFromJSONTyped(json, false); -} - -export function ListCustomFilters200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListCustomFilters200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(CustomFilterFromJSON)), - }; -} - -export function ListCustomFilters200ResponseToJSON(value?: ListCustomFilters200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(CustomFilterToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListExportLogs200Response.ts b/vue3/src/openapi/models/ListExportLogs200Response.ts deleted file mode 100644 index 892d8262c..000000000 --- a/vue3/src/openapi/models/ListExportLogs200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ExportLog } from './ExportLog'; -import { - ExportLogFromJSON, - ExportLogFromJSONTyped, - ExportLogToJSON, -} from './ExportLog'; - -/** - * - * @export - * @interface ListExportLogs200Response - */ -export interface ListExportLogs200Response { - /** - * - * @type {number} - * @memberof ListExportLogs200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListExportLogs200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListExportLogs200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListExportLogs200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListExportLogs200Response interface. - */ -export function instanceOfListExportLogs200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListExportLogs200ResponseFromJSON(json: any): ListExportLogs200Response { - return ListExportLogs200ResponseFromJSONTyped(json, false); -} - -export function ListExportLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListExportLogs200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(ExportLogFromJSON)), - }; -} - -export function ListExportLogs200ResponseToJSON(value?: ListExportLogs200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(ExportLogToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListFoods200Response.ts b/vue3/src/openapi/models/ListFoods200Response.ts deleted file mode 100644 index cc9c9ed5c..000000000 --- a/vue3/src/openapi/models/ListFoods200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { Food } from './Food'; -import { - FoodFromJSON, - FoodFromJSONTyped, - FoodToJSON, -} from './Food'; - -/** - * - * @export - * @interface ListFoods200Response - */ -export interface ListFoods200Response { - /** - * - * @type {number} - * @memberof ListFoods200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListFoods200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListFoods200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListFoods200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListFoods200Response interface. - */ -export function instanceOfListFoods200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListFoods200ResponseFromJSON(json: any): ListFoods200Response { - return ListFoods200ResponseFromJSONTyped(json, false); -} - -export function ListFoods200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFoods200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(FoodFromJSON)), - }; -} - -export function ListFoods200ResponseToJSON(value?: ListFoods200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(FoodToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListImportLogs200Response.ts b/vue3/src/openapi/models/ListImportLogs200Response.ts deleted file mode 100644 index 297cff035..000000000 --- a/vue3/src/openapi/models/ListImportLogs200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ImportLog } from './ImportLog'; -import { - ImportLogFromJSON, - ImportLogFromJSONTyped, - ImportLogToJSON, -} from './ImportLog'; - -/** - * - * @export - * @interface ListImportLogs200Response - */ -export interface ListImportLogs200Response { - /** - * - * @type {number} - * @memberof ListImportLogs200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListImportLogs200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListImportLogs200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListImportLogs200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListImportLogs200Response interface. - */ -export function instanceOfListImportLogs200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListImportLogs200ResponseFromJSON(json: any): ListImportLogs200Response { - return ListImportLogs200ResponseFromJSONTyped(json, false); -} - -export function ListImportLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListImportLogs200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(ImportLogFromJSON)), - }; -} - -export function ListImportLogs200ResponseToJSON(value?: ListImportLogs200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(ImportLogToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListIngredients200Response.ts b/vue3/src/openapi/models/ListIngredients200Response.ts deleted file mode 100644 index 34bd56537..000000000 --- a/vue3/src/openapi/models/ListIngredients200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { Ingredient } from './Ingredient'; -import { - IngredientFromJSON, - IngredientFromJSONTyped, - IngredientToJSON, -} from './Ingredient'; - -/** - * - * @export - * @interface ListIngredients200Response - */ -export interface ListIngredients200Response { - /** - * - * @type {number} - * @memberof ListIngredients200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListIngredients200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListIngredients200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListIngredients200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListIngredients200Response interface. - */ -export function instanceOfListIngredients200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListIngredients200ResponseFromJSON(json: any): ListIngredients200Response { - return ListIngredients200ResponseFromJSONTyped(json, false); -} - -export function ListIngredients200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListIngredients200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(IngredientFromJSON)), - }; -} - -export function ListIngredients200ResponseToJSON(value?: ListIngredients200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(IngredientToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListKeywords200Response.ts b/vue3/src/openapi/models/ListKeywords200Response.ts deleted file mode 100644 index 68a047e2b..000000000 --- a/vue3/src/openapi/models/ListKeywords200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { Keyword } from './Keyword'; -import { - KeywordFromJSON, - KeywordFromJSONTyped, - KeywordToJSON, -} from './Keyword'; - -/** - * - * @export - * @interface ListKeywords200Response - */ -export interface ListKeywords200Response { - /** - * - * @type {number} - * @memberof ListKeywords200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListKeywords200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListKeywords200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListKeywords200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListKeywords200Response interface. - */ -export function instanceOfListKeywords200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListKeywords200ResponseFromJSON(json: any): ListKeywords200Response { - return ListKeywords200ResponseFromJSONTyped(json, false); -} - -export function ListKeywords200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListKeywords200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(KeywordFromJSON)), - }; -} - -export function ListKeywords200ResponseToJSON(value?: ListKeywords200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(KeywordToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListRecipes200Response.ts b/vue3/src/openapi/models/ListRecipes200Response.ts deleted file mode 100644 index 5ed45644c..000000000 --- a/vue3/src/openapi/models/ListRecipes200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { RecipeOverview } from './RecipeOverview'; -import { - RecipeOverviewFromJSON, - RecipeOverviewFromJSONTyped, - RecipeOverviewToJSON, -} from './RecipeOverview'; - -/** - * - * @export - * @interface ListRecipes200Response - */ -export interface ListRecipes200Response { - /** - * - * @type {number} - * @memberof ListRecipes200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListRecipes200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListRecipes200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListRecipes200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListRecipes200Response interface. - */ -export function instanceOfListRecipes200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListRecipes200ResponseFromJSON(json: any): ListRecipes200Response { - return ListRecipes200ResponseFromJSONTyped(json, false); -} - -export function ListRecipes200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRecipes200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(RecipeOverviewFromJSON)), - }; -} - -export function ListRecipes200ResponseToJSON(value?: ListRecipes200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(RecipeOverviewToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListSteps200Response.ts b/vue3/src/openapi/models/ListSteps200Response.ts deleted file mode 100644 index 189aff2e7..000000000 --- a/vue3/src/openapi/models/ListSteps200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { Step } from './Step'; -import { - StepFromJSON, - StepFromJSONTyped, - StepToJSON, -} from './Step'; - -/** - * - * @export - * @interface ListSteps200Response - */ -export interface ListSteps200Response { - /** - * - * @type {number} - * @memberof ListSteps200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListSteps200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListSteps200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListSteps200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListSteps200Response interface. - */ -export function instanceOfListSteps200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListSteps200ResponseFromJSON(json: any): ListSteps200Response { - return ListSteps200ResponseFromJSONTyped(json, false); -} - -export function ListSteps200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSteps200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(StepFromJSON)), - }; -} - -export function ListSteps200ResponseToJSON(value?: ListSteps200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(StepToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListSupermarketCategoryRelations200Response.ts b/vue3/src/openapi/models/ListSupermarketCategoryRelations200Response.ts deleted file mode 100644 index f97a095c0..000000000 --- a/vue3/src/openapi/models/ListSupermarketCategoryRelations200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SupermarketCategoryRelation } from './SupermarketCategoryRelation'; -import { - SupermarketCategoryRelationFromJSON, - SupermarketCategoryRelationFromJSONTyped, - SupermarketCategoryRelationToJSON, -} from './SupermarketCategoryRelation'; - -/** - * - * @export - * @interface ListSupermarketCategoryRelations200Response - */ -export interface ListSupermarketCategoryRelations200Response { - /** - * - * @type {number} - * @memberof ListSupermarketCategoryRelations200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListSupermarketCategoryRelations200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListSupermarketCategoryRelations200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListSupermarketCategoryRelations200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListSupermarketCategoryRelations200Response interface. - */ -export function instanceOfListSupermarketCategoryRelations200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListSupermarketCategoryRelations200ResponseFromJSON(json: any): ListSupermarketCategoryRelations200Response { - return ListSupermarketCategoryRelations200ResponseFromJSONTyped(json, false); -} - -export function ListSupermarketCategoryRelations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSupermarketCategoryRelations200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(SupermarketCategoryRelationFromJSON)), - }; -} - -export function ListSupermarketCategoryRelations200ResponseToJSON(value?: ListSupermarketCategoryRelations200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(SupermarketCategoryRelationToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListSyncLogs200Response.ts b/vue3/src/openapi/models/ListSyncLogs200Response.ts deleted file mode 100644 index 054a95b89..000000000 --- a/vue3/src/openapi/models/ListSyncLogs200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SyncLog } from './SyncLog'; -import { - SyncLogFromJSON, - SyncLogFromJSONTyped, - SyncLogToJSON, -} from './SyncLog'; - -/** - * - * @export - * @interface ListSyncLogs200Response - */ -export interface ListSyncLogs200Response { - /** - * - * @type {number} - * @memberof ListSyncLogs200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListSyncLogs200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListSyncLogs200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListSyncLogs200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListSyncLogs200Response interface. - */ -export function instanceOfListSyncLogs200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListSyncLogs200ResponseFromJSON(json: any): ListSyncLogs200Response { - return ListSyncLogs200ResponseFromJSONTyped(json, false); -} - -export function ListSyncLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSyncLogs200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(SyncLogFromJSON)), - }; -} - -export function ListSyncLogs200ResponseToJSON(value?: ListSyncLogs200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(SyncLogToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListUnits200Response.ts b/vue3/src/openapi/models/ListUnits200Response.ts deleted file mode 100644 index 4c2f80bd6..000000000 --- a/vue3/src/openapi/models/ListUnits200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { Unit } from './Unit'; -import { - UnitFromJSON, - UnitFromJSONTyped, - UnitToJSON, -} from './Unit'; - -/** - * - * @export - * @interface ListUnits200Response - */ -export interface ListUnits200Response { - /** - * - * @type {number} - * @memberof ListUnits200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListUnits200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListUnits200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListUnits200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListUnits200Response interface. - */ -export function instanceOfListUnits200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListUnits200ResponseFromJSON(json: any): ListUnits200Response { - return ListUnits200ResponseFromJSONTyped(json, false); -} - -export function ListUnits200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListUnits200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(UnitFromJSON)), - }; -} - -export function ListUnits200ResponseToJSON(value?: ListUnits200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(UnitToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListUserSpaces200Response.ts b/vue3/src/openapi/models/ListUserSpaces200Response.ts deleted file mode 100644 index f21c733ff..000000000 --- a/vue3/src/openapi/models/ListUserSpaces200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { UserSpace } from './UserSpace'; -import { - UserSpaceFromJSON, - UserSpaceFromJSONTyped, - UserSpaceToJSON, -} from './UserSpace'; - -/** - * - * @export - * @interface ListUserSpaces200Response - */ -export interface ListUserSpaces200Response { - /** - * - * @type {number} - * @memberof ListUserSpaces200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListUserSpaces200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListUserSpaces200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListUserSpaces200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListUserSpaces200Response interface. - */ -export function instanceOfListUserSpaces200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListUserSpaces200ResponseFromJSON(json: any): ListUserSpaces200Response { - return ListUserSpaces200ResponseFromJSONTyped(json, false); -} - -export function ListUserSpaces200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListUserSpaces200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(UserSpaceFromJSON)), - }; -} - -export function ListUserSpaces200ResponseToJSON(value?: ListUserSpaces200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(UserSpaceToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/ListViewLogs200Response.ts b/vue3/src/openapi/models/ListViewLogs200Response.ts deleted file mode 100644 index 66dcf1a86..000000000 --- a/vue3/src/openapi/models/ListViewLogs200Response.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ViewLog } from './ViewLog'; -import { - ViewLogFromJSON, - ViewLogFromJSONTyped, - ViewLogToJSON, -} from './ViewLog'; - -/** - * - * @export - * @interface ListViewLogs200Response - */ -export interface ListViewLogs200Response { - /** - * - * @type {number} - * @memberof ListViewLogs200Response - */ - count?: number; - /** - * - * @type {string} - * @memberof ListViewLogs200Response - */ - next?: string | null; - /** - * - * @type {string} - * @memberof ListViewLogs200Response - */ - previous?: string | null; - /** - * - * @type {Array} - * @memberof ListViewLogs200Response - */ - results?: Array; -} - -/** - * Check if a given object implements the ListViewLogs200Response interface. - */ -export function instanceOfListViewLogs200Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ListViewLogs200ResponseFromJSON(json: any): ListViewLogs200Response { - return ListViewLogs200ResponseFromJSONTyped(json, false); -} - -export function ListViewLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListViewLogs200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'count': !exists(json, 'count') ? undefined : json['count'], - 'next': !exists(json, 'next') ? undefined : json['next'], - 'previous': !exists(json, 'previous') ? undefined : json['previous'], - 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(ViewLogFromJSON)), - }; -} - -export function ListViewLogs200ResponseToJSON(value?: ListViewLogs200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'count': value.count, - 'next': value.next, - 'previous': value.previous, - 'results': value.results === undefined ? undefined : ((value.results as Array).map(ViewLogToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/MealPlanMealType.ts b/vue3/src/openapi/models/MealPlanMealType.ts deleted file mode 100644 index 2ba3d0dec..000000000 --- a/vue3/src/openapi/models/MealPlanMealType.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface MealPlanMealType - */ -export interface MealPlanMealType { - /** - * - * @type {number} - * @memberof MealPlanMealType - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof MealPlanMealType - */ - name: string; - /** - * - * @type {number} - * @memberof MealPlanMealType - */ - order?: number; - /** - * - * @type {string} - * @memberof MealPlanMealType - */ - color?: string | null; - /** - * - * @type {boolean} - * @memberof MealPlanMealType - */ - _default?: boolean; - /** - * - * @type {string} - * @memberof MealPlanMealType - */ - readonly createdBy?: string; -} - -/** - * Check if a given object implements the MealPlanMealType interface. - */ -export function instanceOfMealPlanMealType(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function MealPlanMealTypeFromJSON(json: any): MealPlanMealType { - return MealPlanMealTypeFromJSONTyped(json, false); -} - -export function MealPlanMealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanMealType { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'color': !exists(json, 'color') ? undefined : json['color'], - '_default': !exists(json, 'default') ? undefined : json['default'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function MealPlanMealTypeToJSON(value?: MealPlanMealType | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'order': value.order, - 'color': value.color, - 'default': value._default, - }; -} - diff --git a/vue3/src/openapi/models/MealPlanRecipe.ts b/vue3/src/openapi/models/MealPlanRecipe.ts deleted file mode 100644 index a411e7186..000000000 --- a/vue3/src/openapi/models/MealPlanRecipe.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { MealPlanRecipeKeywordsInner } from './MealPlanRecipeKeywordsInner'; -import { - MealPlanRecipeKeywordsInnerFromJSON, - MealPlanRecipeKeywordsInnerFromJSONTyped, - MealPlanRecipeKeywordsInnerToJSON, -} from './MealPlanRecipeKeywordsInner'; - -/** - * - * @export - * @interface MealPlanRecipe - */ -export interface MealPlanRecipe { - /** - * - * @type {number} - * @memberof MealPlanRecipe - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - name: string; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - description?: string | null; - /** - * - * @type {Blob} - * @memberof MealPlanRecipe - */ - readonly image?: Blob | null; - /** - * - * @type {Array} - * @memberof MealPlanRecipe - */ - keywords: Array; - /** - * - * @type {number} - * @memberof MealPlanRecipe - */ - workingTime?: number; - /** - * - * @type {number} - * @memberof MealPlanRecipe - */ - waitingTime?: number; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - readonly createdBy?: string; - /** - * - * @type {Date} - * @memberof MealPlanRecipe - */ - readonly createdAt?: Date; - /** - * - * @type {Date} - * @memberof MealPlanRecipe - */ - readonly updatedAt?: Date; - /** - * - * @type {boolean} - * @memberof MealPlanRecipe - */ - internal?: boolean; - /** - * - * @type {number} - * @memberof MealPlanRecipe - */ - servings?: number; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - servingsText?: string; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - rating?: string | null; - /** - * - * @type {Date} - * @memberof MealPlanRecipe - */ - lastCooked?: Date | null; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - readonly _new?: string; - /** - * - * @type {string} - * @memberof MealPlanRecipe - */ - readonly recent?: string; -} - -/** - * Check if a given object implements the MealPlanRecipe interface. - */ -export function instanceOfMealPlanRecipe(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "keywords" in value; - - return isInstance; -} - -export function MealPlanRecipeFromJSON(json: any): MealPlanRecipe { - return MealPlanRecipeFromJSONTyped(json, false); -} - -export function MealPlanRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRecipe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'image': !exists(json, 'image') ? undefined : json['image'], - 'keywords': ((json['keywords'] as Array).map(MealPlanRecipeKeywordsInnerFromJSON)), - 'workingTime': !exists(json, 'working_time') ? undefined : json['working_time'], - 'waitingTime': !exists(json, 'waiting_time') ? undefined : json['waiting_time'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), - 'internal': !exists(json, 'internal') ? undefined : json['internal'], - 'servings': !exists(json, 'servings') ? undefined : json['servings'], - 'servingsText': !exists(json, 'servings_text') ? undefined : json['servings_text'], - 'rating': !exists(json, 'rating') ? undefined : json['rating'], - 'lastCooked': !exists(json, 'last_cooked') ? undefined : (json['last_cooked'] === null ? null : new Date(json['last_cooked'])), - '_new': !exists(json, 'new') ? undefined : json['new'], - 'recent': !exists(json, 'recent') ? undefined : json['recent'], - }; -} - -export function MealPlanRecipeToJSON(value?: MealPlanRecipe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - 'keywords': ((value.keywords as Array).map(MealPlanRecipeKeywordsInnerToJSON)), - 'working_time': value.workingTime, - 'waiting_time': value.waitingTime, - 'internal': value.internal, - 'servings': value.servings, - 'servings_text': value.servingsText, - 'rating': value.rating, - 'last_cooked': value.lastCooked === undefined ? undefined : (value.lastCooked === null ? null : value.lastCooked.toISOString()), - }; -} - diff --git a/vue3/src/openapi/models/MealPlanRecipeKeywordsInner.ts b/vue3/src/openapi/models/MealPlanRecipeKeywordsInner.ts deleted file mode 100644 index 095994090..000000000 --- a/vue3/src/openapi/models/MealPlanRecipeKeywordsInner.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface MealPlanRecipeKeywordsInner - */ -export interface MealPlanRecipeKeywordsInner { - /** - * - * @type {number} - * @memberof MealPlanRecipeKeywordsInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof MealPlanRecipeKeywordsInner - */ - readonly label?: string; -} - -/** - * Check if a given object implements the MealPlanRecipeKeywordsInner interface. - */ -export function instanceOfMealPlanRecipeKeywordsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MealPlanRecipeKeywordsInnerFromJSON(json: any): MealPlanRecipeKeywordsInner { - return MealPlanRecipeKeywordsInnerFromJSONTyped(json, false); -} - -export function MealPlanRecipeKeywordsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRecipeKeywordsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'label': !exists(json, 'label') ? undefined : json['label'], - }; -} - -export function MealPlanRecipeKeywordsInnerToJSON(value?: MealPlanRecipeKeywordsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - }; -} - diff --git a/vue3/src/openapi/models/MealPlanRequest.ts b/vue3/src/openapi/models/MealPlanRequest.ts deleted file mode 100644 index 21df90979..000000000 --- a/vue3/src/openapi/models/MealPlanRequest.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { MealTypeRequest } from './MealTypeRequest'; -import { - MealTypeRequestFromJSON, - MealTypeRequestFromJSONTyped, - MealTypeRequestToJSON, -} from './MealTypeRequest'; -import type { RecipeOverviewRequest } from './RecipeOverviewRequest'; -import { - RecipeOverviewRequestFromJSON, - RecipeOverviewRequestFromJSONTyped, - RecipeOverviewRequestToJSON, -} from './RecipeOverviewRequest'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface MealPlanRequest - */ -export interface MealPlanRequest { - /** - * - * @type {string} - * @memberof MealPlanRequest - */ - title?: string; - /** - * - * @type {RecipeOverviewRequest} - * @memberof MealPlanRequest - */ - recipe?: RecipeOverviewRequest; - /** - * - * @type {number} - * @memberof MealPlanRequest - */ - servings: number; - /** - * - * @type {string} - * @memberof MealPlanRequest - */ - note?: string; - /** - * - * @type {Date} - * @memberof MealPlanRequest - */ - fromDate: Date; - /** - * - * @type {Date} - * @memberof MealPlanRequest - */ - toDate?: Date; - /** - * - * @type {MealTypeRequest} - * @memberof MealPlanRequest - */ - mealType: MealTypeRequest; - /** - * - * @type {Array} - * @memberof MealPlanRequest - */ - shared?: Array; - /** - * - * @type {number} - * @memberof MealPlanRequest - */ - id?: number; -} - -/** - * Check if a given object implements the MealPlanRequest interface. - */ -export function instanceOfMealPlanRequest(value: object): boolean { - if (!('servings' in value)) return false; - if (!('fromDate' in value)) return false; - if (!('mealType' in value)) return false; - return true; -} - -export function MealPlanRequestFromJSON(json: any): MealPlanRequest { - return MealPlanRequestFromJSONTyped(json, false); -} - -export function MealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRequest { - if (json == null) { - return json; - } - return { - - 'title': json['title'] == null ? undefined : json['title'], - 'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']), - 'servings': json['servings'], - 'note': json['note'] == null ? undefined : json['note'], - 'fromDate': (new Date(json['from_date'])), - 'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])), - 'mealType': MealTypeRequestFromJSON(json['meal_type']), - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function MealPlanRequestToJSON(value?: MealPlanRequest | null): any { - if (value == null) { - return value; - } - return { - - 'title': value['title'], - 'recipe': RecipeOverviewRequestToJSON(value['recipe']), - 'servings': value['servings'], - 'note': value['note'], - 'from_date': ((value['fromDate']).toISOString().substring(0,10)), - 'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)), - 'meal_type': MealTypeRequestToJSON(value['mealType']), - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/MealTypeRequest.ts b/vue3/src/openapi/models/MealTypeRequest.ts deleted file mode 100644 index f3ea0ea99..000000000 --- a/vue3/src/openapi/models/MealTypeRequest.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface MealTypeRequest - */ -export interface MealTypeRequest { - /** - * - * @type {string} - * @memberof MealTypeRequest - */ - name: string; - /** - * - * @type {number} - * @memberof MealTypeRequest - */ - order?: number; - /** - * - * @type {string} - * @memberof MealTypeRequest - */ - color?: string; - /** - * - * @type {boolean} - * @memberof MealTypeRequest - */ - _default?: boolean; - /** - * - * @type {number} - * @memberof MealTypeRequest - */ - id?: number; -} - -/** - * Check if a given object implements the MealTypeRequest interface. - */ -export function instanceOfMealTypeRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function MealTypeRequestFromJSON(json: any): MealTypeRequest { - return MealTypeRequestFromJSONTyped(json, false); -} - -export function MealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealTypeRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'order': json['order'] == null ? undefined : json['order'], - 'color': json['color'] == null ? undefined : json['color'], - '_default': json['default'] == null ? undefined : json['default'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function MealTypeRequestToJSON(value?: MealTypeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'order': value['order'], - 'color': value['color'], - 'default': value['_default'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/NullEnum.ts b/vue3/src/openapi/models/NullEnum.ts deleted file mode 100644 index 3179749a0..000000000 --- a/vue3/src/openapi/models/NullEnum.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * - * @export - */ -export const NullEnum = { - Null: 'null' -} as const; -export type NullEnum = typeof NullEnum[keyof typeof NullEnum]; - - -export function NullEnumFromJSON(json: any): NullEnum { - return NullEnumFromJSONTyped(json, false); -} - -export function NullEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NullEnum { - return json as NullEnum; -} - -export function NullEnumToJSON(value?: NullEnum | null): any { - return value as any; -} - diff --git a/vue3/src/openapi/models/NutritionInformationRequest.ts b/vue3/src/openapi/models/NutritionInformationRequest.ts deleted file mode 100644 index acf0cd80e..000000000 --- a/vue3/src/openapi/models/NutritionInformationRequest.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface NutritionInformationRequest - */ -export interface NutritionInformationRequest { - /** - * - * @type {number} - * @memberof NutritionInformationRequest - */ - carbohydrates: number; - /** - * - * @type {number} - * @memberof NutritionInformationRequest - */ - fats: number; - /** - * - * @type {number} - * @memberof NutritionInformationRequest - */ - proteins: number; - /** - * - * @type {number} - * @memberof NutritionInformationRequest - */ - calories: number; - /** - * - * @type {string} - * @memberof NutritionInformationRequest - */ - source?: string; - /** - * - * @type {number} - * @memberof NutritionInformationRequest - */ - id?: number; -} - -/** - * Check if a given object implements the NutritionInformationRequest interface. - */ -export function instanceOfNutritionInformationRequest(value: object): boolean { - if (!('carbohydrates' in value)) return false; - if (!('fats' in value)) return false; - if (!('proteins' in value)) return false; - if (!('calories' in value)) return false; - return true; -} - -export function NutritionInformationRequestFromJSON(json: any): NutritionInformationRequest { - return NutritionInformationRequestFromJSONTyped(json, false); -} - -export function NutritionInformationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NutritionInformationRequest { - if (json == null) { - return json; - } - return { - - 'carbohydrates': json['carbohydrates'], - 'fats': json['fats'], - 'proteins': json['proteins'], - 'calories': json['calories'], - 'source': json['source'] == null ? undefined : json['source'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function NutritionInformationRequestToJSON(value?: NutritionInformationRequest | null): any { - if (value == null) { - return value; - } - return { - - 'carbohydrates': value['carbohydrates'], - 'fats': value['fats'], - 'proteins': value['proteins'], - 'calories': value['calories'], - 'source': value['source'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataCategoryRequest.ts b/vue3/src/openapi/models/OpenDataCategoryRequest.ts deleted file mode 100644 index d632ff22c..000000000 --- a/vue3/src/openapi/models/OpenDataCategoryRequest.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface OpenDataCategoryRequest - */ -export interface OpenDataCategoryRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof OpenDataCategoryRequest - */ - version: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof OpenDataCategoryRequest - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataCategoryRequest - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataCategoryRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof OpenDataCategoryRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataCategoryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataCategoryRequest interface. - */ -export function instanceOfOpenDataCategoryRequest(value: object): boolean { - if (!('version' in value)) return false; - if (!('slug' in value)) return false; - if (!('name' in value)) return false; - return true; -} - -export function OpenDataCategoryRequestFromJSON(json: any): OpenDataCategoryRequest { - return OpenDataCategoryRequestFromJSONTyped(json, false); -} - -export function OpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataCategoryRequest { - if (json == null) { - return json; - } - return { - - 'version': OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataCategoryRequestToJSON(value?: OpenDataCategoryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'description': value['description'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataConversionFood.ts b/vue3/src/openapi/models/OpenDataConversionFood.ts deleted file mode 100644 index 4df835f98..000000000 --- a/vue3/src/openapi/models/OpenDataConversionFood.ts +++ /dev/null @@ -1,230 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataConversionFoodPreferredUnitMetric } from './OpenDataConversionFoodPreferredUnitMetric'; -import { - OpenDataConversionFoodPreferredUnitMetricFromJSON, - OpenDataConversionFoodPreferredUnitMetricFromJSONTyped, - OpenDataConversionFoodPreferredUnitMetricToJSON, -} from './OpenDataConversionFoodPreferredUnitMetric'; -import type { OpenDataConversionFoodPropertiesFoodUnit } from './OpenDataConversionFoodPropertiesFoodUnit'; -import { - OpenDataConversionFoodPropertiesFoodUnitFromJSON, - OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped, - OpenDataConversionFoodPropertiesFoodUnitToJSON, -} from './OpenDataConversionFoodPropertiesFoodUnit'; -import type { OpenDataConversionFoodPropertiesInner } from './OpenDataConversionFoodPropertiesInner'; -import { - OpenDataConversionFoodPropertiesInnerFromJSON, - OpenDataConversionFoodPropertiesInnerFromJSONTyped, - OpenDataConversionFoodPropertiesInnerToJSON, -} from './OpenDataConversionFoodPropertiesInner'; -import type { OpenDataStoreCategoryToStoreInnerCategory } from './OpenDataStoreCategoryToStoreInnerCategory'; -import { - OpenDataStoreCategoryToStoreInnerCategoryFromJSON, - OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped, - OpenDataStoreCategoryToStoreInnerCategoryToJSON, -} from './OpenDataStoreCategoryToStoreInnerCategory'; -import type { OpenDataUnitVersion } from './OpenDataUnitVersion'; -import { - OpenDataUnitVersionFromJSON, - OpenDataUnitVersionFromJSONTyped, - OpenDataUnitVersionToJSON, -} from './OpenDataUnitVersion'; - -/** - * - * @export - * @interface OpenDataConversionFood - */ -export interface OpenDataConversionFood { - /** - * - * @type {number} - * @memberof OpenDataConversionFood - */ - readonly id?: number; - /** - * - * @type {OpenDataUnitVersion} - * @memberof OpenDataConversionFood - */ - version: OpenDataUnitVersion; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - pluralName: string; - /** - * - * @type {OpenDataStoreCategoryToStoreInnerCategory} - * @memberof OpenDataConversionFood - */ - storeCategory: OpenDataStoreCategoryToStoreInnerCategory; - /** - * - * @type {OpenDataConversionFoodPreferredUnitMetric} - * @memberof OpenDataConversionFood - */ - preferredUnitMetric?: OpenDataConversionFoodPreferredUnitMetric | null; - /** - * - * @type {OpenDataConversionFoodPreferredUnitMetric} - * @memberof OpenDataConversionFood - */ - preferredShoppingUnitMetric?: OpenDataConversionFoodPreferredUnitMetric | null; - /** - * - * @type {OpenDataConversionFoodPreferredUnitMetric} - * @memberof OpenDataConversionFood - */ - preferredUnitImperial?: OpenDataConversionFoodPreferredUnitMetric | null; - /** - * - * @type {OpenDataConversionFoodPreferredUnitMetric} - * @memberof OpenDataConversionFood - */ - preferredShoppingUnitImperial?: OpenDataConversionFoodPreferredUnitMetric | null; - /** - * - * @type {Array} - * @memberof OpenDataConversionFood - */ - properties: Array | null; - /** - * - * @type {number} - * @memberof OpenDataConversionFood - */ - propertiesFoodAmount?: number; - /** - * - * @type {OpenDataConversionFoodPropertiesFoodUnit} - * @memberof OpenDataConversionFood - */ - propertiesFoodUnit: OpenDataConversionFoodPropertiesFoodUnit; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - propertiesSource?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - fdcId: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - comment?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFood - */ - readonly createdBy?: string; -} - -/** - * Check if a given object implements the OpenDataConversionFood interface. - */ -export function instanceOfOpenDataConversionFood(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "version" in value; - isInstance = isInstance && "slug" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "pluralName" in value; - isInstance = isInstance && "storeCategory" in value; - isInstance = isInstance && "properties" in value; - isInstance = isInstance && "propertiesFoodUnit" in value; - isInstance = isInstance && "fdcId" in value; - - return isInstance; -} - -export function OpenDataConversionFoodFromJSON(json: any): OpenDataConversionFood { - return OpenDataConversionFoodFromJSONTyped(json, false); -} - -export function OpenDataConversionFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFood { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'version': OpenDataUnitVersionFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'pluralName': json['plural_name'], - 'storeCategory': OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json['store_category']), - 'preferredUnitMetric': !exists(json, 'preferred_unit_metric') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_unit_metric']), - 'preferredShoppingUnitMetric': !exists(json, 'preferred_shopping_unit_metric') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_shopping_unit_metric']), - 'preferredUnitImperial': !exists(json, 'preferred_unit_imperial') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_unit_imperial']), - 'preferredShoppingUnitImperial': !exists(json, 'preferred_shopping_unit_imperial') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_shopping_unit_imperial']), - 'properties': (json['properties'] === null ? null : (json['properties'] as Array).map(OpenDataConversionFoodPropertiesInnerFromJSON)), - 'propertiesFoodAmount': !exists(json, 'properties_food_amount') ? undefined : json['properties_food_amount'], - 'propertiesFoodUnit': OpenDataConversionFoodPropertiesFoodUnitFromJSON(json['properties_food_unit']), - 'propertiesSource': !exists(json, 'properties_source') ? undefined : json['properties_source'], - 'fdcId': json['fdc_id'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function OpenDataConversionFoodToJSON(value?: OpenDataConversionFood | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'version': OpenDataUnitVersionToJSON(value.version), - 'slug': value.slug, - 'name': value.name, - 'plural_name': value.pluralName, - 'store_category': OpenDataStoreCategoryToStoreInnerCategoryToJSON(value.storeCategory), - 'preferred_unit_metric': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredUnitMetric), - 'preferred_shopping_unit_metric': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredShoppingUnitMetric), - 'preferred_unit_imperial': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredUnitImperial), - 'preferred_shopping_unit_imperial': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredShoppingUnitImperial), - 'properties': (value.properties === null ? null : (value.properties as Array).map(OpenDataConversionFoodPropertiesInnerToJSON)), - 'properties_food_amount': value.propertiesFoodAmount, - 'properties_food_unit': OpenDataConversionFoodPropertiesFoodUnitToJSON(value.propertiesFoodUnit), - 'properties_source': value.propertiesSource, - 'fdc_id': value.fdcId, - 'comment': value.comment, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataConversionFoodPreferredUnitMetric.ts b/vue3/src/openapi/models/OpenDataConversionFoodPreferredUnitMetric.ts deleted file mode 100644 index 1dd6437f4..000000000 --- a/vue3/src/openapi/models/OpenDataConversionFoodPreferredUnitMetric.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataUnitVersion } from './OpenDataUnitVersion'; -import { - OpenDataUnitVersionFromJSON, - OpenDataUnitVersionFromJSONTyped, - OpenDataUnitVersionToJSON, -} from './OpenDataUnitVersion'; - -/** - * - * @export - * @interface OpenDataConversionFoodPreferredUnitMetric - */ -export interface OpenDataConversionFoodPreferredUnitMetric { - /** - * - * @type {number} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - readonly id?: number; - /** - * - * @type {OpenDataUnitVersion} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - version: OpenDataUnitVersion; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - pluralName?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - baseUnit?: OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - type: OpenDataConversionFoodPreferredUnitMetricTypeEnum; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - comment?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPreferredUnitMetric - */ - readonly createdBy?: string; -} - - -/** - * @export - */ -export const OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum = { - G: 'G', - Kg: 'KG', - Ml: 'ML', - L: 'L', - Ounce: 'OUNCE', - Pound: 'POUND', - FluidOunce: 'FLUID_OUNCE', - Tsp: 'TSP', - Tbsp: 'TBSP', - Cup: 'CUP', - Pint: 'PINT', - Quart: 'QUART', - Gallon: 'GALLON', - ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE', - ImperialPint: 'IMPERIAL_PINT', - ImperialQuart: 'IMPERIAL_QUART', - ImperialGallon: 'IMPERIAL_GALLON' -} as const; -export type OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum = typeof OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum[keyof typeof OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum]; - -/** - * @export - */ -export const OpenDataConversionFoodPreferredUnitMetricTypeEnum = { - Weight: 'WEIGHT', - Volume: 'VOLUME', - Other: 'OTHER' -} as const; -export type OpenDataConversionFoodPreferredUnitMetricTypeEnum = typeof OpenDataConversionFoodPreferredUnitMetricTypeEnum[keyof typeof OpenDataConversionFoodPreferredUnitMetricTypeEnum]; - - -/** - * Check if a given object implements the OpenDataConversionFoodPreferredUnitMetric interface. - */ -export function instanceOfOpenDataConversionFoodPreferredUnitMetric(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "version" in value; - isInstance = isInstance && "slug" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "type" in value; - - return isInstance; -} - -export function OpenDataConversionFoodPreferredUnitMetricFromJSON(json: any): OpenDataConversionFoodPreferredUnitMetric { - return OpenDataConversionFoodPreferredUnitMetricFromJSONTyped(json, false); -} - -export function OpenDataConversionFoodPreferredUnitMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPreferredUnitMetric { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'version': OpenDataUnitVersionFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'], - 'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'], - 'type': json['type'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function OpenDataConversionFoodPreferredUnitMetricToJSON(value?: OpenDataConversionFoodPreferredUnitMetric | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'version': OpenDataUnitVersionToJSON(value.version), - 'slug': value.slug, - 'name': value.name, - 'plural_name': value.pluralName, - 'base_unit': value.baseUnit, - 'type': value.type, - 'comment': value.comment, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataConversionFoodPropertiesFoodUnit.ts b/vue3/src/openapi/models/OpenDataConversionFoodPropertiesFoodUnit.ts deleted file mode 100644 index c71dd107a..000000000 --- a/vue3/src/openapi/models/OpenDataConversionFoodPropertiesFoodUnit.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataUnitVersion } from './OpenDataUnitVersion'; -import { - OpenDataUnitVersionFromJSON, - OpenDataUnitVersionFromJSONTyped, - OpenDataUnitVersionToJSON, -} from './OpenDataUnitVersion'; - -/** - * - * @export - * @interface OpenDataConversionFoodPropertiesFoodUnit - */ -export interface OpenDataConversionFoodPropertiesFoodUnit { - /** - * - * @type {number} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - readonly id?: number; - /** - * - * @type {OpenDataUnitVersion} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - version: OpenDataUnitVersion; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - pluralName?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - baseUnit?: OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - type: OpenDataConversionFoodPropertiesFoodUnitTypeEnum; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - comment?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesFoodUnit - */ - readonly createdBy?: string; -} - - -/** - * @export - */ -export const OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum = { - G: 'G', - Kg: 'KG', - Ml: 'ML', - L: 'L', - Ounce: 'OUNCE', - Pound: 'POUND', - FluidOunce: 'FLUID_OUNCE', - Tsp: 'TSP', - Tbsp: 'TBSP', - Cup: 'CUP', - Pint: 'PINT', - Quart: 'QUART', - Gallon: 'GALLON', - ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE', - ImperialPint: 'IMPERIAL_PINT', - ImperialQuart: 'IMPERIAL_QUART', - ImperialGallon: 'IMPERIAL_GALLON' -} as const; -export type OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum = typeof OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum[keyof typeof OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum]; - -/** - * @export - */ -export const OpenDataConversionFoodPropertiesFoodUnitTypeEnum = { - Weight: 'WEIGHT', - Volume: 'VOLUME', - Other: 'OTHER' -} as const; -export type OpenDataConversionFoodPropertiesFoodUnitTypeEnum = typeof OpenDataConversionFoodPropertiesFoodUnitTypeEnum[keyof typeof OpenDataConversionFoodPropertiesFoodUnitTypeEnum]; - - -/** - * Check if a given object implements the OpenDataConversionFoodPropertiesFoodUnit interface. - */ -export function instanceOfOpenDataConversionFoodPropertiesFoodUnit(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "version" in value; - isInstance = isInstance && "slug" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "type" in value; - - return isInstance; -} - -export function OpenDataConversionFoodPropertiesFoodUnitFromJSON(json: any): OpenDataConversionFoodPropertiesFoodUnit { - return OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped(json, false); -} - -export function OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesFoodUnit { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'version': OpenDataUnitVersionFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'], - 'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'], - 'type': json['type'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function OpenDataConversionFoodPropertiesFoodUnitToJSON(value?: OpenDataConversionFoodPropertiesFoodUnit | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'version': OpenDataUnitVersionToJSON(value.version), - 'slug': value.slug, - 'name': value.name, - 'plural_name': value.pluralName, - 'base_unit': value.baseUnit, - 'type': value.type, - 'comment': value.comment, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataConversionFoodPropertiesInner.ts b/vue3/src/openapi/models/OpenDataConversionFoodPropertiesInner.ts deleted file mode 100644 index ac69821ed..000000000 --- a/vue3/src/openapi/models/OpenDataConversionFoodPropertiesInner.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataConversionFoodPropertiesInnerProperty } from './OpenDataConversionFoodPropertiesInnerProperty'; -import { - OpenDataConversionFoodPropertiesInnerPropertyFromJSON, - OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped, - OpenDataConversionFoodPropertiesInnerPropertyToJSON, -} from './OpenDataConversionFoodPropertiesInnerProperty'; - -/** - * - * @export - * @interface OpenDataConversionFoodPropertiesInner - */ -export interface OpenDataConversionFoodPropertiesInner { - /** - * - * @type {number} - * @memberof OpenDataConversionFoodPropertiesInner - */ - readonly id?: number; - /** - * - * @type {OpenDataConversionFoodPropertiesInnerProperty} - * @memberof OpenDataConversionFoodPropertiesInner - */ - property: OpenDataConversionFoodPropertiesInnerProperty; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesInner - */ - propertyAmount: string; -} - -/** - * Check if a given object implements the OpenDataConversionFoodPropertiesInner interface. - */ -export function instanceOfOpenDataConversionFoodPropertiesInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "property" in value; - isInstance = isInstance && "propertyAmount" in value; - - return isInstance; -} - -export function OpenDataConversionFoodPropertiesInnerFromJSON(json: any): OpenDataConversionFoodPropertiesInner { - return OpenDataConversionFoodPropertiesInnerFromJSONTyped(json, false); -} - -export function OpenDataConversionFoodPropertiesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'property': OpenDataConversionFoodPropertiesInnerPropertyFromJSON(json['property']), - 'propertyAmount': json['property_amount'], - }; -} - -export function OpenDataConversionFoodPropertiesInnerToJSON(value?: OpenDataConversionFoodPropertiesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'property': OpenDataConversionFoodPropertiesInnerPropertyToJSON(value.property), - 'property_amount': value.propertyAmount, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataConversionFoodPropertiesInnerProperty.ts b/vue3/src/openapi/models/OpenDataConversionFoodPropertiesInnerProperty.ts deleted file mode 100644 index 8e7be8413..000000000 --- a/vue3/src/openapi/models/OpenDataConversionFoodPropertiesInnerProperty.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataUnitVersion } from './OpenDataUnitVersion'; -import { - OpenDataUnitVersionFromJSON, - OpenDataUnitVersionFromJSONTyped, - OpenDataUnitVersionToJSON, -} from './OpenDataUnitVersion'; - -/** - * - * @export - * @interface OpenDataConversionFoodPropertiesInnerProperty - */ -export interface OpenDataConversionFoodPropertiesInnerProperty { - /** - * - * @type {number} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - readonly id?: number; - /** - * - * @type {OpenDataUnitVersion} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - version: OpenDataUnitVersion; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - unit?: string; - /** - * - * @type {number} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - fdcId?: number | null; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - comment?: string; - /** - * - * @type {string} - * @memberof OpenDataConversionFoodPropertiesInnerProperty - */ - readonly createdBy?: string; -} - -/** - * Check if a given object implements the OpenDataConversionFoodPropertiesInnerProperty interface. - */ -export function instanceOfOpenDataConversionFoodPropertiesInnerProperty(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "version" in value; - isInstance = isInstance && "slug" in value; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function OpenDataConversionFoodPropertiesInnerPropertyFromJSON(json: any): OpenDataConversionFoodPropertiesInnerProperty { - return OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped(json, false); -} - -export function OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesInnerProperty { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'version': OpenDataUnitVersionFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'unit': !exists(json, 'unit') ? undefined : json['unit'], - 'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function OpenDataConversionFoodPropertiesInnerPropertyToJSON(value?: OpenDataConversionFoodPropertiesInnerProperty | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'version': OpenDataUnitVersionToJSON(value.version), - 'slug': value.slug, - 'name': value.name, - 'unit': value.unit, - 'fdc_id': value.fdcId, - 'comment': value.comment, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataConversionRequest.ts b/vue3/src/openapi/models/OpenDataConversionRequest.ts deleted file mode 100644 index 9c4914795..000000000 --- a/vue3/src/openapi/models/OpenDataConversionRequest.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataFoodRequest } from './OpenDataFoodRequest'; -import { - OpenDataFoodRequestFromJSON, - OpenDataFoodRequestFromJSONTyped, - OpenDataFoodRequestToJSON, -} from './OpenDataFoodRequest'; -import type { OpenDataUnitRequest } from './OpenDataUnitRequest'; -import { - OpenDataUnitRequestFromJSON, - OpenDataUnitRequestFromJSONTyped, - OpenDataUnitRequestToJSON, -} from './OpenDataUnitRequest'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Adds nested create feature - * @export - * @interface OpenDataConversionRequest - */ -export interface OpenDataConversionRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof OpenDataConversionRequest - */ - version: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof OpenDataConversionRequest - */ - slug: string; - /** - * - * @type {OpenDataFoodRequest} - * @memberof OpenDataConversionRequest - */ - food: OpenDataFoodRequest; - /** - * - * @type {string} - * @memberof OpenDataConversionRequest - */ - baseAmount: string; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataConversionRequest - */ - baseUnit: OpenDataUnitRequest; - /** - * - * @type {string} - * @memberof OpenDataConversionRequest - */ - convertedAmount: string; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataConversionRequest - */ - convertedUnit: OpenDataUnitRequest; - /** - * - * @type {string} - * @memberof OpenDataConversionRequest - */ - source: string; - /** - * - * @type {string} - * @memberof OpenDataConversionRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataConversionRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataConversionRequest interface. - */ -export function instanceOfOpenDataConversionRequest(value: object): boolean { - if (!('version' in value)) return false; - if (!('slug' in value)) return false; - if (!('food' in value)) return false; - if (!('baseAmount' in value)) return false; - if (!('baseUnit' in value)) return false; - if (!('convertedAmount' in value)) return false; - if (!('convertedUnit' in value)) return false; - if (!('source' in value)) return false; - return true; -} - -export function OpenDataConversionRequestFromJSON(json: any): OpenDataConversionRequest { - return OpenDataConversionRequestFromJSONTyped(json, false); -} - -export function OpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionRequest { - if (json == null) { - return json; - } - return { - - 'version': OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'], - 'food': OpenDataFoodRequestFromJSON(json['food']), - 'baseAmount': json['base_amount'], - 'baseUnit': OpenDataUnitRequestFromJSON(json['base_unit']), - 'convertedAmount': json['converted_amount'], - 'convertedUnit': OpenDataUnitRequestFromJSON(json['converted_unit']), - 'source': json['source'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataConversionRequestToJSON(value?: OpenDataConversionRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'food': OpenDataFoodRequestToJSON(value['food']), - 'base_amount': value['baseAmount'], - 'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']), - 'converted_amount': value['convertedAmount'], - 'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']), - 'source': value['source'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts b/vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts deleted file mode 100644 index 6b9d3ef68..000000000 --- a/vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataPropertyRequest } from './OpenDataPropertyRequest'; -import { - OpenDataPropertyRequestFromJSON, - OpenDataPropertyRequestFromJSONTyped, - OpenDataPropertyRequestToJSON, -} from './OpenDataPropertyRequest'; - -/** - * Adds nested create feature - * @export - * @interface OpenDataFoodPropertyRequest - */ -export interface OpenDataFoodPropertyRequest { - /** - * - * @type {OpenDataPropertyRequest} - * @memberof OpenDataFoodPropertyRequest - */ - property: OpenDataPropertyRequest; - /** - * - * @type {string} - * @memberof OpenDataFoodPropertyRequest - */ - propertyAmount: string; - /** - * - * @type {number} - * @memberof OpenDataFoodPropertyRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataFoodPropertyRequest interface. - */ -export function instanceOfOpenDataFoodPropertyRequest(value: object): boolean { - if (!('property' in value)) return false; - if (!('propertyAmount' in value)) return false; - return true; -} - -export function OpenDataFoodPropertyRequestFromJSON(json: any): OpenDataFoodPropertyRequest { - return OpenDataFoodPropertyRequestFromJSONTyped(json, false); -} - -export function OpenDataFoodPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodPropertyRequest { - if (json == null) { - return json; - } - return { - - 'property': OpenDataPropertyRequestFromJSON(json['property']), - 'propertyAmount': json['property_amount'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRequest | null): any { - if (value == null) { - return value; - } - return { - - 'property': OpenDataPropertyRequestToJSON(value['property']), - 'property_amount': value['propertyAmount'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataFoodRequest.ts b/vue3/src/openapi/models/OpenDataFoodRequest.ts deleted file mode 100644 index d79d067e9..000000000 --- a/vue3/src/openapi/models/OpenDataFoodRequest.ts +++ /dev/null @@ -1,247 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest'; -import { - OpenDataCategoryRequestFromJSON, - OpenDataCategoryRequestFromJSONTyped, - OpenDataCategoryRequestToJSON, -} from './OpenDataCategoryRequest'; -import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest'; -import { - OpenDataFoodPropertyRequestFromJSON, - OpenDataFoodPropertyRequestFromJSONTyped, - OpenDataFoodPropertyRequestToJSON, -} from './OpenDataFoodPropertyRequest'; -import type { OpenDataUnitRequest } from './OpenDataUnitRequest'; -import { - OpenDataUnitRequestFromJSON, - OpenDataUnitRequestFromJSONTyped, - OpenDataUnitRequestToJSON, -} from './OpenDataUnitRequest'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface OpenDataFoodRequest - */ -export interface OpenDataFoodRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof OpenDataFoodRequest - */ - version: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof OpenDataFoodRequest - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataFoodRequest - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataFoodRequest - */ - pluralName: string; - /** - * - * @type {OpenDataCategoryRequest} - * @memberof OpenDataFoodRequest - */ - storeCategory: OpenDataCategoryRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataFoodRequest - */ - preferredUnitMetric?: OpenDataUnitRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataFoodRequest - */ - preferredShoppingUnitMetric?: OpenDataUnitRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataFoodRequest - */ - preferredUnitImperial?: OpenDataUnitRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataFoodRequest - */ - preferredShoppingUnitImperial?: OpenDataUnitRequest; - /** - * - * @type {Array} - * @memberof OpenDataFoodRequest - */ - properties: Array | null; - /** - * - * @type {number} - * @memberof OpenDataFoodRequest - */ - propertiesFoodAmount?: number; - /** - * - * @type {OpenDataUnitRequest} - * @memberof OpenDataFoodRequest - */ - propertiesFoodUnit: OpenDataUnitRequest; - /** - * - * @type {string} - * @memberof OpenDataFoodRequest - */ - propertiesSource?: string; - /** - * - * @type {string} - * @memberof OpenDataFoodRequest - */ - fdcId: string; - /** - * - * @type {string} - * @memberof OpenDataFoodRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataFoodRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataFoodRequest interface. - */ -export function instanceOfOpenDataFoodRequest(value: object): boolean { - if (!('version' in value)) return false; - if (!('slug' in value)) return false; - if (!('name' in value)) return false; - if (!('pluralName' in value)) return false; - if (!('storeCategory' in value)) return false; - if (!('properties' in value)) return false; - if (!('propertiesFoodUnit' in value)) return false; - if (!('fdcId' in value)) return false; - return true; -} - -export function OpenDataFoodRequestFromJSON(json: any): OpenDataFoodRequest { - return OpenDataFoodRequestFromJSONTyped(json, false); -} - -export function OpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodRequest { - if (json == null) { - return json; - } - return { - - 'version': OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'pluralName': json['plural_name'], - 'storeCategory': OpenDataCategoryRequestFromJSON(json['store_category']), - 'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']), - 'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']), - 'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']), - 'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']), - 'properties': (json['properties'] == null ? null : (json['properties'] as Array).map(OpenDataFoodPropertyRequestFromJSON)), - 'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'], - 'propertiesFoodUnit': OpenDataUnitRequestFromJSON(json['properties_food_unit']), - 'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'], - 'fdcId': json['fdc_id'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataFoodRequestToJSON(value?: OpenDataFoodRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'plural_name': value['pluralName'], - 'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']), - 'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']), - 'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']), - 'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']), - 'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']), - 'properties': (value['properties'] == null ? null : (value['properties'] as Array).map(OpenDataFoodPropertyRequestToJSON)), - 'properties_food_amount': value['propertiesFoodAmount'], - 'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']), - 'properties_source': value['propertiesSource'], - 'fdc_id': value['fdcId'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataPropertyRequest.ts b/vue3/src/openapi/models/OpenDataPropertyRequest.ts deleted file mode 100644 index e5cbba7e5..000000000 --- a/vue3/src/openapi/models/OpenDataPropertyRequest.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface OpenDataPropertyRequest - */ -export interface OpenDataPropertyRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof OpenDataPropertyRequest - */ - version: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof OpenDataPropertyRequest - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataPropertyRequest - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataPropertyRequest - */ - unit?: string; - /** - * - * @type {number} - * @memberof OpenDataPropertyRequest - */ - fdcId?: number; - /** - * - * @type {string} - * @memberof OpenDataPropertyRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataPropertyRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataPropertyRequest interface. - */ -export function instanceOfOpenDataPropertyRequest(value: object): boolean { - if (!('version' in value)) return false; - if (!('slug' in value)) return false; - if (!('name' in value)) return false; - return true; -} - -export function OpenDataPropertyRequestFromJSON(json: any): OpenDataPropertyRequest { - return OpenDataPropertyRequestFromJSONTyped(json, false); -} - -export function OpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataPropertyRequest { - if (json == null) { - return json; - } - return { - - 'version': OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'unit': json['unit'] == null ? undefined : json['unit'], - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataPropertyRequestToJSON(value?: OpenDataPropertyRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'unit': value['unit'], - 'fdc_id': value['fdcId'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts b/vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts deleted file mode 100644 index b218a6e65..000000000 --- a/vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest'; -import { - OpenDataCategoryRequestFromJSON, - OpenDataCategoryRequestFromJSONTyped, - OpenDataCategoryRequestToJSON, -} from './OpenDataCategoryRequest'; - -/** - * Adds nested create feature - * @export - * @interface OpenDataStoreCategoryRequest - */ -export interface OpenDataStoreCategoryRequest { - /** - * - * @type {OpenDataCategoryRequest} - * @memberof OpenDataStoreCategoryRequest - */ - category: OpenDataCategoryRequest; - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryRequest - */ - store: number; - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryRequest - */ - order?: number; - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataStoreCategoryRequest interface. - */ -export function instanceOfOpenDataStoreCategoryRequest(value: object): boolean { - if (!('category' in value)) return false; - if (!('store' in value)) return false; - return true; -} - -export function OpenDataStoreCategoryRequestFromJSON(json: any): OpenDataStoreCategoryRequest { - return OpenDataStoreCategoryRequestFromJSONTyped(json, false); -} - -export function OpenDataStoreCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryRequest { - if (json == null) { - return json; - } - return { - - 'category': OpenDataCategoryRequestFromJSON(json['category']), - 'store': json['store'], - 'order': json['order'] == null ? undefined : json['order'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategoryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'category': OpenDataCategoryRequestToJSON(value['category']), - 'store': value['store'], - 'order': value['order'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataStoreCategoryToStoreInner.ts b/vue3/src/openapi/models/OpenDataStoreCategoryToStoreInner.ts deleted file mode 100644 index b361d3274..000000000 --- a/vue3/src/openapi/models/OpenDataStoreCategoryToStoreInner.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataStoreCategoryToStoreInnerCategory } from './OpenDataStoreCategoryToStoreInnerCategory'; -import { - OpenDataStoreCategoryToStoreInnerCategoryFromJSON, - OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped, - OpenDataStoreCategoryToStoreInnerCategoryToJSON, -} from './OpenDataStoreCategoryToStoreInnerCategory'; - -/** - * - * @export - * @interface OpenDataStoreCategoryToStoreInner - */ -export interface OpenDataStoreCategoryToStoreInner { - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryToStoreInner - */ - readonly id?: number; - /** - * - * @type {OpenDataStoreCategoryToStoreInnerCategory} - * @memberof OpenDataStoreCategoryToStoreInner - */ - category: OpenDataStoreCategoryToStoreInnerCategory; - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryToStoreInner - */ - store: number; - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryToStoreInner - */ - order?: number; -} - -/** - * Check if a given object implements the OpenDataStoreCategoryToStoreInner interface. - */ -export function instanceOfOpenDataStoreCategoryToStoreInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "category" in value; - isInstance = isInstance && "store" in value; - - return isInstance; -} - -export function OpenDataStoreCategoryToStoreInnerFromJSON(json: any): OpenDataStoreCategoryToStoreInner { - return OpenDataStoreCategoryToStoreInnerFromJSONTyped(json, false); -} - -export function OpenDataStoreCategoryToStoreInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryToStoreInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'category': OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json['category']), - 'store': json['store'], - 'order': !exists(json, 'order') ? undefined : json['order'], - }; -} - -export function OpenDataStoreCategoryToStoreInnerToJSON(value?: OpenDataStoreCategoryToStoreInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'category': OpenDataStoreCategoryToStoreInnerCategoryToJSON(value.category), - 'store': value.store, - 'order': value.order, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataStoreCategoryToStoreInnerCategory.ts b/vue3/src/openapi/models/OpenDataStoreCategoryToStoreInnerCategory.ts deleted file mode 100644 index e92d3fd2a..000000000 --- a/vue3/src/openapi/models/OpenDataStoreCategoryToStoreInnerCategory.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenDataUnitVersion } from './OpenDataUnitVersion'; -import { - OpenDataUnitVersionFromJSON, - OpenDataUnitVersionFromJSONTyped, - OpenDataUnitVersionToJSON, -} from './OpenDataUnitVersion'; - -/** - * - * @export - * @interface OpenDataStoreCategoryToStoreInnerCategory - */ -export interface OpenDataStoreCategoryToStoreInnerCategory { - /** - * - * @type {number} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - readonly id?: number; - /** - * - * @type {OpenDataUnitVersion} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - version: OpenDataUnitVersion; - /** - * - * @type {string} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - description?: string; - /** - * - * @type {string} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - comment?: string; - /** - * - * @type {string} - * @memberof OpenDataStoreCategoryToStoreInnerCategory - */ - readonly createdBy?: string; -} - -/** - * Check if a given object implements the OpenDataStoreCategoryToStoreInnerCategory interface. - */ -export function instanceOfOpenDataStoreCategoryToStoreInnerCategory(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "version" in value; - isInstance = isInstance && "slug" in value; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json: any): OpenDataStoreCategoryToStoreInnerCategory { - return OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped(json, false); -} - -export function OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryToStoreInnerCategory { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'version': OpenDataUnitVersionFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function OpenDataStoreCategoryToStoreInnerCategoryToJSON(value?: OpenDataStoreCategoryToStoreInnerCategory | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'version': OpenDataUnitVersionToJSON(value.version), - 'slug': value.slug, - 'name': value.name, - 'description': value.description, - 'comment': value.comment, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataStoreRequest.ts b/vue3/src/openapi/models/OpenDataStoreRequest.ts deleted file mode 100644 index 3a586856f..000000000 --- a/vue3/src/openapi/models/OpenDataStoreRequest.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataStoreCategoryRequest } from './OpenDataStoreCategoryRequest'; -import { - OpenDataStoreCategoryRequestFromJSON, - OpenDataStoreCategoryRequestFromJSONTyped, - OpenDataStoreCategoryRequestToJSON, -} from './OpenDataStoreCategoryRequest'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Adds nested create feature - * @export - * @interface OpenDataStoreRequest - */ -export interface OpenDataStoreRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof OpenDataStoreRequest - */ - version: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof OpenDataStoreRequest - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataStoreRequest - */ - name: string; - /** - * - * @type {Array} - * @memberof OpenDataStoreRequest - */ - categoryToStore: Array | null; - /** - * - * @type {string} - * @memberof OpenDataStoreRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataStoreRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataStoreRequest interface. - */ -export function instanceOfOpenDataStoreRequest(value: object): boolean { - if (!('version' in value)) return false; - if (!('slug' in value)) return false; - if (!('name' in value)) return false; - if (!('categoryToStore' in value)) return false; - return true; -} - -export function OpenDataStoreRequestFromJSON(json: any): OpenDataStoreRequest { - return OpenDataStoreRequestFromJSONTyped(json, false); -} - -export function OpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreRequest { - if (json == null) { - return json; - } - return { - - 'version': OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'categoryToStore': (json['category_to_store'] == null ? null : (json['category_to_store'] as Array).map(OpenDataStoreCategoryRequestFromJSON)), - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataStoreRequestToJSON(value?: OpenDataStoreRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'category_to_store': (value['categoryToStore'] == null ? null : (value['categoryToStore'] as Array).map(OpenDataStoreCategoryRequestToJSON)), - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataUnitBaseUnit.ts b/vue3/src/openapi/models/OpenDataUnitBaseUnit.ts deleted file mode 100644 index 78a08f2de..000000000 --- a/vue3/src/openapi/models/OpenDataUnitBaseUnit.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * 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 { BaseUnitEnum } from './BaseUnitEnum'; -import { - instanceOfBaseUnitEnum, - BaseUnitEnumFromJSON, - BaseUnitEnumFromJSONTyped, - BaseUnitEnumToJSON, -} from './BaseUnitEnum'; -import type { BlankEnum } from './BlankEnum'; -import { - instanceOfBlankEnum, - BlankEnumFromJSON, - BlankEnumFromJSONTyped, - BlankEnumToJSON, -} from './BlankEnum'; - -/** - * @type OpenDataUnitBaseUnit - * - * @export - */ -export type OpenDataUnitBaseUnit = BaseUnitEnum | BlankEnum; - -export function OpenDataUnitBaseUnitFromJSON(json: any): OpenDataUnitBaseUnit { - return OpenDataUnitBaseUnitFromJSONTyped(json, false); -} - -export function OpenDataUnitBaseUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitBaseUnit { - if (json == null) { - return json; - } - return { ...BaseUnitEnumFromJSONTyped(json, true), ...BlankEnumFromJSONTyped(json, true) }; -} - -export function OpenDataUnitBaseUnitToJSON(value?: OpenDataUnitBaseUnit | null): any { - if (value == null) { - return value; - } - - if (instanceOfBaseUnitEnum(value)) { - return BaseUnitEnumToJSON(value as BaseUnitEnum); - } - if (instanceOfBlankEnum(value)) { - return BlankEnumToJSON(value as BlankEnum); - } - - return {}; -} - diff --git a/vue3/src/openapi/models/OpenDataUnitRequest.ts b/vue3/src/openapi/models/OpenDataUnitRequest.ts deleted file mode 100644 index 86a463d20..000000000 --- a/vue3/src/openapi/models/OpenDataUnitRequest.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { BaseUnitEnum } from './BaseUnitEnum'; -import { - BaseUnitEnumFromJSON, - BaseUnitEnumFromJSONTyped, - BaseUnitEnumToJSON, -} from './BaseUnitEnum'; -import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum'; -import { - OpenDataUnitTypeEnumFromJSON, - OpenDataUnitTypeEnumFromJSONTyped, - OpenDataUnitTypeEnumToJSON, -} from './OpenDataUnitTypeEnum'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface OpenDataUnitRequest - */ -export interface OpenDataUnitRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof OpenDataUnitRequest - */ - version: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof OpenDataUnitRequest - */ - slug: string; - /** - * - * @type {string} - * @memberof OpenDataUnitRequest - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataUnitRequest - */ - pluralName?: string; - /** - * - * @type {BaseUnitEnum} - * @memberof OpenDataUnitRequest - */ - baseUnit?: BaseUnitEnum; - /** - * - * @type {OpenDataUnitTypeEnum} - * @memberof OpenDataUnitRequest - */ - type: OpenDataUnitTypeEnum; - /** - * - * @type {string} - * @memberof OpenDataUnitRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataUnitRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataUnitRequest interface. - */ -export function instanceOfOpenDataUnitRequest(value: object): boolean { - if (!('version' in value)) return false; - if (!('slug' in value)) return false; - if (!('name' in value)) return false; - if (!('type' in value)) return false; - return true; -} - -export function OpenDataUnitRequestFromJSON(json: any): OpenDataUnitRequest { - return OpenDataUnitRequestFromJSONTyped(json, false); -} - -export function OpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitRequest { - if (json == null) { - return json; - } - return { - - 'version': OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'], - 'name': json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']), - 'type': OpenDataUnitTypeEnumFromJSON(json['type']), - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataUnitRequestToJSON(value?: OpenDataUnitRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'plural_name': value['pluralName'], - 'base_unit': BaseUnitEnumToJSON(value['baseUnit']), - 'type': OpenDataUnitTypeEnumToJSON(value['type']), - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/OpenDataUnitVersion.ts b/vue3/src/openapi/models/OpenDataUnitVersion.ts deleted file mode 100644 index 744b04ed0..000000000 --- a/vue3/src/openapi/models/OpenDataUnitVersion.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenDataUnitVersion - */ -export interface OpenDataUnitVersion { - /** - * - * @type {number} - * @memberof OpenDataUnitVersion - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof OpenDataUnitVersion - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataUnitVersion - */ - code: string; - /** - * - * @type {string} - * @memberof OpenDataUnitVersion - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenDataUnitVersion interface. - */ -export function instanceOfOpenDataUnitVersion(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "code" in value; - - return isInstance; -} - -export function OpenDataUnitVersionFromJSON(json: any): OpenDataUnitVersion { - return OpenDataUnitVersionFromJSONTyped(json, false); -} - -export function OpenDataUnitVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitVersion { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'code': json['code'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - }; -} - -export function OpenDataUnitVersionToJSON(value?: OpenDataUnitVersion | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'code': value.code, - 'comment': value.comment, - }; -} - diff --git a/vue3/src/openapi/models/OpenDataVersionRequest.ts b/vue3/src/openapi/models/OpenDataVersionRequest.ts deleted file mode 100644 index fa49569f5..000000000 --- a/vue3/src/openapi/models/OpenDataVersionRequest.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface OpenDataVersionRequest - */ -export interface OpenDataVersionRequest { - /** - * - * @type {string} - * @memberof OpenDataVersionRequest - */ - name: string; - /** - * - * @type {string} - * @memberof OpenDataVersionRequest - */ - code: string; - /** - * - * @type {string} - * @memberof OpenDataVersionRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof OpenDataVersionRequest - */ - id?: number; -} - -/** - * Check if a given object implements the OpenDataVersionRequest interface. - */ -export function instanceOfOpenDataVersionRequest(value: object): boolean { - if (!('name' in value)) return false; - if (!('code' in value)) return false; - return true; -} - -export function OpenDataVersionRequestFromJSON(json: any): OpenDataVersionRequest { - return OpenDataVersionRequestFromJSONTyped(json, false); -} - -export function OpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataVersionRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'code': json['code'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function OpenDataVersionRequestToJSON(value?: OpenDataVersionRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'code': value['code'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedAccessTokenRequest.ts b/vue3/src/openapi/models/PatchedAccessTokenRequest.ts deleted file mode 100644 index b38546066..000000000 --- a/vue3/src/openapi/models/PatchedAccessTokenRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedAccessTokenRequest - */ -export interface PatchedAccessTokenRequest { - /** - * - * @type {Date} - * @memberof PatchedAccessTokenRequest - */ - expires?: Date; - /** - * - * @type {string} - * @memberof PatchedAccessTokenRequest - */ - scope?: string; - /** - * - * @type {number} - * @memberof PatchedAccessTokenRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedAccessTokenRequest interface. - */ -export function instanceOfPatchedAccessTokenRequest(value: object): boolean { - return true; -} - -export function PatchedAccessTokenRequestFromJSON(json: any): PatchedAccessTokenRequest { - return PatchedAccessTokenRequestFromJSONTyped(json, false); -} - -export function PatchedAccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAccessTokenRequest { - if (json == null) { - return json; - } - return { - - 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), - 'scope': json['scope'] == null ? undefined : json['scope'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedAccessTokenRequestToJSON(value?: PatchedAccessTokenRequest | null): any { - if (value == null) { - return value; - } - return { - - 'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()), - 'scope': value['scope'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedAutomationRequest.ts b/vue3/src/openapi/models/PatchedAutomationRequest.ts deleted file mode 100644 index f1f583724..000000000 --- a/vue3/src/openapi/models/PatchedAutomationRequest.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { TypeEnum } from './TypeEnum'; -import { - TypeEnumFromJSON, - TypeEnumFromJSONTyped, - TypeEnumToJSON, -} from './TypeEnum'; - -/** - * - * @export - * @interface PatchedAutomationRequest - */ -export interface PatchedAutomationRequest { - /** - * - * @type {TypeEnum} - * @memberof PatchedAutomationRequest - */ - type?: TypeEnum; - /** - * - * @type {string} - * @memberof PatchedAutomationRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedAutomationRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof PatchedAutomationRequest - */ - param1?: string; - /** - * - * @type {string} - * @memberof PatchedAutomationRequest - */ - param2?: string; - /** - * - * @type {string} - * @memberof PatchedAutomationRequest - */ - param3?: string; - /** - * - * @type {number} - * @memberof PatchedAutomationRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof PatchedAutomationRequest - */ - disabled?: boolean; - /** - * - * @type {number} - * @memberof PatchedAutomationRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedAutomationRequest interface. - */ -export function instanceOfPatchedAutomationRequest(value: object): boolean { - return true; -} - -export function PatchedAutomationRequestFromJSON(json: any): PatchedAutomationRequest { - return PatchedAutomationRequestFromJSONTyped(json, false); -} - -export function PatchedAutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAutomationRequest { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']), - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'param1': json['param_1'] == null ? undefined : json['param_1'], - 'param2': json['param_2'] == null ? undefined : json['param_2'], - 'param3': json['param_3'] == null ? undefined : json['param_3'], - 'order': json['order'] == null ? undefined : json['order'], - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedAutomationRequestToJSON(value?: PatchedAutomationRequest | null): any { - if (value == null) { - return value; - } - return { - - 'type': TypeEnumToJSON(value['type']), - 'name': value['name'], - 'description': value['description'], - 'param_1': value['param1'], - 'param_2': value['param2'], - 'param_3': value['param3'], - 'order': value['order'], - 'disabled': value['disabled'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts b/vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts deleted file mode 100644 index 7ec867be8..000000000 --- a/vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedBookmarkletImportRequest - */ -export interface PatchedBookmarkletImportRequest { - /** - * - * @type {string} - * @memberof PatchedBookmarkletImportRequest - */ - url?: string; - /** - * - * @type {string} - * @memberof PatchedBookmarkletImportRequest - */ - html?: string; - /** - * - * @type {number} - * @memberof PatchedBookmarkletImportRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedBookmarkletImportRequest interface. - */ -export function instanceOfPatchedBookmarkletImportRequest(value: object): boolean { - return true; -} - -export function PatchedBookmarkletImportRequestFromJSON(json: any): PatchedBookmarkletImportRequest { - return PatchedBookmarkletImportRequestFromJSONTyped(json, false); -} - -export function PatchedBookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedBookmarkletImportRequest { - if (json == null) { - return json; - } - return { - - 'url': json['url'] == null ? undefined : json['url'], - 'html': json['html'] == null ? undefined : json['html'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedBookmarkletImportRequestToJSON(value?: PatchedBookmarkletImportRequest | null): any { - if (value == null) { - return value; - } - return { - - 'url': value['url'], - 'html': value['html'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts b/vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts deleted file mode 100644 index ce4651865..000000000 --- a/vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedConnectorConfigConfigRequest - */ -export interface PatchedConnectorConfigConfigRequest { - /** - * - * @type {string} - * @memberof PatchedConnectorConfigConfigRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedConnectorConfigConfigRequest - */ - url?: string; - /** - * - * @type {string} - * @memberof PatchedConnectorConfigConfigRequest - */ - token?: string; - /** - * - * @type {string} - * @memberof PatchedConnectorConfigConfigRequest - */ - todoEntity?: string; - /** - * Is Connector Enabled - * @type {boolean} - * @memberof PatchedConnectorConfigConfigRequest - */ - enabled?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedConnectorConfigConfigRequest - */ - onShoppingListEntryCreatedEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedConnectorConfigConfigRequest - */ - onShoppingListEntryUpdatedEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedConnectorConfigConfigRequest - */ - onShoppingListEntryDeletedEnabled?: boolean; - /** - * - * @type {number} - * @memberof PatchedConnectorConfigConfigRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedConnectorConfigConfigRequest interface. - */ -export function instanceOfPatchedConnectorConfigConfigRequest(value: object): boolean { - return true; -} - -export function PatchedConnectorConfigConfigRequestFromJSON(json: any): PatchedConnectorConfigConfigRequest { - return PatchedConnectorConfigConfigRequestFromJSONTyped(json, false); -} - -export function PatchedConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConnectorConfigConfigRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'url': json['url'] == null ? undefined : json['url'], - 'token': json['token'] == null ? undefined : json['token'], - 'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'], - 'enabled': json['enabled'] == null ? undefined : json['enabled'], - 'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'], - 'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'], - 'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedConnectorConfigConfigRequestToJSON(value?: PatchedConnectorConfigConfigRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'url': value['url'], - 'token': value['token'], - 'todo_entity': value['todoEntity'], - 'enabled': value['enabled'], - 'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'], - 'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'], - 'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedCookLogRequest.ts b/vue3/src/openapi/models/PatchedCookLogRequest.ts deleted file mode 100644 index 3a885a8a7..000000000 --- a/vue3/src/openapi/models/PatchedCookLogRequest.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedCookLogRequest - */ -export interface PatchedCookLogRequest { - /** - * - * @type {number} - * @memberof PatchedCookLogRequest - */ - recipe?: number; - /** - * - * @type {number} - * @memberof PatchedCookLogRequest - */ - servings?: number; - /** - * - * @type {number} - * @memberof PatchedCookLogRequest - */ - rating?: number; - /** - * - * @type {string} - * @memberof PatchedCookLogRequest - */ - comment?: string; - /** - * - * @type {Date} - * @memberof PatchedCookLogRequest - */ - createdAt?: Date; - /** - * - * @type {number} - * @memberof PatchedCookLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedCookLogRequest interface. - */ -export function instanceOfPatchedCookLogRequest(value: object): boolean { - return true; -} - -export function PatchedCookLogRequestFromJSON(json: any): PatchedCookLogRequest { - return PatchedCookLogRequestFromJSONTyped(json, false); -} - -export function PatchedCookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCookLogRequest { - if (json == null) { - return json; - } - return { - - 'recipe': json['recipe'] == null ? undefined : json['recipe'], - 'servings': json['servings'] == null ? undefined : json['servings'], - 'rating': json['rating'] == null ? undefined : json['rating'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedCookLogRequestToJSON(value?: PatchedCookLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'recipe': value['recipe'], - 'servings': value['servings'], - 'rating': value['rating'], - 'comment': value['comment'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedCustomFilterRequest.ts b/vue3/src/openapi/models/PatchedCustomFilterRequest.ts deleted file mode 100644 index adfd05d8c..000000000 --- a/vue3/src/openapi/models/PatchedCustomFilterRequest.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedCustomFilterRequest - */ -export interface PatchedCustomFilterRequest { - /** - * - * @type {string} - * @memberof PatchedCustomFilterRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedCustomFilterRequest - */ - search?: string; - /** - * - * @type {Array} - * @memberof PatchedCustomFilterRequest - */ - shared?: Array; - /** - * - * @type {number} - * @memberof PatchedCustomFilterRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedCustomFilterRequest interface. - */ -export function instanceOfPatchedCustomFilterRequest(value: object): boolean { - return true; -} - -export function PatchedCustomFilterRequestFromJSON(json: any): PatchedCustomFilterRequest { - return PatchedCustomFilterRequestFromJSONTyped(json, false); -} - -export function PatchedCustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCustomFilterRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'search': json['search'] == null ? undefined : json['search'], - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedCustomFilterRequestToJSON(value?: PatchedCustomFilterRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'search': value['search'], - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedExportLogRequest.ts b/vue3/src/openapi/models/PatchedExportLogRequest.ts deleted file mode 100644 index ba032f216..000000000 --- a/vue3/src/openapi/models/PatchedExportLogRequest.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedExportLogRequest - */ -export interface PatchedExportLogRequest { - /** - * - * @type {string} - * @memberof PatchedExportLogRequest - */ - type?: string; - /** - * - * @type {string} - * @memberof PatchedExportLogRequest - */ - msg?: string; - /** - * - * @type {boolean} - * @memberof PatchedExportLogRequest - */ - running?: boolean; - /** - * - * @type {number} - * @memberof PatchedExportLogRequest - */ - totalRecipes?: number; - /** - * - * @type {number} - * @memberof PatchedExportLogRequest - */ - exportedRecipes?: number; - /** - * - * @type {number} - * @memberof PatchedExportLogRequest - */ - cacheDuration?: number; - /** - * - * @type {boolean} - * @memberof PatchedExportLogRequest - */ - possiblyNotExpired?: boolean; - /** - * - * @type {number} - * @memberof PatchedExportLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedExportLogRequest interface. - */ -export function instanceOfPatchedExportLogRequest(value: object): boolean { - return true; -} - -export function PatchedExportLogRequestFromJSON(json: any): PatchedExportLogRequest { - return PatchedExportLogRequestFromJSONTyped(json, false); -} - -export function PatchedExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedExportLogRequest { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'msg': json['msg'] == null ? undefined : json['msg'], - 'running': json['running'] == null ? undefined : json['running'], - 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], - 'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'], - 'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'], - 'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedExportLogRequestToJSON(value?: PatchedExportLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'type': value['type'], - 'msg': value['msg'], - 'running': value['running'], - 'total_recipes': value['totalRecipes'], - 'exported_recipes': value['exportedRecipes'], - 'cache_duration': value['cacheDuration'], - 'possibly_not_expired': value['possiblyNotExpired'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedFoodRequest.ts b/vue3/src/openapi/models/PatchedFoodRequest.ts deleted file mode 100644 index 9cb482f63..000000000 --- a/vue3/src/openapi/models/PatchedFoodRequest.ts +++ /dev/null @@ -1,275 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodInheritFieldRequest } from './FoodInheritFieldRequest'; -import { - FoodInheritFieldRequestFromJSON, - FoodInheritFieldRequestFromJSONTyped, - FoodInheritFieldRequestToJSON, -} from './FoodInheritFieldRequest'; -import type { FoodSimpleRequest } from './FoodSimpleRequest'; -import { - FoodSimpleRequestFromJSON, - FoodSimpleRequestFromJSONTyped, - FoodSimpleRequestToJSON, -} from './FoodSimpleRequest'; -import type { PropertyRequest } from './PropertyRequest'; -import { - PropertyRequestFromJSON, - PropertyRequestFromJSONTyped, - PropertyRequestToJSON, -} from './PropertyRequest'; -import type { RecipeSimpleRequest } from './RecipeSimpleRequest'; -import { - RecipeSimpleRequestFromJSON, - RecipeSimpleRequestFromJSONTyped, - RecipeSimpleRequestToJSON, -} from './RecipeSimpleRequest'; -import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest'; -import { - SupermarketCategoryRequestFromJSON, - SupermarketCategoryRequestFromJSONTyped, - SupermarketCategoryRequestToJSON, -} from './SupermarketCategoryRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedFoodRequest - */ -export interface PatchedFoodRequest { - /** - * - * @type {string} - * @memberof PatchedFoodRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedFoodRequest - */ - pluralName?: string; - /** - * - * @type {string} - * @memberof PatchedFoodRequest - */ - description?: string; - /** - * - * @type {RecipeSimpleRequest} - * @memberof PatchedFoodRequest - */ - recipe?: RecipeSimpleRequest; - /** - * - * @type {string} - * @memberof PatchedFoodRequest - */ - url?: string; - /** - * - * @type {Array} - * @memberof PatchedFoodRequest - */ - properties?: Array; - /** - * - * @type {number} - * @memberof PatchedFoodRequest - */ - propertiesFoodAmount?: number; - /** - * - * @type {UnitRequest} - * @memberof PatchedFoodRequest - */ - propertiesFoodUnit?: UnitRequest; - /** - * - * @type {number} - * @memberof PatchedFoodRequest - */ - fdcId?: number; - /** - * - * @type {boolean} - * @memberof PatchedFoodRequest - */ - foodOnhand?: boolean; - /** - * - * @type {SupermarketCategoryRequest} - * @memberof PatchedFoodRequest - */ - supermarketCategory?: SupermarketCategoryRequest; - /** - * - * @type {Array} - * @memberof PatchedFoodRequest - */ - inheritFields?: Array; - /** - * - * @type {boolean} - * @memberof PatchedFoodRequest - */ - ignoreShopping?: boolean; - /** - * - * @type {Array} - * @memberof PatchedFoodRequest - */ - substitute?: Array; - /** - * - * @type {boolean} - * @memberof PatchedFoodRequest - */ - substituteSiblings?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedFoodRequest - */ - substituteChildren?: boolean; - /** - * - * @type {Array} - * @memberof PatchedFoodRequest - */ - childInheritFields?: Array; - /** - * - * @type {string} - * @memberof PatchedFoodRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof PatchedFoodRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedFoodRequest interface. - */ -export function instanceOfPatchedFoodRequest(value: object): boolean { - return true; -} - -export function PatchedFoodRequestFromJSON(json: any): PatchedFoodRequest { - return PatchedFoodRequestFromJSONTyped(json, false); -} - -export function PatchedFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFoodRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'description': json['description'] == null ? undefined : json['description'], - 'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']), - 'url': json['url'] == null ? undefined : json['url'], - 'properties': json['properties'] == null ? undefined : ((json['properties'] as Array).map(PropertyRequestFromJSON)), - 'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'], - 'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']), - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - 'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'], - 'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']), - 'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array).map(FoodInheritFieldRequestFromJSON)), - 'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'], - 'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array).map(FoodSimpleRequestFromJSON)), - 'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'], - 'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'], - 'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array).map(FoodInheritFieldRequestFromJSON)), - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedFoodRequestToJSON(value?: PatchedFoodRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'plural_name': value['pluralName'], - 'description': value['description'], - 'recipe': RecipeSimpleRequestToJSON(value['recipe']), - 'url': value['url'], - 'properties': value['properties'] == null ? undefined : ((value['properties'] as Array).map(PropertyRequestToJSON)), - 'properties_food_amount': value['propertiesFoodAmount'], - 'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']), - 'fdc_id': value['fdcId'], - 'food_onhand': value['foodOnhand'], - 'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']), - 'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array).map(FoodInheritFieldRequestToJSON)), - 'ignore_shopping': value['ignoreShopping'], - 'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array).map(FoodSimpleRequestToJSON)), - 'substitute_siblings': value['substituteSiblings'], - 'substitute_children': value['substituteChildren'], - 'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array).map(FoodInheritFieldRequestToJSON)), - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedImportLogRequest.ts b/vue3/src/openapi/models/PatchedImportLogRequest.ts deleted file mode 100644 index b855ffcbb..000000000 --- a/vue3/src/openapi/models/PatchedImportLogRequest.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedImportLogRequest - */ -export interface PatchedImportLogRequest { - /** - * - * @type {string} - * @memberof PatchedImportLogRequest - */ - type?: string; - /** - * - * @type {string} - * @memberof PatchedImportLogRequest - */ - msg?: string; - /** - * - * @type {boolean} - * @memberof PatchedImportLogRequest - */ - running?: boolean; - /** - * - * @type {number} - * @memberof PatchedImportLogRequest - */ - totalRecipes?: number; - /** - * - * @type {number} - * @memberof PatchedImportLogRequest - */ - importedRecipes?: number; - /** - * - * @type {number} - * @memberof PatchedImportLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedImportLogRequest interface. - */ -export function instanceOfPatchedImportLogRequest(value: object): boolean { - return true; -} - -export function PatchedImportLogRequestFromJSON(json: any): PatchedImportLogRequest { - return PatchedImportLogRequestFromJSONTyped(json, false); -} - -export function PatchedImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedImportLogRequest { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'msg': json['msg'] == null ? undefined : json['msg'], - 'running': json['running'] == null ? undefined : json['running'], - 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], - 'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedImportLogRequestToJSON(value?: PatchedImportLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'type': value['type'], - 'msg': value['msg'], - 'running': value['running'], - 'total_recipes': value['totalRecipes'], - 'imported_recipes': value['importedRecipes'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedIngredientRequest.ts b/vue3/src/openapi/models/PatchedIngredientRequest.ts deleted file mode 100644 index cd32f9679..000000000 --- a/vue3/src/openapi/models/PatchedIngredientRequest.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodRequest } from './FoodRequest'; -import { - FoodRequestFromJSON, - FoodRequestFromJSONTyped, - FoodRequestToJSON, -} from './FoodRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedIngredientRequest - */ -export interface PatchedIngredientRequest { - /** - * - * @type {FoodRequest} - * @memberof PatchedIngredientRequest - */ - food?: FoodRequest; - /** - * - * @type {UnitRequest} - * @memberof PatchedIngredientRequest - */ - unit?: UnitRequest; - /** - * - * @type {number} - * @memberof PatchedIngredientRequest - */ - amount?: number; - /** - * - * @type {string} - * @memberof PatchedIngredientRequest - */ - note?: string; - /** - * - * @type {number} - * @memberof PatchedIngredientRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof PatchedIngredientRequest - */ - isHeader?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedIngredientRequest - */ - noAmount?: boolean; - /** - * - * @type {string} - * @memberof PatchedIngredientRequest - */ - originalText?: string; - /** - * - * @type {boolean} - * @memberof PatchedIngredientRequest - */ - alwaysUsePluralUnit?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedIngredientRequest - */ - alwaysUsePluralFood?: boolean; - /** - * - * @type {number} - * @memberof PatchedIngredientRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedIngredientRequest interface. - */ -export function instanceOfPatchedIngredientRequest(value: object): boolean { - return true; -} - -export function PatchedIngredientRequestFromJSON(json: any): PatchedIngredientRequest { - return PatchedIngredientRequestFromJSONTyped(json, false); -} - -export function PatchedIngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedIngredientRequest { - if (json == null) { - return json; - } - return { - - 'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']), - 'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']), - 'amount': json['amount'] == null ? undefined : json['amount'], - 'note': json['note'] == null ? undefined : json['note'], - 'order': json['order'] == null ? undefined : json['order'], - 'isHeader': json['is_header'] == null ? undefined : json['is_header'], - 'noAmount': json['no_amount'] == null ? undefined : json['no_amount'], - 'originalText': json['original_text'] == null ? undefined : json['original_text'], - 'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'], - 'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedIngredientRequestToJSON(value?: PatchedIngredientRequest | null): any { - if (value == null) { - return value; - } - return { - - 'food': FoodRequestToJSON(value['food']), - 'unit': UnitRequestToJSON(value['unit']), - 'amount': value['amount'], - 'note': value['note'], - 'order': value['order'], - 'is_header': value['isHeader'], - 'no_amount': value['noAmount'], - 'original_text': value['originalText'], - 'always_use_plural_unit': value['alwaysUsePluralUnit'], - 'always_use_plural_food': value['alwaysUsePluralFood'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedInviteLinkRequest.ts b/vue3/src/openapi/models/PatchedInviteLinkRequest.ts deleted file mode 100644 index 52c4c69ea..000000000 --- a/vue3/src/openapi/models/PatchedInviteLinkRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { GroupRequest } from './GroupRequest'; -import { - GroupRequestFromJSON, - GroupRequestFromJSONTyped, - GroupRequestToJSON, -} from './GroupRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedInviteLinkRequest - */ -export interface PatchedInviteLinkRequest { - /** - * - * @type {string} - * @memberof PatchedInviteLinkRequest - */ - email?: string; - /** - * - * @type {GroupRequest} - * @memberof PatchedInviteLinkRequest - */ - group?: GroupRequest; - /** - * - * @type {Date} - * @memberof PatchedInviteLinkRequest - */ - validUntil?: Date; - /** - * - * @type {number} - * @memberof PatchedInviteLinkRequest - */ - usedBy?: number; - /** - * - * @type {boolean} - * @memberof PatchedInviteLinkRequest - */ - reusable?: boolean; - /** - * - * @type {string} - * @memberof PatchedInviteLinkRequest - */ - internalNote?: string; - /** - * - * @type {number} - * @memberof PatchedInviteLinkRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedInviteLinkRequest interface. - */ -export function instanceOfPatchedInviteLinkRequest(value: object): boolean { - return true; -} - -export function PatchedInviteLinkRequestFromJSON(json: any): PatchedInviteLinkRequest { - return PatchedInviteLinkRequestFromJSONTyped(json, false); -} - -export function PatchedInviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInviteLinkRequest { - if (json == null) { - return json; - } - return { - - 'email': json['email'] == null ? undefined : json['email'], - 'group': json['group'] == null ? undefined : GroupRequestFromJSON(json['group']), - 'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])), - 'usedBy': json['used_by'] == null ? undefined : json['used_by'], - 'reusable': json['reusable'] == null ? undefined : json['reusable'], - 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedInviteLinkRequestToJSON(value?: PatchedInviteLinkRequest | null): any { - if (value == null) { - return value; - } - return { - - 'email': value['email'], - 'group': GroupRequestToJSON(value['group']), - 'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)), - 'used_by': value['usedBy'], - 'reusable': value['reusable'], - 'internal_note': value['internalNote'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedKeywordRequest.ts b/vue3/src/openapi/models/PatchedKeywordRequest.ts deleted file mode 100644 index c51edbd9c..000000000 --- a/vue3/src/openapi/models/PatchedKeywordRequest.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedKeywordRequest - */ -export interface PatchedKeywordRequest { - /** - * - * @type {string} - * @memberof PatchedKeywordRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedKeywordRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof PatchedKeywordRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedKeywordRequest interface. - */ -export function instanceOfPatchedKeywordRequest(value: object): boolean { - return true; -} - -export function PatchedKeywordRequestFromJSON(json: any): PatchedKeywordRequest { - return PatchedKeywordRequestFromJSONTyped(json, false); -} - -export function PatchedKeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKeywordRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedKeywordRequestToJSON(value?: PatchedKeywordRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedMealPlanRequest.ts b/vue3/src/openapi/models/PatchedMealPlanRequest.ts deleted file mode 100644 index 654c75684..000000000 --- a/vue3/src/openapi/models/PatchedMealPlanRequest.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { MealTypeRequest } from './MealTypeRequest'; -import { - MealTypeRequestFromJSON, - MealTypeRequestFromJSONTyped, - MealTypeRequestToJSON, -} from './MealTypeRequest'; -import type { RecipeOverviewRequest } from './RecipeOverviewRequest'; -import { - RecipeOverviewRequestFromJSON, - RecipeOverviewRequestFromJSONTyped, - RecipeOverviewRequestToJSON, -} from './RecipeOverviewRequest'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedMealPlanRequest - */ -export interface PatchedMealPlanRequest { - /** - * - * @type {string} - * @memberof PatchedMealPlanRequest - */ - title?: string; - /** - * - * @type {RecipeOverviewRequest} - * @memberof PatchedMealPlanRequest - */ - recipe?: RecipeOverviewRequest; - /** - * - * @type {number} - * @memberof PatchedMealPlanRequest - */ - servings?: number; - /** - * - * @type {string} - * @memberof PatchedMealPlanRequest - */ - note?: string; - /** - * - * @type {Date} - * @memberof PatchedMealPlanRequest - */ - fromDate?: Date; - /** - * - * @type {Date} - * @memberof PatchedMealPlanRequest - */ - toDate?: Date; - /** - * - * @type {MealTypeRequest} - * @memberof PatchedMealPlanRequest - */ - mealType?: MealTypeRequest; - /** - * - * @type {Array} - * @memberof PatchedMealPlanRequest - */ - shared?: Array; - /** - * - * @type {number} - * @memberof PatchedMealPlanRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedMealPlanRequest interface. - */ -export function instanceOfPatchedMealPlanRequest(value: object): boolean { - return true; -} - -export function PatchedMealPlanRequestFromJSON(json: any): PatchedMealPlanRequest { - return PatchedMealPlanRequestFromJSONTyped(json, false); -} - -export function PatchedMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealPlanRequest { - if (json == null) { - return json; - } - return { - - 'title': json['title'] == null ? undefined : json['title'], - 'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']), - 'servings': json['servings'] == null ? undefined : json['servings'], - 'note': json['note'] == null ? undefined : json['note'], - 'fromDate': json['from_date'] == null ? undefined : (new Date(json['from_date'])), - 'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])), - 'mealType': json['meal_type'] == null ? undefined : MealTypeRequestFromJSON(json['meal_type']), - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedMealPlanRequestToJSON(value?: PatchedMealPlanRequest | null): any { - if (value == null) { - return value; - } - return { - - 'title': value['title'], - 'recipe': RecipeOverviewRequestToJSON(value['recipe']), - 'servings': value['servings'], - 'note': value['note'], - 'from_date': value['fromDate'] == null ? undefined : ((value['fromDate']).toISOString().substring(0,10)), - 'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)), - 'meal_type': MealTypeRequestToJSON(value['mealType']), - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedMealTypeRequest.ts b/vue3/src/openapi/models/PatchedMealTypeRequest.ts deleted file mode 100644 index 70624d93b..000000000 --- a/vue3/src/openapi/models/PatchedMealTypeRequest.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface PatchedMealTypeRequest - */ -export interface PatchedMealTypeRequest { - /** - * - * @type {string} - * @memberof PatchedMealTypeRequest - */ - name?: string; - /** - * - * @type {number} - * @memberof PatchedMealTypeRequest - */ - order?: number; - /** - * - * @type {string} - * @memberof PatchedMealTypeRequest - */ - color?: string; - /** - * - * @type {boolean} - * @memberof PatchedMealTypeRequest - */ - _default?: boolean; - /** - * - * @type {number} - * @memberof PatchedMealTypeRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedMealTypeRequest interface. - */ -export function instanceOfPatchedMealTypeRequest(value: object): boolean { - return true; -} - -export function PatchedMealTypeRequestFromJSON(json: any): PatchedMealTypeRequest { - return PatchedMealTypeRequestFromJSONTyped(json, false); -} - -export function PatchedMealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealTypeRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'order': json['order'] == null ? undefined : json['order'], - 'color': json['color'] == null ? undefined : json['color'], - '_default': json['default'] == null ? undefined : json['default'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedMealTypeRequestToJSON(value?: PatchedMealTypeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'order': value['order'], - 'color': value['color'], - 'default': value['_default'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts b/vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts deleted file mode 100644 index 1d84c5a3d..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts +++ /dev/null @@ -1,141 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedOpenDataCategoryRequest - */ -export interface PatchedOpenDataCategoryRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof PatchedOpenDataCategoryRequest - */ - version?: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataCategoryRequest - */ - slug?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataCategoryRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataCategoryRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataCategoryRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataCategoryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataCategoryRequest interface. - */ -export function instanceOfPatchedOpenDataCategoryRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataCategoryRequestFromJSON(json: any): PatchedOpenDataCategoryRequest { - return PatchedOpenDataCategoryRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataCategoryRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataCategoryRequestToJSON(value?: PatchedOpenDataCategoryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'description': value['description'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts b/vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts deleted file mode 100644 index 2cc105ae3..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataFoodRequest } from './OpenDataFoodRequest'; -import { - OpenDataFoodRequestFromJSON, - OpenDataFoodRequestFromJSONTyped, - OpenDataFoodRequestToJSON, -} from './OpenDataFoodRequest'; -import type { OpenDataUnitRequest } from './OpenDataUnitRequest'; -import { - OpenDataUnitRequestFromJSON, - OpenDataUnitRequestFromJSONTyped, - OpenDataUnitRequestToJSON, -} from './OpenDataUnitRequest'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedOpenDataConversionRequest - */ -export interface PatchedOpenDataConversionRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof PatchedOpenDataConversionRequest - */ - version?: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataConversionRequest - */ - slug?: string; - /** - * - * @type {OpenDataFoodRequest} - * @memberof PatchedOpenDataConversionRequest - */ - food?: OpenDataFoodRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataConversionRequest - */ - baseAmount?: string; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataConversionRequest - */ - baseUnit?: OpenDataUnitRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataConversionRequest - */ - convertedAmount?: string; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataConversionRequest - */ - convertedUnit?: OpenDataUnitRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataConversionRequest - */ - source?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataConversionRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataConversionRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataConversionRequest interface. - */ -export function instanceOfPatchedOpenDataConversionRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataConversionRequestFromJSON(json: any): PatchedOpenDataConversionRequest { - return PatchedOpenDataConversionRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataConversionRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'food': json['food'] == null ? undefined : OpenDataFoodRequestFromJSON(json['food']), - 'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'], - 'baseUnit': json['base_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['base_unit']), - 'convertedAmount': json['converted_amount'] == null ? undefined : json['converted_amount'], - 'convertedUnit': json['converted_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['converted_unit']), - 'source': json['source'] == null ? undefined : json['source'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataConversionRequestToJSON(value?: PatchedOpenDataConversionRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'food': OpenDataFoodRequestToJSON(value['food']), - 'base_amount': value['baseAmount'], - 'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']), - 'converted_amount': value['convertedAmount'], - 'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']), - 'source': value['source'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts b/vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts deleted file mode 100644 index 484c82c76..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts +++ /dev/null @@ -1,239 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest'; -import { - OpenDataCategoryRequestFromJSON, - OpenDataCategoryRequestFromJSONTyped, - OpenDataCategoryRequestToJSON, -} from './OpenDataCategoryRequest'; -import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest'; -import { - OpenDataFoodPropertyRequestFromJSON, - OpenDataFoodPropertyRequestFromJSONTyped, - OpenDataFoodPropertyRequestToJSON, -} from './OpenDataFoodPropertyRequest'; -import type { OpenDataUnitRequest } from './OpenDataUnitRequest'; -import { - OpenDataUnitRequestFromJSON, - OpenDataUnitRequestFromJSONTyped, - OpenDataUnitRequestToJSON, -} from './OpenDataUnitRequest'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedOpenDataFoodRequest - */ -export interface PatchedOpenDataFoodRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof PatchedOpenDataFoodRequest - */ - version?: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataFoodRequest - */ - slug?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataFoodRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataFoodRequest - */ - pluralName?: string; - /** - * - * @type {OpenDataCategoryRequest} - * @memberof PatchedOpenDataFoodRequest - */ - storeCategory?: OpenDataCategoryRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataFoodRequest - */ - preferredUnitMetric?: OpenDataUnitRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataFoodRequest - */ - preferredShoppingUnitMetric?: OpenDataUnitRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataFoodRequest - */ - preferredUnitImperial?: OpenDataUnitRequest; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataFoodRequest - */ - preferredShoppingUnitImperial?: OpenDataUnitRequest; - /** - * - * @type {Array} - * @memberof PatchedOpenDataFoodRequest - */ - properties?: Array; - /** - * - * @type {number} - * @memberof PatchedOpenDataFoodRequest - */ - propertiesFoodAmount?: number; - /** - * - * @type {OpenDataUnitRequest} - * @memberof PatchedOpenDataFoodRequest - */ - propertiesFoodUnit?: OpenDataUnitRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataFoodRequest - */ - propertiesSource?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataFoodRequest - */ - fdcId?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataFoodRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataFoodRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataFoodRequest interface. - */ -export function instanceOfPatchedOpenDataFoodRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataFoodRequestFromJSON(json: any): PatchedOpenDataFoodRequest { - return PatchedOpenDataFoodRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataFoodRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'name': json['name'] == null ? undefined : json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'storeCategory': json['store_category'] == null ? undefined : OpenDataCategoryRequestFromJSON(json['store_category']), - 'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']), - 'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']), - 'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']), - 'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']), - 'properties': json['properties'] == null ? undefined : ((json['properties'] as Array).map(OpenDataFoodPropertyRequestFromJSON)), - 'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'], - 'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['properties_food_unit']), - 'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'], - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataFoodRequestToJSON(value?: PatchedOpenDataFoodRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'plural_name': value['pluralName'], - 'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']), - 'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']), - 'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']), - 'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']), - 'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']), - 'properties': value['properties'] == null ? undefined : ((value['properties'] as Array).map(OpenDataFoodPropertyRequestToJSON)), - 'properties_food_amount': value['propertiesFoodAmount'], - 'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']), - 'properties_source': value['propertiesSource'], - 'fdc_id': value['fdcId'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts b/vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts deleted file mode 100644 index c806f0a4e..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedOpenDataPropertyRequest - */ -export interface PatchedOpenDataPropertyRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof PatchedOpenDataPropertyRequest - */ - version?: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataPropertyRequest - */ - slug?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataPropertyRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataPropertyRequest - */ - unit?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataPropertyRequest - */ - fdcId?: number; - /** - * - * @type {string} - * @memberof PatchedOpenDataPropertyRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataPropertyRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataPropertyRequest interface. - */ -export function instanceOfPatchedOpenDataPropertyRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataPropertyRequestFromJSON(json: any): PatchedOpenDataPropertyRequest { - return PatchedOpenDataPropertyRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataPropertyRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'name': json['name'] == null ? undefined : json['name'], - 'unit': json['unit'] == null ? undefined : json['unit'], - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataPropertyRequestToJSON(value?: PatchedOpenDataPropertyRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'unit': value['unit'], - 'fdc_id': value['fdcId'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts b/vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts deleted file mode 100644 index 5ede50074..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenDataStoreCategoryRequest } from './OpenDataStoreCategoryRequest'; -import { - OpenDataStoreCategoryRequestFromJSON, - OpenDataStoreCategoryRequestFromJSONTyped, - OpenDataStoreCategoryRequestToJSON, -} from './OpenDataStoreCategoryRequest'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedOpenDataStoreRequest - */ -export interface PatchedOpenDataStoreRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof PatchedOpenDataStoreRequest - */ - version?: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataStoreRequest - */ - slug?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataStoreRequest - */ - name?: string; - /** - * - * @type {Array} - * @memberof PatchedOpenDataStoreRequest - */ - categoryToStore?: Array; - /** - * - * @type {string} - * @memberof PatchedOpenDataStoreRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataStoreRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataStoreRequest interface. - */ -export function instanceOfPatchedOpenDataStoreRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataStoreRequestFromJSON(json: any): PatchedOpenDataStoreRequest { - return PatchedOpenDataStoreRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataStoreRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'name': json['name'] == null ? undefined : json['name'], - 'categoryToStore': json['category_to_store'] == null ? undefined : ((json['category_to_store'] as Array).map(OpenDataStoreCategoryRequestFromJSON)), - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataStoreRequestToJSON(value?: PatchedOpenDataStoreRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'category_to_store': value['categoryToStore'] == null ? undefined : ((value['categoryToStore'] as Array).map(OpenDataStoreCategoryRequestToJSON)), - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts b/vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts deleted file mode 100644 index 6dce5bdc3..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts +++ /dev/null @@ -1,169 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { BaseUnitEnum } from './BaseUnitEnum'; -import { - BaseUnitEnumFromJSON, - BaseUnitEnumFromJSONTyped, - BaseUnitEnumToJSON, -} from './BaseUnitEnum'; -import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum'; -import { - OpenDataUnitTypeEnumFromJSON, - OpenDataUnitTypeEnumFromJSONTyped, - OpenDataUnitTypeEnumToJSON, -} from './OpenDataUnitTypeEnum'; -import type { OpenDataVersionRequest } from './OpenDataVersionRequest'; -import { - OpenDataVersionRequestFromJSON, - OpenDataVersionRequestFromJSONTyped, - OpenDataVersionRequestToJSON, -} from './OpenDataVersionRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedOpenDataUnitRequest - */ -export interface PatchedOpenDataUnitRequest { - /** - * - * @type {OpenDataVersionRequest} - * @memberof PatchedOpenDataUnitRequest - */ - version?: OpenDataVersionRequest; - /** - * - * @type {string} - * @memberof PatchedOpenDataUnitRequest - */ - slug?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataUnitRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataUnitRequest - */ - pluralName?: string; - /** - * - * @type {BaseUnitEnum} - * @memberof PatchedOpenDataUnitRequest - */ - baseUnit?: BaseUnitEnum; - /** - * - * @type {OpenDataUnitTypeEnum} - * @memberof PatchedOpenDataUnitRequest - */ - type?: OpenDataUnitTypeEnum; - /** - * - * @type {string} - * @memberof PatchedOpenDataUnitRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataUnitRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataUnitRequest interface. - */ -export function instanceOfPatchedOpenDataUnitRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataUnitRequestFromJSON(json: any): PatchedOpenDataUnitRequest { - return PatchedOpenDataUnitRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataUnitRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'name': json['name'] == null ? undefined : json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']), - 'type': json['type'] == null ? undefined : OpenDataUnitTypeEnumFromJSON(json['type']), - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataUnitRequestToJSON(value?: PatchedOpenDataUnitRequest | null): any { - if (value == null) { - return value; - } - return { - - 'version': OpenDataVersionRequestToJSON(value['version']), - 'slug': value['slug'], - 'name': value['name'], - 'plural_name': value['pluralName'], - 'base_unit': BaseUnitEnumToJSON(value['baseUnit']), - 'type': OpenDataUnitTypeEnumToJSON(value['type']), - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts b/vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts deleted file mode 100644 index 42fdcb581..000000000 --- a/vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedOpenDataVersionRequest - */ -export interface PatchedOpenDataVersionRequest { - /** - * - * @type {string} - * @memberof PatchedOpenDataVersionRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataVersionRequest - */ - code?: string; - /** - * - * @type {string} - * @memberof PatchedOpenDataVersionRequest - */ - comment?: string; - /** - * - * @type {number} - * @memberof PatchedOpenDataVersionRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedOpenDataVersionRequest interface. - */ -export function instanceOfPatchedOpenDataVersionRequest(value: object): boolean { - return true; -} - -export function PatchedOpenDataVersionRequestFromJSON(json: any): PatchedOpenDataVersionRequest { - return PatchedOpenDataVersionRequestFromJSONTyped(json, false); -} - -export function PatchedOpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataVersionRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'code': json['code'] == null ? undefined : json['code'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedOpenDataVersionRequestToJSON(value?: PatchedOpenDataVersionRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'code': value['code'], - 'comment': value['comment'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedPropertyRequest.ts b/vue3/src/openapi/models/PatchedPropertyRequest.ts deleted file mode 100644 index 70581b02d..000000000 --- a/vue3/src/openapi/models/PatchedPropertyRequest.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { PropertyTypeRequest } from './PropertyTypeRequest'; -import { - PropertyTypeRequestFromJSON, - PropertyTypeRequestFromJSONTyped, - PropertyTypeRequestToJSON, -} from './PropertyTypeRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedPropertyRequest - */ -export interface PatchedPropertyRequest { - /** - * - * @type {number} - * @memberof PatchedPropertyRequest - */ - propertyAmount?: number; - /** - * - * @type {PropertyTypeRequest} - * @memberof PatchedPropertyRequest - */ - propertyType?: PropertyTypeRequest; - /** - * - * @type {number} - * @memberof PatchedPropertyRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedPropertyRequest interface. - */ -export function instanceOfPatchedPropertyRequest(value: object): boolean { - return true; -} - -export function PatchedPropertyRequestFromJSON(json: any): PatchedPropertyRequest { - return PatchedPropertyRequestFromJSONTyped(json, false); -} - -export function PatchedPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyRequest { - if (json == null) { - return json; - } - return { - - 'propertyAmount': json['property_amount'] == null ? undefined : json['property_amount'], - 'propertyType': json['property_type'] == null ? undefined : PropertyTypeRequestFromJSON(json['property_type']), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedPropertyRequestToJSON(value?: PatchedPropertyRequest | null): any { - if (value == null) { - return value; - } - return { - - 'property_amount': value['propertyAmount'], - 'property_type': PropertyTypeRequestToJSON(value['propertyType']), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedPropertyTypeRequest.ts b/vue3/src/openapi/models/PatchedPropertyTypeRequest.ts deleted file mode 100644 index 7cc545ffb..000000000 --- a/vue3/src/openapi/models/PatchedPropertyTypeRequest.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface PatchedPropertyTypeRequest - */ -export interface PatchedPropertyTypeRequest { - /** - * - * @type {number} - * @memberof PatchedPropertyTypeRequest - */ - id?: number; - /** - * - * @type {string} - * @memberof PatchedPropertyTypeRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedPropertyTypeRequest - */ - unit?: string; - /** - * - * @type {string} - * @memberof PatchedPropertyTypeRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof PatchedPropertyTypeRequest - */ - order?: number; - /** - * - * @type {string} - * @memberof PatchedPropertyTypeRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof PatchedPropertyTypeRequest - */ - fdcId?: number; -} - -/** - * Check if a given object implements the PatchedPropertyTypeRequest interface. - */ -export function instanceOfPatchedPropertyTypeRequest(value: object): boolean { - return true; -} - -export function PatchedPropertyTypeRequestFromJSON(json: any): PatchedPropertyTypeRequest { - return PatchedPropertyTypeRequestFromJSONTyped(json, false); -} - -export function PatchedPropertyTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyTypeRequest { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - 'unit': json['unit'] == null ? undefined : json['unit'], - 'description': json['description'] == null ? undefined : json['description'], - 'order': json['order'] == null ? undefined : json['order'], - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - }; -} - -export function PatchedPropertyTypeRequestToJSON(value?: PatchedPropertyTypeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'id': value['id'], - 'name': value['name'], - 'unit': value['unit'], - 'description': value['description'], - 'order': value['order'], - 'open_data_slug': value['openDataSlug'], - 'fdc_id': value['fdcId'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts b/vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts deleted file mode 100644 index b8e39c6b7..000000000 --- a/vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedRecipeBookEntryRequest - */ -export interface PatchedRecipeBookEntryRequest { - /** - * - * @type {number} - * @memberof PatchedRecipeBookEntryRequest - */ - book?: number; - /** - * - * @type {number} - * @memberof PatchedRecipeBookEntryRequest - */ - recipe?: number; - /** - * - * @type {number} - * @memberof PatchedRecipeBookEntryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedRecipeBookEntryRequest interface. - */ -export function instanceOfPatchedRecipeBookEntryRequest(value: object): boolean { - return true; -} - -export function PatchedRecipeBookEntryRequestFromJSON(json: any): PatchedRecipeBookEntryRequest { - return PatchedRecipeBookEntryRequestFromJSONTyped(json, false); -} - -export function PatchedRecipeBookEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookEntryRequest { - if (json == null) { - return json; - } - return { - - 'book': json['book'] == null ? undefined : json['book'], - 'recipe': json['recipe'] == null ? undefined : json['recipe'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedRecipeBookEntryRequestToJSON(value?: PatchedRecipeBookEntryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'book': value['book'], - 'recipe': value['recipe'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedRecipeBookRequest.ts b/vue3/src/openapi/models/PatchedRecipeBookRequest.ts deleted file mode 100644 index d8bd51c3c..000000000 --- a/vue3/src/openapi/models/PatchedRecipeBookRequest.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { CustomFilterRequest } from './CustomFilterRequest'; -import { - CustomFilterRequestFromJSON, - CustomFilterRequestFromJSONTyped, - CustomFilterRequestToJSON, -} from './CustomFilterRequest'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedRecipeBookRequest - */ -export interface PatchedRecipeBookRequest { - /** - * - * @type {string} - * @memberof PatchedRecipeBookRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedRecipeBookRequest - */ - description?: string; - /** - * - * @type {Array} - * @memberof PatchedRecipeBookRequest - */ - shared?: Array; - /** - * - * @type {CustomFilterRequest} - * @memberof PatchedRecipeBookRequest - */ - filter?: CustomFilterRequest; - /** - * - * @type {number} - * @memberof PatchedRecipeBookRequest - */ - order?: number; - /** - * - * @type {number} - * @memberof PatchedRecipeBookRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedRecipeBookRequest interface. - */ -export function instanceOfPatchedRecipeBookRequest(value: object): boolean { - return true; -} - -export function PatchedRecipeBookRequestFromJSON(json: any): PatchedRecipeBookRequest { - return PatchedRecipeBookRequestFromJSONTyped(json, false); -} - -export function PatchedRecipeBookRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'filter': json['filter'] == null ? undefined : CustomFilterRequestFromJSON(json['filter']), - 'order': json['order'] == null ? undefined : json['order'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedRecipeBookRequestToJSON(value?: PatchedRecipeBookRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'filter': CustomFilterRequestToJSON(value['filter']), - 'order': value['order'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedRecipeRequest.ts b/vue3/src/openapi/models/PatchedRecipeRequest.ts deleted file mode 100644 index 98db0a94c..000000000 --- a/vue3/src/openapi/models/PatchedRecipeRequest.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { KeywordRequest } from './KeywordRequest'; -import { - KeywordRequestFromJSON, - KeywordRequestFromJSONTyped, - KeywordRequestToJSON, -} from './KeywordRequest'; -import type { NutritionInformationRequest } from './NutritionInformationRequest'; -import { - NutritionInformationRequestFromJSON, - NutritionInformationRequestFromJSONTyped, - NutritionInformationRequestToJSON, -} from './NutritionInformationRequest'; -import type { PropertyRequest } from './PropertyRequest'; -import { - PropertyRequestFromJSON, - PropertyRequestFromJSONTyped, - PropertyRequestToJSON, -} from './PropertyRequest'; -import type { StepRequest } from './StepRequest'; -import { - StepRequestFromJSON, - StepRequestFromJSONTyped, - StepRequestToJSON, -} from './StepRequest'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedRecipeRequest - */ -export interface PatchedRecipeRequest { - /** - * - * @type {string} - * @memberof PatchedRecipeRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedRecipeRequest - */ - description?: string; - /** - * - * @type {Array} - * @memberof PatchedRecipeRequest - */ - keywords?: Array; - /** - * - * @type {Array} - * @memberof PatchedRecipeRequest - */ - steps?: Array; - /** - * - * @type {number} - * @memberof PatchedRecipeRequest - */ - workingTime?: number; - /** - * - * @type {number} - * @memberof PatchedRecipeRequest - */ - waitingTime?: number; - /** - * - * @type {string} - * @memberof PatchedRecipeRequest - */ - sourceUrl?: string; - /** - * - * @type {boolean} - * @memberof PatchedRecipeRequest - */ - internal?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedRecipeRequest - */ - showIngredientOverview?: boolean; - /** - * - * @type {NutritionInformationRequest} - * @memberof PatchedRecipeRequest - */ - nutrition?: NutritionInformationRequest; - /** - * - * @type {Array} - * @memberof PatchedRecipeRequest - */ - properties?: Array; - /** - * - * @type {number} - * @memberof PatchedRecipeRequest - */ - servings?: number; - /** - * - * @type {string} - * @memberof PatchedRecipeRequest - */ - filePath?: string; - /** - * - * @type {string} - * @memberof PatchedRecipeRequest - */ - servingsText?: string; - /** - * - * @type {boolean} - * @memberof PatchedRecipeRequest - */ - _private?: boolean; - /** - * - * @type {Array} - * @memberof PatchedRecipeRequest - */ - shared?: Array; - /** - * - * @type {number} - * @memberof PatchedRecipeRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedRecipeRequest interface. - */ -export function instanceOfPatchedRecipeRequest(value: object): boolean { - return true; -} - -export function PatchedRecipeRequestFromJSON(json: any): PatchedRecipeRequest { - return PatchedRecipeRequestFromJSONTyped(json, false); -} - -export function PatchedRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'keywords': json['keywords'] == null ? undefined : ((json['keywords'] as Array).map(KeywordRequestFromJSON)), - 'steps': json['steps'] == null ? undefined : ((json['steps'] as Array).map(StepRequestFromJSON)), - 'workingTime': json['working_time'] == null ? undefined : json['working_time'], - 'waitingTime': json['waiting_time'] == null ? undefined : json['waiting_time'], - 'sourceUrl': json['source_url'] == null ? undefined : json['source_url'], - 'internal': json['internal'] == null ? undefined : json['internal'], - 'showIngredientOverview': json['show_ingredient_overview'] == null ? undefined : json['show_ingredient_overview'], - 'nutrition': json['nutrition'] == null ? undefined : NutritionInformationRequestFromJSON(json['nutrition']), - 'properties': json['properties'] == null ? undefined : ((json['properties'] as Array).map(PropertyRequestFromJSON)), - 'servings': json['servings'] == null ? undefined : json['servings'], - 'filePath': json['file_path'] == null ? undefined : json['file_path'], - 'servingsText': json['servings_text'] == null ? undefined : json['servings_text'], - '_private': json['private'] == null ? undefined : json['private'], - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedRecipeRequestToJSON(value?: PatchedRecipeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array).map(KeywordRequestToJSON)), - 'steps': value['steps'] == null ? undefined : ((value['steps'] as Array).map(StepRequestToJSON)), - 'working_time': value['workingTime'], - 'waiting_time': value['waitingTime'], - 'source_url': value['sourceUrl'], - 'internal': value['internal'], - 'show_ingredient_overview': value['showIngredientOverview'], - 'nutrition': NutritionInformationRequestToJSON(value['nutrition']), - 'properties': value['properties'] == null ? undefined : ((value['properties'] as Array).map(PropertyRequestToJSON)), - 'servings': value['servings'], - 'file_path': value['filePath'], - 'servings_text': value['servingsText'], - 'private': value['_private'], - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts b/vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts deleted file mode 100644 index fd1ec671b..000000000 --- a/vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodRequest } from './FoodRequest'; -import { - FoodRequestFromJSON, - FoodRequestFromJSONTyped, - FoodRequestToJSON, -} from './FoodRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedShoppingListEntryRequest - */ -export interface PatchedShoppingListEntryRequest { - /** - * - * @type {number} - * @memberof PatchedShoppingListEntryRequest - */ - listRecipe?: number; - /** - * - * @type {FoodRequest} - * @memberof PatchedShoppingListEntryRequest - */ - food?: FoodRequest; - /** - * - * @type {UnitRequest} - * @memberof PatchedShoppingListEntryRequest - */ - unit?: UnitRequest; - /** - * - * @type {number} - * @memberof PatchedShoppingListEntryRequest - */ - amount?: number; - /** - * - * @type {number} - * @memberof PatchedShoppingListEntryRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof PatchedShoppingListEntryRequest - */ - checked?: boolean; - /** - * - * @type {Date} - * @memberof PatchedShoppingListEntryRequest - */ - completedAt?: Date; - /** - * - * @type {Date} - * @memberof PatchedShoppingListEntryRequest - */ - delayUntil?: Date; - /** - * - * @type {number} - * @memberof PatchedShoppingListEntryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedShoppingListEntryRequest interface. - */ -export function instanceOfPatchedShoppingListEntryRequest(value: object): boolean { - return true; -} - -export function PatchedShoppingListEntryRequestFromJSON(json: any): PatchedShoppingListEntryRequest { - return PatchedShoppingListEntryRequestFromJSONTyped(json, false); -} - -export function PatchedShoppingListEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListEntryRequest { - if (json == null) { - return json; - } - return { - - 'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'], - 'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']), - 'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']), - 'amount': json['amount'] == null ? undefined : json['amount'], - 'order': json['order'] == null ? undefined : json['order'], - 'checked': json['checked'] == null ? undefined : json['checked'], - 'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])), - 'delayUntil': json['delay_until'] == null ? undefined : (new Date(json['delay_until'])), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedShoppingListEntryRequestToJSON(value?: PatchedShoppingListEntryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'list_recipe': value['listRecipe'], - 'food': FoodRequestToJSON(value['food']), - 'unit': UnitRequestToJSON(value['unit']), - 'amount': value['amount'], - 'order': value['order'], - 'checked': value['checked'], - 'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()), - 'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts b/vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts deleted file mode 100644 index af0fea2d8..000000000 --- a/vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedShoppingListRecipeRequest - */ -export interface PatchedShoppingListRecipeRequest { - /** - * - * @type {number} - * @memberof PatchedShoppingListRecipeRequest - */ - recipe?: number; - /** - * - * @type {number} - * @memberof PatchedShoppingListRecipeRequest - */ - mealplan?: number; - /** - * - * @type {number} - * @memberof PatchedShoppingListRecipeRequest - */ - servings?: number; - /** - * - * @type {number} - * @memberof PatchedShoppingListRecipeRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedShoppingListRecipeRequest interface. - */ -export function instanceOfPatchedShoppingListRecipeRequest(value: object): boolean { - return true; -} - -export function PatchedShoppingListRecipeRequestFromJSON(json: any): PatchedShoppingListRecipeRequest { - return PatchedShoppingListRecipeRequestFromJSONTyped(json, false); -} - -export function PatchedShoppingListRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListRecipeRequest { - if (json == null) { - return json; - } - return { - - 'recipe': json['recipe'] == null ? undefined : json['recipe'], - 'mealplan': json['mealplan'] == null ? undefined : json['mealplan'], - 'servings': json['servings'] == null ? undefined : json['servings'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedShoppingListRecipeRequestToJSON(value?: PatchedShoppingListRecipeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'recipe': value['recipe'], - 'mealplan': value['mealplan'], - 'servings': value['servings'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedSpaceRequest.ts b/vue3/src/openapi/models/PatchedSpaceRequest.ts deleted file mode 100644 index fd6410905..000000000 --- a/vue3/src/openapi/models/PatchedSpaceRequest.ts +++ /dev/null @@ -1,213 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodInheritFieldRequest } from './FoodInheritFieldRequest'; -import { - FoodInheritFieldRequestFromJSON, - FoodInheritFieldRequestFromJSONTyped, - FoodInheritFieldRequestToJSON, -} from './FoodInheritFieldRequest'; -import type { SpaceNavTextColorEnum } from './SpaceNavTextColorEnum'; -import { - SpaceNavTextColorEnumFromJSON, - SpaceNavTextColorEnumFromJSONTyped, - SpaceNavTextColorEnumToJSON, -} from './SpaceNavTextColorEnum'; -import type { SpaceThemeEnum } from './SpaceThemeEnum'; -import { - SpaceThemeEnumFromJSON, - SpaceThemeEnumFromJSONTyped, - SpaceThemeEnumToJSON, -} from './SpaceThemeEnum'; -import type { UserFileViewRequest } from './UserFileViewRequest'; -import { - UserFileViewRequestFromJSON, - UserFileViewRequestFromJSONTyped, - UserFileViewRequestToJSON, -} from './UserFileViewRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedSpaceRequest - */ -export interface PatchedSpaceRequest { - /** - * - * @type {string} - * @memberof PatchedSpaceRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedSpaceRequest - */ - message?: string; - /** - * - * @type {Array} - * @memberof PatchedSpaceRequest - */ - foodInherit?: Array; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - image?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - navLogo?: UserFileViewRequest; - /** - * - * @type {SpaceThemeEnum} - * @memberof PatchedSpaceRequest - */ - spaceTheme?: SpaceThemeEnum; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - customSpaceTheme?: UserFileViewRequest; - /** - * - * @type {string} - * @memberof PatchedSpaceRequest - */ - navBgColor?: string; - /** - * - * @type {SpaceNavTextColorEnum} - * @memberof PatchedSpaceRequest - */ - navTextColor?: SpaceNavTextColorEnum; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColor32?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColor128?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColor144?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColor180?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColor192?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColor512?: UserFileViewRequest; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedSpaceRequest - */ - logoColorSvg?: UserFileViewRequest; - /** - * - * @type {number} - * @memberof PatchedSpaceRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedSpaceRequest interface. - */ -export function instanceOfPatchedSpaceRequest(value: object): boolean { - return true; -} - -export function PatchedSpaceRequestFromJSON(json: any): PatchedSpaceRequest { - return PatchedSpaceRequestFromJSONTyped(json, false); -} - -export function PatchedSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSpaceRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'message': json['message'] == null ? undefined : json['message'], - 'foodInherit': json['food_inherit'] == null ? undefined : ((json['food_inherit'] as Array).map(FoodInheritFieldRequestFromJSON)), - 'image': json['image'] == null ? undefined : UserFileViewRequestFromJSON(json['image']), - 'navLogo': json['nav_logo'] == null ? undefined : UserFileViewRequestFromJSON(json['nav_logo']), - 'spaceTheme': json['space_theme'] == null ? undefined : SpaceThemeEnumFromJSON(json['space_theme']), - 'customSpaceTheme': json['custom_space_theme'] == null ? undefined : UserFileViewRequestFromJSON(json['custom_space_theme']), - 'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'], - 'navTextColor': json['nav_text_color'] == null ? undefined : SpaceNavTextColorEnumFromJSON(json['nav_text_color']), - 'logoColor32': json['logo_color_32'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_32']), - 'logoColor128': json['logo_color_128'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_128']), - 'logoColor144': json['logo_color_144'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_144']), - 'logoColor180': json['logo_color_180'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_180']), - 'logoColor192': json['logo_color_192'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_192']), - 'logoColor512': json['logo_color_512'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_512']), - 'logoColorSvg': json['logo_color_svg'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_svg']), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedSpaceRequestToJSON(value?: PatchedSpaceRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'message': value['message'], - 'food_inherit': value['foodInherit'] == null ? undefined : ((value['foodInherit'] as Array).map(FoodInheritFieldRequestToJSON)), - 'image': UserFileViewRequestToJSON(value['image']), - 'nav_logo': UserFileViewRequestToJSON(value['navLogo']), - 'space_theme': SpaceThemeEnumToJSON(value['spaceTheme']), - 'custom_space_theme': UserFileViewRequestToJSON(value['customSpaceTheme']), - 'nav_bg_color': value['navBgColor'], - 'nav_text_color': SpaceNavTextColorEnumToJSON(value['navTextColor']), - 'logo_color_32': UserFileViewRequestToJSON(value['logoColor32']), - 'logo_color_128': UserFileViewRequestToJSON(value['logoColor128']), - 'logo_color_144': UserFileViewRequestToJSON(value['logoColor144']), - 'logo_color_180': UserFileViewRequestToJSON(value['logoColor180']), - 'logo_color_192': UserFileViewRequestToJSON(value['logoColor192']), - 'logo_color_512': UserFileViewRequestToJSON(value['logoColor512']), - 'logo_color_svg': UserFileViewRequestToJSON(value['logoColorSvg']), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedStepRequest.ts b/vue3/src/openapi/models/PatchedStepRequest.ts deleted file mode 100644 index 9af5fd3f1..000000000 --- a/vue3/src/openapi/models/PatchedStepRequest.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { IngredientRequest } from './IngredientRequest'; -import { - IngredientRequestFromJSON, - IngredientRequestFromJSONTyped, - IngredientRequestToJSON, -} from './IngredientRequest'; -import type { UserFileViewRequest } from './UserFileViewRequest'; -import { - UserFileViewRequestFromJSON, - UserFileViewRequestFromJSONTyped, - UserFileViewRequestToJSON, -} from './UserFileViewRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedStepRequest - */ -export interface PatchedStepRequest { - /** - * - * @type {string} - * @memberof PatchedStepRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedStepRequest - */ - instruction?: string; - /** - * - * @type {Array} - * @memberof PatchedStepRequest - */ - ingredients?: Array; - /** - * - * @type {number} - * @memberof PatchedStepRequest - */ - time?: number; - /** - * - * @type {number} - * @memberof PatchedStepRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof PatchedStepRequest - */ - showAsHeader?: boolean; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedStepRequest - */ - file?: UserFileViewRequest; - /** - * - * @type {number} - * @memberof PatchedStepRequest - */ - stepRecipe?: number; - /** - * - * @type {boolean} - * @memberof PatchedStepRequest - */ - showIngredientsTable?: boolean; - /** - * - * @type {number} - * @memberof PatchedStepRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedStepRequest interface. - */ -export function instanceOfPatchedStepRequest(value: object): boolean { - return true; -} - -export function PatchedStepRequestFromJSON(json: any): PatchedStepRequest { - return PatchedStepRequestFromJSONTyped(json, false); -} - -export function PatchedStepRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStepRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'instruction': json['instruction'] == null ? undefined : json['instruction'], - 'ingredients': json['ingredients'] == null ? undefined : ((json['ingredients'] as Array).map(IngredientRequestFromJSON)), - 'time': json['time'] == null ? undefined : json['time'], - 'order': json['order'] == null ? undefined : json['order'], - 'showAsHeader': json['show_as_header'] == null ? undefined : json['show_as_header'], - 'file': json['file'] == null ? undefined : UserFileViewRequestFromJSON(json['file']), - 'stepRecipe': json['step_recipe'] == null ? undefined : json['step_recipe'], - 'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedStepRequestToJSON(value?: PatchedStepRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'instruction': value['instruction'], - 'ingredients': value['ingredients'] == null ? undefined : ((value['ingredients'] as Array).map(IngredientRequestToJSON)), - 'time': value['time'], - 'order': value['order'], - 'show_as_header': value['showAsHeader'], - 'file': UserFileViewRequestToJSON(value['file']), - 'step_recipe': value['stepRecipe'], - 'show_ingredients_table': value['showIngredientsTable'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedStorageRequest.ts b/vue3/src/openapi/models/PatchedStorageRequest.ts deleted file mode 100644 index bd9d55947..000000000 --- a/vue3/src/openapi/models/PatchedStorageRequest.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { MethodEnum } from './MethodEnum'; -import { - MethodEnumFromJSON, - MethodEnumFromJSONTyped, - MethodEnumToJSON, -} from './MethodEnum'; - -/** - * - * @export - * @interface PatchedStorageRequest - */ -export interface PatchedStorageRequest { - /** - * - * @type {string} - * @memberof PatchedStorageRequest - */ - name?: string; - /** - * - * @type {MethodEnum} - * @memberof PatchedStorageRequest - */ - method?: MethodEnum; - /** - * - * @type {string} - * @memberof PatchedStorageRequest - */ - username?: string; - /** - * - * @type {string} - * @memberof PatchedStorageRequest - */ - password?: string; - /** - * - * @type {string} - * @memberof PatchedStorageRequest - */ - token?: string; - /** - * - * @type {number} - * @memberof PatchedStorageRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedStorageRequest interface. - */ -export function instanceOfPatchedStorageRequest(value: object): boolean { - return true; -} - -export function PatchedStorageRequestFromJSON(json: any): PatchedStorageRequest { - return PatchedStorageRequestFromJSONTyped(json, false); -} - -export function PatchedStorageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStorageRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'method': json['method'] == null ? undefined : MethodEnumFromJSON(json['method']), - 'username': json['username'] == null ? undefined : json['username'], - 'password': json['password'] == null ? undefined : json['password'], - 'token': json['token'] == null ? undefined : json['token'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedStorageRequestToJSON(value?: PatchedStorageRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'method': MethodEnumToJSON(value['method']), - 'username': value['username'], - 'password': value['password'], - 'token': value['token'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedSupermarketCategoryRelationRequest.ts b/vue3/src/openapi/models/PatchedSupermarketCategoryRelationRequest.ts deleted file mode 100644 index a0fb4e6c9..000000000 --- a/vue3/src/openapi/models/PatchedSupermarketCategoryRelationRequest.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest'; -import { - SupermarketCategoryRequestFromJSON, - SupermarketCategoryRequestFromJSONTyped, - SupermarketCategoryRequestToJSON, -} from './SupermarketCategoryRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedSupermarketCategoryRelationRequest - */ -export interface PatchedSupermarketCategoryRelationRequest { - /** - * - * @type {SupermarketCategoryRequest} - * @memberof PatchedSupermarketCategoryRelationRequest - */ - category?: SupermarketCategoryRequest; - /** - * - * @type {number} - * @memberof PatchedSupermarketCategoryRelationRequest - */ - supermarket?: number; - /** - * - * @type {number} - * @memberof PatchedSupermarketCategoryRelationRequest - */ - order?: number; - /** - * - * @type {number} - * @memberof PatchedSupermarketCategoryRelationRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedSupermarketCategoryRelationRequest interface. - */ -export function instanceOfPatchedSupermarketCategoryRelationRequest(value: object): boolean { - return true; -} - -export function PatchedSupermarketCategoryRelationRequestFromJSON(json: any): PatchedSupermarketCategoryRelationRequest { - return PatchedSupermarketCategoryRelationRequestFromJSONTyped(json, false); -} - -export function PatchedSupermarketCategoryRelationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRelationRequest { - if (json == null) { - return json; - } - return { - - 'category': json['category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['category']), - 'supermarket': json['supermarket'] == null ? undefined : json['supermarket'], - 'order': json['order'] == null ? undefined : json['order'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedSupermarketCategoryRelationRequestToJSON(value?: PatchedSupermarketCategoryRelationRequest | null): any { - if (value == null) { - return value; - } - return { - - 'category': SupermarketCategoryRequestToJSON(value['category']), - 'supermarket': value['supermarket'], - 'order': value['order'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts b/vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts deleted file mode 100644 index ff02abfea..000000000 --- a/vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedSupermarketCategoryRequest - */ -export interface PatchedSupermarketCategoryRequest { - /** - * - * @type {string} - * @memberof PatchedSupermarketCategoryRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedSupermarketCategoryRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof PatchedSupermarketCategoryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedSupermarketCategoryRequest interface. - */ -export function instanceOfPatchedSupermarketCategoryRequest(value: object): boolean { - return true; -} - -export function PatchedSupermarketCategoryRequestFromJSON(json: any): PatchedSupermarketCategoryRequest { - return PatchedSupermarketCategoryRequestFromJSONTyped(json, false); -} - -export function PatchedSupermarketCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedSupermarketCategoryRequestToJSON(value?: PatchedSupermarketCategoryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedSupermarketRequest.ts b/vue3/src/openapi/models/PatchedSupermarketRequest.ts deleted file mode 100644 index fc3f0eaef..000000000 --- a/vue3/src/openapi/models/PatchedSupermarketRequest.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedSupermarketRequest - */ -export interface PatchedSupermarketRequest { - /** - * - * @type {string} - * @memberof PatchedSupermarketRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedSupermarketRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof PatchedSupermarketRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof PatchedSupermarketRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedSupermarketRequest interface. - */ -export function instanceOfPatchedSupermarketRequest(value: object): boolean { - return true; -} - -export function PatchedSupermarketRequestFromJSON(json: any): PatchedSupermarketRequest { - return PatchedSupermarketRequestFromJSONTyped(json, false); -} - -export function PatchedSupermarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedSupermarketRequestToJSON(value?: PatchedSupermarketRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedSyncRequest.ts b/vue3/src/openapi/models/PatchedSyncRequest.ts deleted file mode 100644 index 06d972eec..000000000 --- a/vue3/src/openapi/models/PatchedSyncRequest.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedSyncRequest - */ -export interface PatchedSyncRequest { - /** - * - * @type {number} - * @memberof PatchedSyncRequest - */ - storage?: number; - /** - * - * @type {string} - * @memberof PatchedSyncRequest - */ - path?: string; - /** - * - * @type {boolean} - * @memberof PatchedSyncRequest - */ - active?: boolean; - /** - * - * @type {Date} - * @memberof PatchedSyncRequest - */ - lastChecked?: Date; - /** - * - * @type {number} - * @memberof PatchedSyncRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedSyncRequest interface. - */ -export function instanceOfPatchedSyncRequest(value: object): boolean { - return true; -} - -export function PatchedSyncRequestFromJSON(json: any): PatchedSyncRequest { - return PatchedSyncRequestFromJSONTyped(json, false); -} - -export function PatchedSyncRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSyncRequest { - if (json == null) { - return json; - } - return { - - 'storage': json['storage'] == null ? undefined : json['storage'], - 'path': json['path'] == null ? undefined : json['path'], - 'active': json['active'] == null ? undefined : json['active'], - 'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedSyncRequestToJSON(value?: PatchedSyncRequest | null): any { - if (value == null) { - return value; - } - return { - - 'storage': value['storage'], - 'path': value['path'], - 'active': value['active'], - 'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedUnitConversionRequest.ts b/vue3/src/openapi/models/PatchedUnitConversionRequest.ts deleted file mode 100644 index 35cb095ee..000000000 --- a/vue3/src/openapi/models/PatchedUnitConversionRequest.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodRequest } from './FoodRequest'; -import { - FoodRequestFromJSON, - FoodRequestFromJSONTyped, - FoodRequestToJSON, -} from './FoodRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedUnitConversionRequest - */ -export interface PatchedUnitConversionRequest { - /** - * - * @type {number} - * @memberof PatchedUnitConversionRequest - */ - baseAmount?: number; - /** - * - * @type {UnitRequest} - * @memberof PatchedUnitConversionRequest - */ - baseUnit?: UnitRequest; - /** - * - * @type {number} - * @memberof PatchedUnitConversionRequest - */ - convertedAmount?: number; - /** - * - * @type {UnitRequest} - * @memberof PatchedUnitConversionRequest - */ - convertedUnit?: UnitRequest; - /** - * - * @type {FoodRequest} - * @memberof PatchedUnitConversionRequest - */ - food?: FoodRequest; - /** - * - * @type {string} - * @memberof PatchedUnitConversionRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof PatchedUnitConversionRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedUnitConversionRequest interface. - */ -export function instanceOfPatchedUnitConversionRequest(value: object): boolean { - return true; -} - -export function PatchedUnitConversionRequestFromJSON(json: any): PatchedUnitConversionRequest { - return PatchedUnitConversionRequestFromJSONTyped(json, false); -} - -export function PatchedUnitConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitConversionRequest { - if (json == null) { - return json; - } - return { - - 'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'], - 'baseUnit': json['base_unit'] == null ? undefined : UnitRequestFromJSON(json['base_unit']), - 'convertedAmount': json['converted_amount'] == null ? undefined : json['converted_amount'], - 'convertedUnit': json['converted_unit'] == null ? undefined : UnitRequestFromJSON(json['converted_unit']), - 'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']), - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedUnitConversionRequestToJSON(value?: PatchedUnitConversionRequest | null): any { - if (value == null) { - return value; - } - return { - - 'base_amount': value['baseAmount'], - 'base_unit': UnitRequestToJSON(value['baseUnit']), - 'converted_amount': value['convertedAmount'], - 'converted_unit': UnitRequestToJSON(value['convertedUnit']), - 'food': FoodRequestToJSON(value['food']), - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedUnitRequest.ts b/vue3/src/openapi/models/PatchedUnitRequest.ts deleted file mode 100644 index 850758e57..000000000 --- a/vue3/src/openapi/models/PatchedUnitRequest.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PatchedUnitRequest - */ -export interface PatchedUnitRequest { - /** - * - * @type {string} - * @memberof PatchedUnitRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof PatchedUnitRequest - */ - pluralName?: string; - /** - * - * @type {string} - * @memberof PatchedUnitRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof PatchedUnitRequest - */ - baseUnit?: string; - /** - * - * @type {string} - * @memberof PatchedUnitRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof PatchedUnitRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedUnitRequest interface. - */ -export function instanceOfPatchedUnitRequest(value: object): boolean { - return true; -} - -export function PatchedUnitRequestFromJSON(json: any): PatchedUnitRequest { - return PatchedUnitRequestFromJSONTyped(json, false); -} - -export function PatchedUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'description': json['description'] == null ? undefined : json['description'], - 'baseUnit': json['base_unit'] == null ? undefined : json['base_unit'], - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedUnitRequestToJSON(value?: PatchedUnitRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'plural_name': value['pluralName'], - 'description': value['description'], - 'base_unit': value['baseUnit'], - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedUserPreferenceRequest.ts b/vue3/src/openapi/models/PatchedUserPreferenceRequest.ts deleted file mode 100644 index 27fe76010..000000000 --- a/vue3/src/openapi/models/PatchedUserPreferenceRequest.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { DefaultPageEnum } from './DefaultPageEnum'; -import { - DefaultPageEnumFromJSON, - DefaultPageEnumFromJSONTyped, - DefaultPageEnumToJSON, -} from './DefaultPageEnum'; -import type { ThemeEnum } from './ThemeEnum'; -import { - ThemeEnumFromJSON, - ThemeEnumFromJSONTyped, - ThemeEnumToJSON, -} from './ThemeEnum'; -import type { UserFileViewRequest } from './UserFileViewRequest'; -import { - UserFileViewRequestFromJSON, - UserFileViewRequestFromJSONTyped, - UserFileViewRequestToJSON, -} from './UserFileViewRequest'; -import type { UserPreferenceNavTextColorEnum } from './UserPreferenceNavTextColorEnum'; -import { - UserPreferenceNavTextColorEnumFromJSON, - UserPreferenceNavTextColorEnumFromJSONTyped, - UserPreferenceNavTextColorEnumToJSON, -} from './UserPreferenceNavTextColorEnum'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedUserPreferenceRequest - */ -export interface PatchedUserPreferenceRequest { - /** - * - * @type {number} - * @memberof PatchedUserPreferenceRequest - */ - user?: number; - /** - * - * @type {UserFileViewRequest} - * @memberof PatchedUserPreferenceRequest - */ - image?: UserFileViewRequest; - /** - * - * @type {ThemeEnum} - * @memberof PatchedUserPreferenceRequest - */ - theme?: ThemeEnum; - /** - * - * @type {string} - * @memberof PatchedUserPreferenceRequest - */ - navBgColor?: string; - /** - * - * @type {UserPreferenceNavTextColorEnum} - * @memberof PatchedUserPreferenceRequest - */ - navTextColor?: UserPreferenceNavTextColorEnum; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - navShowLogo?: boolean; - /** - * - * @type {string} - * @memberof PatchedUserPreferenceRequest - */ - defaultUnit?: string; - /** - * - * @type {DefaultPageEnum} - * @memberof PatchedUserPreferenceRequest - */ - defaultPage?: DefaultPageEnum; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - useFractions?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - useKj?: boolean; - /** - * - * @type {Array} - * @memberof PatchedUserPreferenceRequest - */ - planShare?: Array; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - navSticky?: boolean; - /** - * - * @type {number} - * @memberof PatchedUserPreferenceRequest - */ - ingredientDecimals?: number; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - comments?: boolean; - /** - * - * @type {number} - * @memberof PatchedUserPreferenceRequest - */ - shoppingAutoSync?: number; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - mealplanAutoaddShopping?: boolean; - /** - * - * @type {number} - * @memberof PatchedUserPreferenceRequest - */ - defaultDelay?: number; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - mealplanAutoincludeRelated?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - mealplanAutoexcludeOnhand?: boolean; - /** - * - * @type {Array} - * @memberof PatchedUserPreferenceRequest - */ - shoppingShare?: Array; - /** - * - * @type {number} - * @memberof PatchedUserPreferenceRequest - */ - shoppingRecentDays?: number; - /** - * - * @type {string} - * @memberof PatchedUserPreferenceRequest - */ - csvDelim?: string; - /** - * - * @type {string} - * @memberof PatchedUserPreferenceRequest - */ - csvPrefix?: string; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - filterToSupermarket?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - shoppingAddOnhand?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - leftHanded?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedUserPreferenceRequest - */ - showStepIngredients?: boolean; -} - -/** - * Check if a given object implements the PatchedUserPreferenceRequest interface. - */ -export function instanceOfPatchedUserPreferenceRequest(value: object): boolean { - return true; -} - -export function PatchedUserPreferenceRequestFromJSON(json: any): PatchedUserPreferenceRequest { - return PatchedUserPreferenceRequestFromJSONTyped(json, false); -} - -export function PatchedUserPreferenceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserPreferenceRequest { - if (json == null) { - return json; - } - return { - - 'user': json['user'] == null ? undefined : json['user'], - 'image': json['image'] == null ? undefined : UserFileViewRequestFromJSON(json['image']), - 'theme': json['theme'] == null ? undefined : ThemeEnumFromJSON(json['theme']), - 'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'], - 'navTextColor': json['nav_text_color'] == null ? undefined : UserPreferenceNavTextColorEnumFromJSON(json['nav_text_color']), - 'navShowLogo': json['nav_show_logo'] == null ? undefined : json['nav_show_logo'], - 'defaultUnit': json['default_unit'] == null ? undefined : json['default_unit'], - 'defaultPage': json['default_page'] == null ? undefined : DefaultPageEnumFromJSON(json['default_page']), - 'useFractions': json['use_fractions'] == null ? undefined : json['use_fractions'], - 'useKj': json['use_kj'] == null ? undefined : json['use_kj'], - 'planShare': json['plan_share'] == null ? undefined : ((json['plan_share'] as Array).map(UserRequestFromJSON)), - 'navSticky': json['nav_sticky'] == null ? undefined : json['nav_sticky'], - 'ingredientDecimals': json['ingredient_decimals'] == null ? undefined : json['ingredient_decimals'], - 'comments': json['comments'] == null ? undefined : json['comments'], - 'shoppingAutoSync': json['shopping_auto_sync'] == null ? undefined : json['shopping_auto_sync'], - 'mealplanAutoaddShopping': json['mealplan_autoadd_shopping'] == null ? undefined : json['mealplan_autoadd_shopping'], - 'defaultDelay': json['default_delay'] == null ? undefined : json['default_delay'], - 'mealplanAutoincludeRelated': json['mealplan_autoinclude_related'] == null ? undefined : json['mealplan_autoinclude_related'], - 'mealplanAutoexcludeOnhand': json['mealplan_autoexclude_onhand'] == null ? undefined : json['mealplan_autoexclude_onhand'], - 'shoppingShare': json['shopping_share'] == null ? undefined : ((json['shopping_share'] as Array).map(UserRequestFromJSON)), - 'shoppingRecentDays': json['shopping_recent_days'] == null ? undefined : json['shopping_recent_days'], - 'csvDelim': json['csv_delim'] == null ? undefined : json['csv_delim'], - 'csvPrefix': json['csv_prefix'] == null ? undefined : json['csv_prefix'], - 'filterToSupermarket': json['filter_to_supermarket'] == null ? undefined : json['filter_to_supermarket'], - 'shoppingAddOnhand': json['shopping_add_onhand'] == null ? undefined : json['shopping_add_onhand'], - 'leftHanded': json['left_handed'] == null ? undefined : json['left_handed'], - 'showStepIngredients': json['show_step_ingredients'] == null ? undefined : json['show_step_ingredients'], - }; -} - -export function PatchedUserPreferenceRequestToJSON(value?: PatchedUserPreferenceRequest | null): any { - if (value == null) { - return value; - } - return { - - 'user': value['user'], - 'image': UserFileViewRequestToJSON(value['image']), - 'theme': ThemeEnumToJSON(value['theme']), - 'nav_bg_color': value['navBgColor'], - 'nav_text_color': UserPreferenceNavTextColorEnumToJSON(value['navTextColor']), - 'nav_show_logo': value['navShowLogo'], - 'default_unit': value['defaultUnit'], - 'default_page': DefaultPageEnumToJSON(value['defaultPage']), - 'use_fractions': value['useFractions'], - 'use_kj': value['useKj'], - 'plan_share': value['planShare'] == null ? undefined : ((value['planShare'] as Array).map(UserRequestToJSON)), - 'nav_sticky': value['navSticky'], - 'ingredient_decimals': value['ingredientDecimals'], - 'comments': value['comments'], - 'shopping_auto_sync': value['shoppingAutoSync'], - 'mealplan_autoadd_shopping': value['mealplanAutoaddShopping'], - 'default_delay': value['defaultDelay'], - 'mealplan_autoinclude_related': value['mealplanAutoincludeRelated'], - 'mealplan_autoexclude_onhand': value['mealplanAutoexcludeOnhand'], - 'shopping_share': value['shoppingShare'] == null ? undefined : ((value['shoppingShare'] as Array).map(UserRequestToJSON)), - 'shopping_recent_days': value['shoppingRecentDays'], - 'csv_delim': value['csvDelim'], - 'csv_prefix': value['csvPrefix'], - 'filter_to_supermarket': value['filterToSupermarket'], - 'shopping_add_onhand': value['shoppingAddOnhand'], - 'left_handed': value['leftHanded'], - 'show_step_ingredients': value['showStepIngredients'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedUserRequest.ts b/vue3/src/openapi/models/PatchedUserRequest.ts deleted file mode 100644 index 56d1dd9f9..000000000 --- a/vue3/src/openapi/models/PatchedUserRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface PatchedUserRequest - */ -export interface PatchedUserRequest { - /** - * - * @type {string} - * @memberof PatchedUserRequest - */ - firstName?: string; - /** - * - * @type {string} - * @memberof PatchedUserRequest - */ - lastName?: string; - /** - * - * @type {number} - * @memberof PatchedUserRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedUserRequest interface. - */ -export function instanceOfPatchedUserRequest(value: object): boolean { - return true; -} - -export function PatchedUserRequestFromJSON(json: any): PatchedUserRequest { - return PatchedUserRequestFromJSONTyped(json, false); -} - -export function PatchedUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserRequest { - if (json == null) { - return json; - } - return { - - 'firstName': json['first_name'] == null ? undefined : json['first_name'], - 'lastName': json['last_name'] == null ? undefined : json['last_name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedUserRequestToJSON(value?: PatchedUserRequest | null): any { - if (value == null) { - return value; - } - return { - - 'first_name': value['firstName'], - 'last_name': value['lastName'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedUserSpaceRequest.ts b/vue3/src/openapi/models/PatchedUserSpaceRequest.ts deleted file mode 100644 index 5dc8f1d70..000000000 --- a/vue3/src/openapi/models/PatchedUserSpaceRequest.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { GroupRequest } from './GroupRequest'; -import { - GroupRequestFromJSON, - GroupRequestFromJSONTyped, - GroupRequestToJSON, -} from './GroupRequest'; - -/** - * Adds nested create feature - * @export - * @interface PatchedUserSpaceRequest - */ -export interface PatchedUserSpaceRequest { - /** - * - * @type {Array} - * @memberof PatchedUserSpaceRequest - */ - groups?: Array; - /** - * - * @type {boolean} - * @memberof PatchedUserSpaceRequest - */ - active?: boolean; - /** - * - * @type {string} - * @memberof PatchedUserSpaceRequest - */ - internalNote?: string; - /** - * - * @type {number} - * @memberof PatchedUserSpaceRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedUserSpaceRequest interface. - */ -export function instanceOfPatchedUserSpaceRequest(value: object): boolean { - return true; -} - -export function PatchedUserSpaceRequestFromJSON(json: any): PatchedUserSpaceRequest { - return PatchedUserSpaceRequestFromJSONTyped(json, false); -} - -export function PatchedUserSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSpaceRequest { - if (json == null) { - return json; - } - return { - - 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(GroupRequestFromJSON)), - 'active': json['active'] == null ? undefined : json['active'], - 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedUserSpaceRequestToJSON(value?: PatchedUserSpaceRequest | null): any { - if (value == null) { - return value; - } - return { - - 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(GroupRequestToJSON)), - 'active': value['active'], - 'internal_note': value['internalNote'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PatchedViewLogRequest.ts b/vue3/src/openapi/models/PatchedViewLogRequest.ts deleted file mode 100644 index 8af87424d..000000000 --- a/vue3/src/openapi/models/PatchedViewLogRequest.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PatchedViewLogRequest - */ -export interface PatchedViewLogRequest { - /** - * - * @type {number} - * @memberof PatchedViewLogRequest - */ - recipe?: number; - /** - * - * @type {number} - * @memberof PatchedViewLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PatchedViewLogRequest interface. - */ -export function instanceOfPatchedViewLogRequest(value: object): boolean { - return true; -} - -export function PatchedViewLogRequestFromJSON(json: any): PatchedViewLogRequest { - return PatchedViewLogRequestFromJSONTyped(json, false); -} - -export function PatchedViewLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedViewLogRequest { - if (json == null) { - return json; - } - return { - - 'recipe': json['recipe'] == null ? undefined : json['recipe'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PatchedViewLogRequestToJSON(value?: PatchedViewLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'recipe': value['recipe'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PropertyRequest.ts b/vue3/src/openapi/models/PropertyRequest.ts deleted file mode 100644 index d0ecef45a..000000000 --- a/vue3/src/openapi/models/PropertyRequest.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { PropertyTypeRequest } from './PropertyTypeRequest'; -import { - PropertyTypeRequestFromJSON, - PropertyTypeRequestFromJSONTyped, - PropertyTypeRequestToJSON, -} from './PropertyTypeRequest'; - -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface PropertyRequest - */ -export interface PropertyRequest { - /** - * - * @type {number} - * @memberof PropertyRequest - */ - propertyAmount: number | null; - /** - * - * @type {PropertyTypeRequest} - * @memberof PropertyRequest - */ - propertyType: PropertyTypeRequest; - /** - * - * @type {number} - * @memberof PropertyRequest - */ - id?: number; -} - -/** - * Check if a given object implements the PropertyRequest interface. - */ -export function instanceOfPropertyRequest(value: object): boolean { - if (!('propertyAmount' in value)) return false; - if (!('propertyType' in value)) return false; - return true; -} - -export function PropertyRequestFromJSON(json: any): PropertyRequest { - return PropertyRequestFromJSONTyped(json, false); -} - -export function PropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyRequest { - if (json == null) { - return json; - } - return { - - 'propertyAmount': json['property_amount'], - 'propertyType': PropertyTypeRequestFromJSON(json['property_type']), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function PropertyRequestToJSON(value?: PropertyRequest | null): any { - if (value == null) { - return value; - } - return { - - 'property_amount': value['propertyAmount'], - 'property_type': PropertyTypeRequestToJSON(value['propertyType']), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/PropertyTypeRequest.ts b/vue3/src/openapi/models/PropertyTypeRequest.ts deleted file mode 100644 index c5ec663b3..000000000 --- a/vue3/src/openapi/models/PropertyTypeRequest.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface PropertyTypeRequest - */ -export interface PropertyTypeRequest { - /** - * - * @type {number} - * @memberof PropertyTypeRequest - */ - id?: number; - /** - * - * @type {string} - * @memberof PropertyTypeRequest - */ - name: string; - /** - * - * @type {string} - * @memberof PropertyTypeRequest - */ - unit?: string; - /** - * - * @type {string} - * @memberof PropertyTypeRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof PropertyTypeRequest - */ - order?: number; - /** - * - * @type {string} - * @memberof PropertyTypeRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof PropertyTypeRequest - */ - fdcId?: number; -} - -/** - * Check if a given object implements the PropertyTypeRequest interface. - */ -export function instanceOfPropertyTypeRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function PropertyTypeRequestFromJSON(json: any): PropertyTypeRequest { - return PropertyTypeRequestFromJSONTyped(json, false); -} - -export function PropertyTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyTypeRequest { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'], - 'unit': json['unit'] == null ? undefined : json['unit'], - 'description': json['description'] == null ? undefined : json['description'], - 'order': json['order'] == null ? undefined : json['order'], - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], - }; -} - -export function PropertyTypeRequestToJSON(value?: PropertyTypeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'id': value['id'], - 'name': value['name'], - 'unit': value['unit'], - 'description': value['description'], - 'order': value['order'], - 'open_data_slug': value['openDataSlug'], - 'fdc_id': value['fdcId'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeBookEntryRequest.ts b/vue3/src/openapi/models/RecipeBookEntryRequest.ts deleted file mode 100644 index 6bc5f09dd..000000000 --- a/vue3/src/openapi/models/RecipeBookEntryRequest.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RecipeBookEntryRequest - */ -export interface RecipeBookEntryRequest { - /** - * - * @type {number} - * @memberof RecipeBookEntryRequest - */ - book: number; - /** - * - * @type {number} - * @memberof RecipeBookEntryRequest - */ - recipe: number; - /** - * - * @type {number} - * @memberof RecipeBookEntryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the RecipeBookEntryRequest interface. - */ -export function instanceOfRecipeBookEntryRequest(value: object): boolean { - if (!('book' in value)) return false; - if (!('recipe' in value)) return false; - return true; -} - -export function RecipeBookEntryRequestFromJSON(json: any): RecipeBookEntryRequest { - return RecipeBookEntryRequestFromJSONTyped(json, false); -} - -export function RecipeBookEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBookEntryRequest { - if (json == null) { - return json; - } - return { - - 'book': json['book'], - 'recipe': json['recipe'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function RecipeBookEntryRequestToJSON(value?: RecipeBookEntryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'book': value['book'], - 'recipe': value['recipe'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeBookFilter.ts b/vue3/src/openapi/models/RecipeBookFilter.ts deleted file mode 100644 index 20f41f324..000000000 --- a/vue3/src/openapi/models/RecipeBookFilter.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CustomFilterSharedInner } from './CustomFilterSharedInner'; -import { - CustomFilterSharedInnerFromJSON, - CustomFilterSharedInnerFromJSONTyped, - CustomFilterSharedInnerToJSON, -} from './CustomFilterSharedInner'; - -/** - * - * @export - * @interface RecipeBookFilter - */ -export interface RecipeBookFilter { - /** - * - * @type {number} - * @memberof RecipeBookFilter - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof RecipeBookFilter - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeBookFilter - */ - search: string; - /** - * - * @type {Array} - * @memberof RecipeBookFilter - */ - shared?: Array; - /** - * - * @type {string} - * @memberof RecipeBookFilter - */ - readonly createdBy?: string; -} - -/** - * Check if a given object implements the RecipeBookFilter interface. - */ -export function instanceOfRecipeBookFilter(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "search" in value; - - return isInstance; -} - -export function RecipeBookFilterFromJSON(json: any): RecipeBookFilter { - return RecipeBookFilterFromJSONTyped(json, false); -} - -export function RecipeBookFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBookFilter { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'search': json['search'], - 'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array).map(CustomFilterSharedInnerFromJSON)), - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - }; -} - -export function RecipeBookFilterToJSON(value?: RecipeBookFilter | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'search': value.search, - 'shared': value.shared === undefined ? undefined : ((value.shared as Array).map(CustomFilterSharedInnerToJSON)), - }; -} - diff --git a/vue3/src/openapi/models/RecipeBookRequest.ts b/vue3/src/openapi/models/RecipeBookRequest.ts deleted file mode 100644 index afff2ff7a..000000000 --- a/vue3/src/openapi/models/RecipeBookRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { CustomFilterRequest } from './CustomFilterRequest'; -import { - CustomFilterRequestFromJSON, - CustomFilterRequestFromJSONTyped, - CustomFilterRequestToJSON, -} from './CustomFilterRequest'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface RecipeBookRequest - */ -export interface RecipeBookRequest { - /** - * - * @type {string} - * @memberof RecipeBookRequest - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeBookRequest - */ - description?: string; - /** - * - * @type {Array} - * @memberof RecipeBookRequest - */ - shared: Array; - /** - * - * @type {CustomFilterRequest} - * @memberof RecipeBookRequest - */ - filter?: CustomFilterRequest; - /** - * - * @type {number} - * @memberof RecipeBookRequest - */ - order?: number; - /** - * - * @type {number} - * @memberof RecipeBookRequest - */ - id?: number; -} - -/** - * Check if a given object implements the RecipeBookRequest interface. - */ -export function instanceOfRecipeBookRequest(value: object): boolean { - if (!('name' in value)) return false; - if (!('shared' in value)) return false; - return true; -} - -export function RecipeBookRequestFromJSON(json: any): RecipeBookRequest { - return RecipeBookRequestFromJSONTyped(json, false); -} - -export function RecipeBookRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBookRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'shared': ((json['shared'] as Array).map(UserRequestFromJSON)), - 'filter': json['filter'] == null ? undefined : CustomFilterRequestFromJSON(json['filter']), - 'order': json['order'] == null ? undefined : json['order'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function RecipeBookRequestToJSON(value?: RecipeBookRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'shared': ((value['shared'] as Array).map(UserRequestToJSON)), - 'filter': CustomFilterRequestToJSON(value['filter']), - 'order': value['order'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeFromSource.ts b/vue3/src/openapi/models/RecipeFromSource.ts new file mode 100644 index 000000000..74872c513 --- /dev/null +++ b/vue3/src/openapi/models/RecipeFromSource.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RecipeFromSource + */ +export interface RecipeFromSource { + /** + * + * @type {string} + * @memberof RecipeFromSource + */ + url?: string | null; + /** + * + * @type {string} + * @memberof RecipeFromSource + */ + data?: string | null; + /** + * + * @type {number} + * @memberof RecipeFromSource + */ + bookmarklet?: number | null; +} + +/** + * Check if a given object implements the RecipeFromSource interface. + */ +export function instanceOfRecipeFromSource(value: object): value is RecipeFromSource { + return true; +} + +export function RecipeFromSourceFromJSON(json: any): RecipeFromSource { + return RecipeFromSourceFromJSONTyped(json, false); +} + +export function RecipeFromSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeFromSource { + if (json == null) { + return json; + } + return { + + 'url': json['url'] == null ? undefined : json['url'], + 'data': json['data'] == null ? undefined : json['data'], + 'bookmarklet': json['bookmarklet'] == null ? undefined : json['bookmarklet'], + }; +} + +export function RecipeFromSourceToJSON(json: any): RecipeFromSource { + return RecipeFromSourceToJSONTyped(json, false); +} + +export function RecipeFromSourceToJSONTyped(value?: RecipeFromSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'url': value['url'], + 'data': value['data'], + 'bookmarklet': value['bookmarklet'], + }; +} + diff --git a/vue3/src/openapi/models/RecipeFromSourceResponse.ts b/vue3/src/openapi/models/RecipeFromSourceResponse.ts new file mode 100644 index 000000000..67ff3ddfc --- /dev/null +++ b/vue3/src/openapi/models/RecipeFromSourceResponse.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SourceImportRecipe } from './SourceImportRecipe'; +import { + SourceImportRecipeFromJSON, + SourceImportRecipeFromJSONTyped, + SourceImportRecipeToJSON, + SourceImportRecipeToJSONTyped, +} from './SourceImportRecipe'; + +/** + * + * @export + * @interface RecipeFromSourceResponse + */ +export interface RecipeFromSourceResponse { + /** + * + * @type {SourceImportRecipe} + * @memberof RecipeFromSourceResponse + */ + recipe?: SourceImportRecipe; + /** + * + * @type {Array} + * @memberof RecipeFromSourceResponse + */ + images?: Array; + /** + * + * @type {boolean} + * @memberof RecipeFromSourceResponse + */ + error?: boolean; + /** + * + * @type {string} + * @memberof RecipeFromSourceResponse + */ + msg?: string; + /** + * + * @type {Array} + * @memberof RecipeFromSourceResponse + */ + duplicate?: Array; +} + +/** + * Check if a given object implements the RecipeFromSourceResponse interface. + */ +export function instanceOfRecipeFromSourceResponse(value: object): value is RecipeFromSourceResponse { + return true; +} + +export function RecipeFromSourceResponseFromJSON(json: any): RecipeFromSourceResponse { + return RecipeFromSourceResponseFromJSONTyped(json, false); +} + +export function RecipeFromSourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeFromSourceResponse { + if (json == null) { + return json; + } + return { + + 'recipe': json['recipe'] == null ? undefined : SourceImportRecipeFromJSON(json['recipe']), + 'images': json['images'] == null ? undefined : json['images'], + 'error': json['error'] == null ? undefined : json['error'], + 'msg': json['msg'] == null ? undefined : json['msg'], + 'duplicate': json['duplicate'] == null ? undefined : json['duplicate'], + }; +} + +export function RecipeFromSourceResponseToJSON(json: any): RecipeFromSourceResponse { + return RecipeFromSourceResponseToJSONTyped(json, false); +} + +export function RecipeFromSourceResponseToJSONTyped(value?: RecipeFromSourceResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'recipe': SourceImportRecipeToJSON(value['recipe']), + 'images': value['images'], + 'error': value['error'], + 'msg': value['msg'], + 'duplicate': value['duplicate'], + }; +} + diff --git a/vue3/src/openapi/models/RecipeKeywordsInner.ts b/vue3/src/openapi/models/RecipeKeywordsInner.ts deleted file mode 100644 index 0030db2d3..000000000 --- a/vue3/src/openapi/models/RecipeKeywordsInner.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface RecipeKeywordsInner - */ -export interface RecipeKeywordsInner { - /** - * - * @type {number} - * @memberof RecipeKeywordsInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof RecipeKeywordsInner - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeKeywordsInner - */ - readonly label?: string; - /** - * - * @type {string} - * @memberof RecipeKeywordsInner - */ - description?: string; - /** - * - * @type {string} - * @memberof RecipeKeywordsInner - */ - readonly parent?: string; - /** - * - * @type {number} - * @memberof RecipeKeywordsInner - */ - readonly numchild?: number; - /** - * - * @type {Date} - * @memberof RecipeKeywordsInner - */ - readonly createdAt?: Date; - /** - * - * @type {Date} - * @memberof RecipeKeywordsInner - */ - readonly updatedAt?: Date; - /** - * - * @type {string} - * @memberof RecipeKeywordsInner - */ - readonly fullName?: string; -} - -/** - * Check if a given object implements the RecipeKeywordsInner interface. - */ -export function instanceOfRecipeKeywordsInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function RecipeKeywordsInnerFromJSON(json: any): RecipeKeywordsInner { - return RecipeKeywordsInnerFromJSONTyped(json, false); -} - -export function RecipeKeywordsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeKeywordsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'label': !exists(json, 'label') ? undefined : json['label'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'parent': !exists(json, 'parent') ? undefined : json['parent'], - 'numchild': !exists(json, 'numchild') ? undefined : json['numchild'], - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), - 'fullName': !exists(json, 'full_name') ? undefined : json['full_name'], - }; -} - -export function RecipeKeywordsInnerToJSON(value?: RecipeKeywordsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - }; -} - diff --git a/vue3/src/openapi/models/RecipeNutrition.ts b/vue3/src/openapi/models/RecipeNutrition.ts deleted file mode 100644 index 9be6397e2..000000000 --- a/vue3/src/openapi/models/RecipeNutrition.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface RecipeNutrition - */ -export interface RecipeNutrition { - /** - * - * @type {number} - * @memberof RecipeNutrition - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof RecipeNutrition - */ - carbohydrates: string; - /** - * - * @type {string} - * @memberof RecipeNutrition - */ - fats: string; - /** - * - * @type {string} - * @memberof RecipeNutrition - */ - proteins: string; - /** - * - * @type {string} - * @memberof RecipeNutrition - */ - calories: string; - /** - * - * @type {string} - * @memberof RecipeNutrition - */ - source?: string | null; -} - -/** - * Check if a given object implements the RecipeNutrition interface. - */ -export function instanceOfRecipeNutrition(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "carbohydrates" in value; - isInstance = isInstance && "fats" in value; - isInstance = isInstance && "proteins" in value; - isInstance = isInstance && "calories" in value; - - return isInstance; -} - -export function RecipeNutritionFromJSON(json: any): RecipeNutrition { - return RecipeNutritionFromJSONTyped(json, false); -} - -export function RecipeNutritionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeNutrition { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'carbohydrates': json['carbohydrates'], - 'fats': json['fats'], - 'proteins': json['proteins'], - 'calories': json['calories'], - 'source': !exists(json, 'source') ? undefined : json['source'], - }; -} - -export function RecipeNutritionToJSON(value?: RecipeNutrition | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'carbohydrates': value.carbohydrates, - 'fats': value.fats, - 'proteins': value.proteins, - 'calories': value.calories, - 'source': value.source, - }; -} - diff --git a/vue3/src/openapi/models/RecipeOverviewRequest.ts b/vue3/src/openapi/models/RecipeOverviewRequest.ts deleted file mode 100644 index a2889b921..000000000 --- a/vue3/src/openapi/models/RecipeOverviewRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface RecipeOverviewRequest - */ -export interface RecipeOverviewRequest { - /** - * - * @type {string} - * @memberof RecipeOverviewRequest - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeOverviewRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof RecipeOverviewRequest - */ - id?: number; -} - -/** - * Check if a given object implements the RecipeOverviewRequest interface. - */ -export function instanceOfRecipeOverviewRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function RecipeOverviewRequestFromJSON(json: any): RecipeOverviewRequest { - return RecipeOverviewRequestFromJSONTyped(json, false); -} - -export function RecipeOverviewRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeOverviewRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function RecipeOverviewRequestToJSON(value?: RecipeOverviewRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeRequest.ts b/vue3/src/openapi/models/RecipeRequest.ts deleted file mode 100644 index c72a01e38..000000000 --- a/vue3/src/openapi/models/RecipeRequest.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { KeywordRequest } from './KeywordRequest'; -import { - KeywordRequestFromJSON, - KeywordRequestFromJSONTyped, - KeywordRequestToJSON, -} from './KeywordRequest'; -import type { NutritionInformationRequest } from './NutritionInformationRequest'; -import { - NutritionInformationRequestFromJSON, - NutritionInformationRequestFromJSONTyped, - NutritionInformationRequestToJSON, -} from './NutritionInformationRequest'; -import type { PropertyRequest } from './PropertyRequest'; -import { - PropertyRequestFromJSON, - PropertyRequestFromJSONTyped, - PropertyRequestToJSON, -} from './PropertyRequest'; -import type { StepRequest } from './StepRequest'; -import { - StepRequestFromJSON, - StepRequestFromJSONTyped, - StepRequestToJSON, -} from './StepRequest'; -import type { UserRequest } from './UserRequest'; -import { - UserRequestFromJSON, - UserRequestFromJSONTyped, - UserRequestToJSON, -} from './UserRequest'; - -/** - * Adds nested create feature - * @export - * @interface RecipeRequest - */ -export interface RecipeRequest { - /** - * - * @type {string} - * @memberof RecipeRequest - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeRequest - */ - description?: string; - /** - * - * @type {Array} - * @memberof RecipeRequest - */ - keywords?: Array; - /** - * - * @type {Array} - * @memberof RecipeRequest - */ - steps: Array; - /** - * - * @type {number} - * @memberof RecipeRequest - */ - workingTime?: number; - /** - * - * @type {number} - * @memberof RecipeRequest - */ - waitingTime?: number; - /** - * - * @type {string} - * @memberof RecipeRequest - */ - sourceUrl?: string; - /** - * - * @type {boolean} - * @memberof RecipeRequest - */ - internal?: boolean; - /** - * - * @type {boolean} - * @memberof RecipeRequest - */ - showIngredientOverview?: boolean; - /** - * - * @type {NutritionInformationRequest} - * @memberof RecipeRequest - */ - nutrition?: NutritionInformationRequest; - /** - * - * @type {Array} - * @memberof RecipeRequest - */ - properties?: Array; - /** - * - * @type {number} - * @memberof RecipeRequest - */ - servings?: number; - /** - * - * @type {string} - * @memberof RecipeRequest - */ - filePath?: string; - /** - * - * @type {string} - * @memberof RecipeRequest - */ - servingsText?: string; - /** - * - * @type {boolean} - * @memberof RecipeRequest - */ - _private?: boolean; - /** - * - * @type {Array} - * @memberof RecipeRequest - */ - shared?: Array; - /** - * - * @type {number} - * @memberof RecipeRequest - */ - id?: number; -} - -/** - * Check if a given object implements the RecipeRequest interface. - */ -export function instanceOfRecipeRequest(value: object): boolean { - if (!('name' in value)) return false; - if (!('steps' in value)) return false; - return true; -} - -export function RecipeRequestFromJSON(json: any): RecipeRequest { - return RecipeRequestFromJSONTyped(json, false); -} - -export function RecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'keywords': json['keywords'] == null ? undefined : ((json['keywords'] as Array).map(KeywordRequestFromJSON)), - 'steps': ((json['steps'] as Array).map(StepRequestFromJSON)), - 'workingTime': json['working_time'] == null ? undefined : json['working_time'], - 'waitingTime': json['waiting_time'] == null ? undefined : json['waiting_time'], - 'sourceUrl': json['source_url'] == null ? undefined : json['source_url'], - 'internal': json['internal'] == null ? undefined : json['internal'], - 'showIngredientOverview': json['show_ingredient_overview'] == null ? undefined : json['show_ingredient_overview'], - 'nutrition': json['nutrition'] == null ? undefined : NutritionInformationRequestFromJSON(json['nutrition']), - 'properties': json['properties'] == null ? undefined : ((json['properties'] as Array).map(PropertyRequestFromJSON)), - 'servings': json['servings'] == null ? undefined : json['servings'], - 'filePath': json['file_path'] == null ? undefined : json['file_path'], - 'servingsText': json['servings_text'] == null ? undefined : json['servings_text'], - '_private': json['private'] == null ? undefined : json['private'], - 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserRequestFromJSON)), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function RecipeRequestToJSON(value?: RecipeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array).map(KeywordRequestToJSON)), - 'steps': ((value['steps'] as Array).map(StepRequestToJSON)), - 'working_time': value['workingTime'], - 'waiting_time': value['waitingTime'], - 'source_url': value['sourceUrl'], - 'internal': value['internal'], - 'show_ingredient_overview': value['showIngredientOverview'], - 'nutrition': NutritionInformationRequestToJSON(value['nutrition']), - 'properties': value['properties'] == null ? undefined : ((value['properties'] as Array).map(PropertyRequestToJSON)), - 'servings': value['servings'], - 'file_path': value['filePath'], - 'servings_text': value['servingsText'], - 'private': value['_private'], - 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserRequestToJSON)), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeShoppingUpdateRequest.ts b/vue3/src/openapi/models/RecipeShoppingUpdateRequest.ts deleted file mode 100644 index 2433ba8fc..000000000 --- a/vue3/src/openapi/models/RecipeShoppingUpdateRequest.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RecipeShoppingUpdateRequest - */ -export interface RecipeShoppingUpdateRequest { - /** - * Existing shopping list to update - * @type {number} - * @memberof RecipeShoppingUpdateRequest - */ - listRecipe?: number; - /** - * List of ingredient IDs from the recipe to add, if not provided all ingredients will be added. - * @type {number} - * @memberof RecipeShoppingUpdateRequest - */ - ingredients?: number; - /** - * Providing a list_recipe ID and servings of 0 will delete that shopping list. - * @type {number} - * @memberof RecipeShoppingUpdateRequest - */ - servings?: number; - /** - * - * @type {number} - * @memberof RecipeShoppingUpdateRequest - */ - id?: number; -} - -/** - * Check if a given object implements the RecipeShoppingUpdateRequest interface. - */ -export function instanceOfRecipeShoppingUpdateRequest(value: object): boolean { - return true; -} - -export function RecipeShoppingUpdateRequestFromJSON(json: any): RecipeShoppingUpdateRequest { - return RecipeShoppingUpdateRequestFromJSONTyped(json, false); -} - -export function RecipeShoppingUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeShoppingUpdateRequest { - if (json == null) { - return json; - } - return { - - 'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'], - 'ingredients': json['ingredients'] == null ? undefined : json['ingredients'], - 'servings': json['servings'] == null ? undefined : json['servings'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function RecipeShoppingUpdateRequestToJSON(value?: RecipeShoppingUpdateRequest | null): any { - if (value == null) { - return value; - } - return { - - 'list_recipe': value['listRecipe'], - 'ingredients': value['ingredients'], - 'servings': value['servings'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeSimpleRequest.ts b/vue3/src/openapi/models/RecipeSimpleRequest.ts deleted file mode 100644 index d6c6a2877..000000000 --- a/vue3/src/openapi/models/RecipeSimpleRequest.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface RecipeSimpleRequest - */ -export interface RecipeSimpleRequest { - /** - * - * @type {string} - * @memberof RecipeSimpleRequest - */ - name: string; - /** - * - * @type {number} - * @memberof RecipeSimpleRequest - */ - id?: number; -} - -/** - * Check if a given object implements the RecipeSimpleRequest interface. - */ -export function instanceOfRecipeSimpleRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function RecipeSimpleRequestFromJSON(json: any): RecipeSimpleRequest { - return RecipeSimpleRequestFromJSONTyped(json, false); -} - -export function RecipeSimpleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeSimpleRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function RecipeSimpleRequestToJSON(value?: RecipeSimpleRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/RecipeStepsInner.ts b/vue3/src/openapi/models/RecipeStepsInner.ts deleted file mode 100644 index f931c0382..000000000 --- a/vue3/src/openapi/models/RecipeStepsInner.ts +++ /dev/null @@ -1,171 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { RecipeStepsInnerFile } from './RecipeStepsInnerFile'; -import { - RecipeStepsInnerFileFromJSON, - RecipeStepsInnerFileFromJSONTyped, - RecipeStepsInnerFileToJSON, -} from './RecipeStepsInnerFile'; -import type { RecipeStepsInnerIngredientsInner } from './RecipeStepsInnerIngredientsInner'; -import { - RecipeStepsInnerIngredientsInnerFromJSON, - RecipeStepsInnerIngredientsInnerFromJSONTyped, - RecipeStepsInnerIngredientsInnerToJSON, -} from './RecipeStepsInnerIngredientsInner'; - -/** - * - * @export - * @interface RecipeStepsInner - */ -export interface RecipeStepsInner { - /** - * - * @type {number} - * @memberof RecipeStepsInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof RecipeStepsInner - */ - name?: string; - /** - * - * @type {string} - * @memberof RecipeStepsInner - */ - instruction?: string; - /** - * - * @type {Array} - * @memberof RecipeStepsInner - */ - ingredients: Array; - /** - * - * @type {string} - * @memberof RecipeStepsInner - */ - readonly instructionsMarkdown?: string; - /** - * - * @type {number} - * @memberof RecipeStepsInner - */ - time?: number; - /** - * - * @type {number} - * @memberof RecipeStepsInner - */ - order?: number; - /** - * - * @type {boolean} - * @memberof RecipeStepsInner - */ - showAsHeader?: boolean; - /** - * - * @type {RecipeStepsInnerFile} - * @memberof RecipeStepsInner - */ - file?: RecipeStepsInnerFile | null; - /** - * - * @type {number} - * @memberof RecipeStepsInner - */ - stepRecipe?: number | null; - /** - * - * @type {string} - * @memberof RecipeStepsInner - */ - readonly stepRecipeData?: string; - /** - * - * @type {string} - * @memberof RecipeStepsInner - */ - readonly numrecipe?: string; - /** - * - * @type {boolean} - * @memberof RecipeStepsInner - */ - showIngredientsTable?: boolean; -} - -/** - * Check if a given object implements the RecipeStepsInner interface. - */ -export function instanceOfRecipeStepsInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "ingredients" in value; - - return isInstance; -} - -export function RecipeStepsInnerFromJSON(json: any): RecipeStepsInner { - return RecipeStepsInnerFromJSONTyped(json, false); -} - -export function RecipeStepsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeStepsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'instruction': !exists(json, 'instruction') ? undefined : json['instruction'], - 'ingredients': ((json['ingredients'] as Array).map(RecipeStepsInnerIngredientsInnerFromJSON)), - 'instructionsMarkdown': !exists(json, 'instructions_markdown') ? undefined : json['instructions_markdown'], - 'time': !exists(json, 'time') ? undefined : json['time'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'showAsHeader': !exists(json, 'show_as_header') ? undefined : json['show_as_header'], - 'file': !exists(json, 'file') ? undefined : RecipeStepsInnerFileFromJSON(json['file']), - 'stepRecipe': !exists(json, 'step_recipe') ? undefined : json['step_recipe'], - 'stepRecipeData': !exists(json, 'step_recipe_data') ? undefined : json['step_recipe_data'], - 'numrecipe': !exists(json, 'numrecipe') ? undefined : json['numrecipe'], - 'showIngredientsTable': !exists(json, 'show_ingredients_table') ? undefined : json['show_ingredients_table'], - }; -} - -export function RecipeStepsInnerToJSON(value?: RecipeStepsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'instruction': value.instruction, - 'ingredients': ((value.ingredients as Array).map(RecipeStepsInnerIngredientsInnerToJSON)), - 'time': value.time, - 'order': value.order, - 'show_as_header': value.showAsHeader, - 'file': RecipeStepsInnerFileToJSON(value.file), - 'step_recipe': value.stepRecipe, - 'show_ingredients_table': value.showIngredientsTable, - }; -} - diff --git a/vue3/src/openapi/models/RecipeStepsInnerFile.ts b/vue3/src/openapi/models/RecipeStepsInnerFile.ts deleted file mode 100644 index d0f07d2fa..000000000 --- a/vue3/src/openapi/models/RecipeStepsInnerFile.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface RecipeStepsInnerFile - */ -export interface RecipeStepsInnerFile { - /** - * - * @type {number} - * @memberof RecipeStepsInnerFile - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof RecipeStepsInnerFile - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeStepsInnerFile - */ - readonly fileDownload?: string; - /** - * - * @type {string} - * @memberof RecipeStepsInnerFile - */ - readonly preview?: string; -} - -/** - * Check if a given object implements the RecipeStepsInnerFile interface. - */ -export function instanceOfRecipeStepsInnerFile(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function RecipeStepsInnerFileFromJSON(json: any): RecipeStepsInnerFile { - return RecipeStepsInnerFileFromJSONTyped(json, false); -} - -export function RecipeStepsInnerFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeStepsInnerFile { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'fileDownload': !exists(json, 'file_download') ? undefined : json['file_download'], - 'preview': !exists(json, 'preview') ? undefined : json['preview'], - }; -} - -export function RecipeStepsInnerFileToJSON(value?: RecipeStepsInnerFile | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/vue3/src/openapi/models/RecipeStepsInnerIngredientsInner.ts b/vue3/src/openapi/models/RecipeStepsInnerIngredientsInner.ts deleted file mode 100644 index b8488d062..000000000 --- a/vue3/src/openapi/models/RecipeStepsInnerIngredientsInner.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit'; -import { - FoodPropertiesFoodUnitFromJSON, - FoodPropertiesFoodUnitFromJSONTyped, - FoodPropertiesFoodUnitToJSON, -} from './FoodPropertiesFoodUnit'; -import type { IngredientFood } from './IngredientFood'; -import { - IngredientFoodFromJSON, - IngredientFoodFromJSONTyped, - IngredientFoodToJSON, -} from './IngredientFood'; - -/** - * - * @export - * @interface RecipeStepsInnerIngredientsInner - */ -export interface RecipeStepsInnerIngredientsInner { - /** - * - * @type {number} - * @memberof RecipeStepsInnerIngredientsInner - */ - readonly id?: number; - /** - * - * @type {IngredientFood} - * @memberof RecipeStepsInnerIngredientsInner - */ - food: IngredientFood | null; - /** - * - * @type {FoodPropertiesFoodUnit} - * @memberof RecipeStepsInnerIngredientsInner - */ - unit: FoodPropertiesFoodUnit | null; - /** - * - * @type {string} - * @memberof RecipeStepsInnerIngredientsInner - */ - amount: string; - /** - * - * @type {string} - * @memberof RecipeStepsInnerIngredientsInner - */ - readonly conversions?: string; - /** - * - * @type {string} - * @memberof RecipeStepsInnerIngredientsInner - */ - note?: string | null; - /** - * - * @type {number} - * @memberof RecipeStepsInnerIngredientsInner - */ - order?: number; - /** - * - * @type {boolean} - * @memberof RecipeStepsInnerIngredientsInner - */ - isHeader?: boolean; - /** - * - * @type {boolean} - * @memberof RecipeStepsInnerIngredientsInner - */ - noAmount?: boolean; - /** - * - * @type {string} - * @memberof RecipeStepsInnerIngredientsInner - */ - originalText?: string | null; - /** - * - * @type {string} - * @memberof RecipeStepsInnerIngredientsInner - */ - readonly usedInRecipes?: string; - /** - * - * @type {boolean} - * @memberof RecipeStepsInnerIngredientsInner - */ - alwaysUsePluralUnit?: boolean; - /** - * - * @type {boolean} - * @memberof RecipeStepsInnerIngredientsInner - */ - alwaysUsePluralFood?: boolean; -} - -/** - * Check if a given object implements the RecipeStepsInnerIngredientsInner interface. - */ -export function instanceOfRecipeStepsInnerIngredientsInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "food" in value; - isInstance = isInstance && "unit" in value; - isInstance = isInstance && "amount" in value; - - return isInstance; -} - -export function RecipeStepsInnerIngredientsInnerFromJSON(json: any): RecipeStepsInnerIngredientsInner { - return RecipeStepsInnerIngredientsInnerFromJSONTyped(json, false); -} - -export function RecipeStepsInnerIngredientsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeStepsInnerIngredientsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'food': IngredientFoodFromJSON(json['food']), - 'unit': FoodPropertiesFoodUnitFromJSON(json['unit']), - 'amount': json['amount'], - 'conversions': !exists(json, 'conversions') ? undefined : json['conversions'], - 'note': !exists(json, 'note') ? undefined : json['note'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'isHeader': !exists(json, 'is_header') ? undefined : json['is_header'], - 'noAmount': !exists(json, 'no_amount') ? undefined : json['no_amount'], - 'originalText': !exists(json, 'original_text') ? undefined : json['original_text'], - 'usedInRecipes': !exists(json, 'used_in_recipes') ? undefined : json['used_in_recipes'], - 'alwaysUsePluralUnit': !exists(json, 'always_use_plural_unit') ? undefined : json['always_use_plural_unit'], - 'alwaysUsePluralFood': !exists(json, 'always_use_plural_food') ? undefined : json['always_use_plural_food'], - }; -} - -export function RecipeStepsInnerIngredientsInnerToJSON(value?: RecipeStepsInnerIngredientsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'food': IngredientFoodToJSON(value.food), - 'unit': FoodPropertiesFoodUnitToJSON(value.unit), - 'amount': value.amount, - 'note': value.note, - 'order': value.order, - 'is_header': value.isHeader, - 'no_amount': value.noAmount, - 'original_text': value.originalText, - 'always_use_plural_unit': value.alwaysUsePluralUnit, - 'always_use_plural_food': value.alwaysUsePluralFood, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingList.ts b/vue3/src/openapi/models/ShoppingList.ts deleted file mode 100644 index 650da805f..000000000 --- a/vue3/src/openapi/models/ShoppingList.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CustomFilterSharedInner } from './CustomFilterSharedInner'; -import { - CustomFilterSharedInnerFromJSON, - CustomFilterSharedInnerFromJSONTyped, - CustomFilterSharedInnerToJSON, -} from './CustomFilterSharedInner'; -import type { ShoppingListEntriesInner } from './ShoppingListEntriesInner'; -import { - ShoppingListEntriesInnerFromJSON, - ShoppingListEntriesInnerFromJSONTyped, - ShoppingListEntriesInnerToJSON, -} from './ShoppingListEntriesInner'; -import type { ShoppingListRecipesInner } from './ShoppingListRecipesInner'; -import { - ShoppingListRecipesInnerFromJSON, - ShoppingListRecipesInnerFromJSONTyped, - ShoppingListRecipesInnerToJSON, -} from './ShoppingListRecipesInner'; -import type { ShoppingListSupermarket } from './ShoppingListSupermarket'; -import { - ShoppingListSupermarketFromJSON, - ShoppingListSupermarketFromJSONTyped, - ShoppingListSupermarketToJSON, -} from './ShoppingListSupermarket'; - -/** - * - * @export - * @interface ShoppingList - */ -export interface ShoppingList { - /** - * - * @type {number} - * @memberof ShoppingList - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ShoppingList - */ - uuid?: string; - /** - * - * @type {string} - * @memberof ShoppingList - */ - note?: string | null; - /** - * - * @type {Array} - * @memberof ShoppingList - */ - recipes: Array | null; - /** - * - * @type {Array} - * @memberof ShoppingList - */ - entries: Array | null; - /** - * - * @type {Array} - * @memberof ShoppingList - */ - shared: Array; - /** - * - * @type {boolean} - * @memberof ShoppingList - */ - finished?: boolean; - /** - * - * @type {ShoppingListSupermarket} - * @memberof ShoppingList - */ - supermarket: ShoppingListSupermarket | null; - /** - * - * @type {string} - * @memberof ShoppingList - */ - readonly createdBy?: string; - /** - * - * @type {Date} - * @memberof ShoppingList - */ - readonly createdAt?: Date; -} - -/** - * Check if a given object implements the ShoppingList interface. - */ -export function instanceOfShoppingList(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "recipes" in value; - isInstance = isInstance && "entries" in value; - isInstance = isInstance && "shared" in value; - isInstance = isInstance && "supermarket" in value; - - return isInstance; -} - -export function ShoppingListFromJSON(json: any): ShoppingList { - return ShoppingListFromJSONTyped(json, false); -} - -export function ShoppingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingList { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'uuid': !exists(json, 'uuid') ? undefined : json['uuid'], - 'note': !exists(json, 'note') ? undefined : json['note'], - 'recipes': (json['recipes'] === null ? null : (json['recipes'] as Array).map(ShoppingListRecipesInnerFromJSON)), - 'entries': (json['entries'] === null ? null : (json['entries'] as Array).map(ShoppingListEntriesInnerFromJSON)), - 'shared': ((json['shared'] as Array).map(CustomFilterSharedInnerFromJSON)), - 'finished': !exists(json, 'finished') ? undefined : json['finished'], - 'supermarket': ShoppingListSupermarketFromJSON(json['supermarket']), - 'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'], - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - }; -} - -export function ShoppingListToJSON(value?: ShoppingList | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'uuid': value.uuid, - 'note': value.note, - 'recipes': (value.recipes === null ? null : (value.recipes as Array).map(ShoppingListRecipesInnerToJSON)), - 'entries': (value.entries === null ? null : (value.entries as Array).map(ShoppingListEntriesInnerToJSON)), - 'shared': ((value.shared as Array).map(CustomFilterSharedInnerToJSON)), - 'finished': value.finished, - 'supermarket': ShoppingListSupermarketToJSON(value.supermarket), - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListEntriesInner.ts b/vue3/src/openapi/models/ShoppingListEntriesInner.ts deleted file mode 100644 index f785d6886..000000000 --- a/vue3/src/openapi/models/ShoppingListEntriesInner.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CookLogCreatedBy } from './CookLogCreatedBy'; -import { - CookLogCreatedByFromJSON, - CookLogCreatedByFromJSONTyped, - CookLogCreatedByToJSON, -} from './CookLogCreatedBy'; -import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit'; -import { - FoodPropertiesFoodUnitFromJSON, - FoodPropertiesFoodUnitFromJSONTyped, - FoodPropertiesFoodUnitToJSON, -} from './FoodPropertiesFoodUnit'; -import type { IngredientFood } from './IngredientFood'; -import { - IngredientFoodFromJSON, - IngredientFoodFromJSONTyped, - IngredientFoodToJSON, -} from './IngredientFood'; -import type { ShoppingListEntriesInnerRecipeMealplan } from './ShoppingListEntriesInnerRecipeMealplan'; -import { - ShoppingListEntriesInnerRecipeMealplanFromJSON, - ShoppingListEntriesInnerRecipeMealplanFromJSONTyped, - ShoppingListEntriesInnerRecipeMealplanToJSON, -} from './ShoppingListEntriesInnerRecipeMealplan'; - -/** - * - * @export - * @interface ShoppingListEntriesInner - */ -export interface ShoppingListEntriesInner { - /** - * - * @type {number} - * @memberof ShoppingListEntriesInner - */ - readonly id?: number; - /** - * - * @type {number} - * @memberof ShoppingListEntriesInner - */ - listRecipe?: number | null; - /** - * - * @type {IngredientFood} - * @memberof ShoppingListEntriesInner - */ - food: IngredientFood | null; - /** - * - * @type {FoodPropertiesFoodUnit} - * @memberof ShoppingListEntriesInner - */ - unit?: FoodPropertiesFoodUnit | null; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInner - */ - amount: string; - /** - * - * @type {number} - * @memberof ShoppingListEntriesInner - */ - order?: number; - /** - * - * @type {boolean} - * @memberof ShoppingListEntriesInner - */ - checked?: boolean; - /** - * - * @type {ShoppingListEntriesInnerRecipeMealplan} - * @memberof ShoppingListEntriesInner - */ - recipeMealplan?: ShoppingListEntriesInnerRecipeMealplan; - /** - * - * @type {CookLogCreatedBy} - * @memberof ShoppingListEntriesInner - */ - createdBy?: CookLogCreatedBy; - /** - * - * @type {Date} - * @memberof ShoppingListEntriesInner - */ - readonly createdAt?: Date; - /** - * - * @type {Date} - * @memberof ShoppingListEntriesInner - */ - readonly updatedAt?: Date; - /** - * - * @type {Date} - * @memberof ShoppingListEntriesInner - */ - completedAt?: Date | null; - /** - * - * @type {Date} - * @memberof ShoppingListEntriesInner - */ - delayUntil?: Date | null; -} - -/** - * Check if a given object implements the ShoppingListEntriesInner interface. - */ -export function instanceOfShoppingListEntriesInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "food" in value; - isInstance = isInstance && "amount" in value; - - return isInstance; -} - -export function ShoppingListEntriesInnerFromJSON(json: any): ShoppingListEntriesInner { - return ShoppingListEntriesInnerFromJSONTyped(json, false); -} - -export function ShoppingListEntriesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntriesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'listRecipe': !exists(json, 'list_recipe') ? undefined : json['list_recipe'], - 'food': IngredientFoodFromJSON(json['food']), - 'unit': !exists(json, 'unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['unit']), - 'amount': json['amount'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'checked': !exists(json, 'checked') ? undefined : json['checked'], - 'recipeMealplan': !exists(json, 'recipe_mealplan') ? undefined : ShoppingListEntriesInnerRecipeMealplanFromJSON(json['recipe_mealplan']), - 'createdBy': !exists(json, 'created_by') ? undefined : CookLogCreatedByFromJSON(json['created_by']), - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), - 'completedAt': !exists(json, 'completed_at') ? undefined : (json['completed_at'] === null ? null : new Date(json['completed_at'])), - 'delayUntil': !exists(json, 'delay_until') ? undefined : (json['delay_until'] === null ? null : new Date(json['delay_until'])), - }; -} - -export function ShoppingListEntriesInnerToJSON(value?: ShoppingListEntriesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'list_recipe': value.listRecipe, - 'food': IngredientFoodToJSON(value.food), - 'unit': FoodPropertiesFoodUnitToJSON(value.unit), - 'amount': value.amount, - 'order': value.order, - 'checked': value.checked, - 'recipe_mealplan': ShoppingListEntriesInnerRecipeMealplanToJSON(value.recipeMealplan), - 'created_by': CookLogCreatedByToJSON(value.createdBy), - 'completed_at': value.completedAt === undefined ? undefined : (value.completedAt === null ? null : value.completedAt.toISOString()), - 'delay_until': value.delayUntil === undefined ? undefined : (value.delayUntil === null ? null : value.delayUntil.toISOString()), - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListEntriesInnerCreatedBy.ts b/vue3/src/openapi/models/ShoppingListEntriesInnerCreatedBy.ts deleted file mode 100644 index 8d5b34ff5..000000000 --- a/vue3/src/openapi/models/ShoppingListEntriesInnerCreatedBy.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListEntriesInnerCreatedBy - */ -export interface ShoppingListEntriesInnerCreatedBy { - /** - * - * @type {number} - * @memberof ShoppingListEntriesInnerCreatedBy - */ - readonly id?: number; - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - * @type {string} - * @memberof ShoppingListEntriesInnerCreatedBy - */ - readonly username?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerCreatedBy - */ - firstName?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerCreatedBy - */ - lastName?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerCreatedBy - */ - readonly displayName?: string; -} - -/** - * Check if a given object implements the ShoppingListEntriesInnerCreatedBy interface. - */ -export function instanceOfShoppingListEntriesInnerCreatedBy(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ShoppingListEntriesInnerCreatedByFromJSON(json: any): ShoppingListEntriesInnerCreatedBy { - return ShoppingListEntriesInnerCreatedByFromJSONTyped(json, false); -} - -export function ShoppingListEntriesInnerCreatedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntriesInnerCreatedBy { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'username': !exists(json, 'username') ? undefined : json['username'], - 'firstName': !exists(json, 'first_name') ? undefined : json['first_name'], - 'lastName': !exists(json, 'last_name') ? undefined : json['last_name'], - 'displayName': !exists(json, 'display_name') ? undefined : json['display_name'], - }; -} - -export function ShoppingListEntriesInnerCreatedByToJSON(value?: ShoppingListEntriesInnerCreatedBy | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'first_name': value.firstName, - 'last_name': value.lastName, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListEntriesInnerRecipeMealplan.ts b/vue3/src/openapi/models/ShoppingListEntriesInnerRecipeMealplan.ts deleted file mode 100644 index e09ddba47..000000000 --- a/vue3/src/openapi/models/ShoppingListEntriesInnerRecipeMealplan.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListEntriesInnerRecipeMealplan - */ -export interface ShoppingListEntriesInnerRecipeMealplan { - /** - * - * @type {number} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - readonly recipeName?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - readonly name?: string; - /** - * - * @type {number} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - recipe?: number | null; - /** - * - * @type {number} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - mealplan?: number | null; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - servings: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - readonly mealplanNote?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - readonly mealplanFromDate?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntriesInnerRecipeMealplan - */ - readonly mealplanType?: string; -} - -/** - * Check if a given object implements the ShoppingListEntriesInnerRecipeMealplan interface. - */ -export function instanceOfShoppingListEntriesInnerRecipeMealplan(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "servings" in value; - - return isInstance; -} - -export function ShoppingListEntriesInnerRecipeMealplanFromJSON(json: any): ShoppingListEntriesInnerRecipeMealplan { - return ShoppingListEntriesInnerRecipeMealplanFromJSONTyped(json, false); -} - -export function ShoppingListEntriesInnerRecipeMealplanFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntriesInnerRecipeMealplan { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'recipe': !exists(json, 'recipe') ? undefined : json['recipe'], - 'mealplan': !exists(json, 'mealplan') ? undefined : json['mealplan'], - 'servings': json['servings'], - 'mealplanNote': !exists(json, 'mealplan_note') ? undefined : json['mealplan_note'], - 'mealplanFromDate': !exists(json, 'mealplan_from_date') ? undefined : json['mealplan_from_date'], - 'mealplanType': !exists(json, 'mealplan_type') ? undefined : json['mealplan_type'], - }; -} - -export function ShoppingListEntriesInnerRecipeMealplanToJSON(value?: ShoppingListEntriesInnerRecipeMealplan | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'recipe': value.recipe, - 'mealplan': value.mealplan, - 'servings': value.servings, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListEntryBulkRequest.ts b/vue3/src/openapi/models/ShoppingListEntryBulkRequest.ts deleted file mode 100644 index 35fbc11c2..000000000 --- a/vue3/src/openapi/models/ShoppingListEntryBulkRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListEntryBulkRequest - */ -export interface ShoppingListEntryBulkRequest { - /** - * - * @type {Array} - * @memberof ShoppingListEntryBulkRequest - */ - ids: Array; - /** - * - * @type {boolean} - * @memberof ShoppingListEntryBulkRequest - */ - checked: boolean; -} - -/** - * Check if a given object implements the ShoppingListEntryBulkRequest interface. - */ -export function instanceOfShoppingListEntryBulkRequest(value: object): boolean { - if (!('ids' in value)) return false; - if (!('checked' in value)) return false; - return true; -} - -export function ShoppingListEntryBulkRequestFromJSON(json: any): ShoppingListEntryBulkRequest { - return ShoppingListEntryBulkRequestFromJSONTyped(json, false); -} - -export function ShoppingListEntryBulkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntryBulkRequest { - if (json == null) { - return json; - } - return { - - 'ids': json['ids'], - 'checked': json['checked'], - }; -} - -export function ShoppingListEntryBulkRequestToJSON(value?: ShoppingListEntryBulkRequest | null): any { - if (value == null) { - return value; - } - return { - - 'ids': value['ids'], - 'checked': value['checked'], - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListEntryRecipeMealplan.ts b/vue3/src/openapi/models/ShoppingListEntryRecipeMealplan.ts deleted file mode 100644 index 76f8991b1..000000000 --- a/vue3/src/openapi/models/ShoppingListEntryRecipeMealplan.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListEntryRecipeMealplan - */ -export interface ShoppingListEntryRecipeMealplan { - /** - * - * @type {number} - * @memberof ShoppingListEntryRecipeMealplan - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ShoppingListEntryRecipeMealplan - */ - readonly recipeName?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntryRecipeMealplan - */ - readonly name?: string; - /** - * - * @type {number} - * @memberof ShoppingListEntryRecipeMealplan - */ - recipe?: number | null; - /** - * - * @type {number} - * @memberof ShoppingListEntryRecipeMealplan - */ - mealplan?: number | null; - /** - * - * @type {string} - * @memberof ShoppingListEntryRecipeMealplan - */ - servings: string; - /** - * - * @type {string} - * @memberof ShoppingListEntryRecipeMealplan - */ - readonly mealplanNote?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntryRecipeMealplan - */ - readonly mealplanFromDate?: string; - /** - * - * @type {string} - * @memberof ShoppingListEntryRecipeMealplan - */ - readonly mealplanType?: string; -} - -/** - * Check if a given object implements the ShoppingListEntryRecipeMealplan interface. - */ -export function instanceOfShoppingListEntryRecipeMealplan(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "servings" in value; - - return isInstance; -} - -export function ShoppingListEntryRecipeMealplanFromJSON(json: any): ShoppingListEntryRecipeMealplan { - return ShoppingListEntryRecipeMealplanFromJSONTyped(json, false); -} - -export function ShoppingListEntryRecipeMealplanFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntryRecipeMealplan { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'recipe': !exists(json, 'recipe') ? undefined : json['recipe'], - 'mealplan': !exists(json, 'mealplan') ? undefined : json['mealplan'], - 'servings': json['servings'], - 'mealplanNote': !exists(json, 'mealplan_note') ? undefined : json['mealplan_note'], - 'mealplanFromDate': !exists(json, 'mealplan_from_date') ? undefined : json['mealplan_from_date'], - 'mealplanType': !exists(json, 'mealplan_type') ? undefined : json['mealplan_type'], - }; -} - -export function ShoppingListEntryRecipeMealplanToJSON(value?: ShoppingListEntryRecipeMealplan | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'recipe': value.recipe, - 'mealplan': value.mealplan, - 'servings': value.servings, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListEntryRequest.ts b/vue3/src/openapi/models/ShoppingListEntryRequest.ts deleted file mode 100644 index 70d03682a..000000000 --- a/vue3/src/openapi/models/ShoppingListEntryRequest.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodRequest } from './FoodRequest'; -import { - FoodRequestFromJSON, - FoodRequestFromJSONTyped, - FoodRequestToJSON, -} from './FoodRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Adds nested create feature - * @export - * @interface ShoppingListEntryRequest - */ -export interface ShoppingListEntryRequest { - /** - * - * @type {number} - * @memberof ShoppingListEntryRequest - */ - listRecipe?: number; - /** - * - * @type {FoodRequest} - * @memberof ShoppingListEntryRequest - */ - food: FoodRequest | null; - /** - * - * @type {UnitRequest} - * @memberof ShoppingListEntryRequest - */ - unit?: UnitRequest; - /** - * - * @type {number} - * @memberof ShoppingListEntryRequest - */ - amount: number; - /** - * - * @type {number} - * @memberof ShoppingListEntryRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof ShoppingListEntryRequest - */ - checked?: boolean; - /** - * - * @type {Date} - * @memberof ShoppingListEntryRequest - */ - completedAt?: Date; - /** - * - * @type {Date} - * @memberof ShoppingListEntryRequest - */ - delayUntil?: Date; - /** - * - * @type {number} - * @memberof ShoppingListEntryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the ShoppingListEntryRequest interface. - */ -export function instanceOfShoppingListEntryRequest(value: object): boolean { - if (!('food' in value)) return false; - if (!('amount' in value)) return false; - return true; -} - -export function ShoppingListEntryRequestFromJSON(json: any): ShoppingListEntryRequest { - return ShoppingListEntryRequestFromJSONTyped(json, false); -} - -export function ShoppingListEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntryRequest { - if (json == null) { - return json; - } - return { - - 'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'], - 'food': FoodRequestFromJSON(json['food']), - 'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']), - 'amount': json['amount'], - 'order': json['order'] == null ? undefined : json['order'], - 'checked': json['checked'] == null ? undefined : json['checked'], - 'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])), - 'delayUntil': json['delay_until'] == null ? undefined : (new Date(json['delay_until'])), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function ShoppingListEntryRequestToJSON(value?: ShoppingListEntryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'list_recipe': value['listRecipe'], - 'food': FoodRequestToJSON(value['food']), - 'unit': UnitRequestToJSON(value['unit']), - 'amount': value['amount'], - 'order': value['order'], - 'checked': value['checked'], - 'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()), - 'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListRecipeRequest.ts b/vue3/src/openapi/models/ShoppingListRecipeRequest.ts deleted file mode 100644 index a157509be..000000000 --- a/vue3/src/openapi/models/ShoppingListRecipeRequest.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListRecipeRequest - */ -export interface ShoppingListRecipeRequest { - /** - * - * @type {number} - * @memberof ShoppingListRecipeRequest - */ - recipe?: number; - /** - * - * @type {number} - * @memberof ShoppingListRecipeRequest - */ - mealplan?: number; - /** - * - * @type {number} - * @memberof ShoppingListRecipeRequest - */ - servings: number; - /** - * - * @type {number} - * @memberof ShoppingListRecipeRequest - */ - id?: number; -} - -/** - * Check if a given object implements the ShoppingListRecipeRequest interface. - */ -export function instanceOfShoppingListRecipeRequest(value: object): boolean { - if (!('servings' in value)) return false; - return true; -} - -export function ShoppingListRecipeRequestFromJSON(json: any): ShoppingListRecipeRequest { - return ShoppingListRecipeRequestFromJSONTyped(json, false); -} - -export function ShoppingListRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListRecipeRequest { - if (json == null) { - return json; - } - return { - - 'recipe': json['recipe'] == null ? undefined : json['recipe'], - 'mealplan': json['mealplan'] == null ? undefined : json['mealplan'], - 'servings': json['servings'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function ShoppingListRecipeRequestToJSON(value?: ShoppingListRecipeRequest | null): any { - if (value == null) { - return value; - } - return { - - 'recipe': value['recipe'], - 'mealplan': value['mealplan'], - 'servings': value['servings'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListRecipesInner.ts b/vue3/src/openapi/models/ShoppingListRecipesInner.ts deleted file mode 100644 index 134023744..000000000 --- a/vue3/src/openapi/models/ShoppingListRecipesInner.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListRecipesInner - */ -export interface ShoppingListRecipesInner { - /** - * - * @type {number} - * @memberof ShoppingListRecipesInner - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ShoppingListRecipesInner - */ - readonly recipeName?: string; - /** - * - * @type {string} - * @memberof ShoppingListRecipesInner - */ - readonly name?: string; - /** - * - * @type {number} - * @memberof ShoppingListRecipesInner - */ - recipe?: number | null; - /** - * - * @type {number} - * @memberof ShoppingListRecipesInner - */ - mealplan?: number | null; - /** - * - * @type {string} - * @memberof ShoppingListRecipesInner - */ - servings: string; - /** - * - * @type {string} - * @memberof ShoppingListRecipesInner - */ - readonly mealplanNote?: string; - /** - * - * @type {string} - * @memberof ShoppingListRecipesInner - */ - readonly mealplanFromDate?: string; - /** - * - * @type {string} - * @memberof ShoppingListRecipesInner - */ - readonly mealplanType?: string; -} - -/** - * Check if a given object implements the ShoppingListRecipesInner interface. - */ -export function instanceOfShoppingListRecipesInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "servings" in value; - - return isInstance; -} - -export function ShoppingListRecipesInnerFromJSON(json: any): ShoppingListRecipesInner { - return ShoppingListRecipesInnerFromJSONTyped(json, false); -} - -export function ShoppingListRecipesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListRecipesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'recipe': !exists(json, 'recipe') ? undefined : json['recipe'], - 'mealplan': !exists(json, 'mealplan') ? undefined : json['mealplan'], - 'servings': json['servings'], - 'mealplanNote': !exists(json, 'mealplan_note') ? undefined : json['mealplan_note'], - 'mealplanFromDate': !exists(json, 'mealplan_from_date') ? undefined : json['mealplan_from_date'], - 'mealplanType': !exists(json, 'mealplan_type') ? undefined : json['mealplan_type'], - }; -} - -export function ShoppingListRecipesInnerToJSON(value?: ShoppingListRecipesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'recipe': value.recipe, - 'mealplan': value.mealplan, - 'servings': value.servings, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListSupermarket.ts b/vue3/src/openapi/models/ShoppingListSupermarket.ts deleted file mode 100644 index e7de683e8..000000000 --- a/vue3/src/openapi/models/ShoppingListSupermarket.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ShoppingListSupermarketCategoryToSupermarketInner } from './ShoppingListSupermarketCategoryToSupermarketInner'; -import { - ShoppingListSupermarketCategoryToSupermarketInnerFromJSON, - ShoppingListSupermarketCategoryToSupermarketInnerFromJSONTyped, - ShoppingListSupermarketCategoryToSupermarketInnerToJSON, -} from './ShoppingListSupermarketCategoryToSupermarketInner'; - -/** - * - * @export - * @interface ShoppingListSupermarket - */ -export interface ShoppingListSupermarket { - /** - * - * @type {number} - * @memberof ShoppingListSupermarket - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ShoppingListSupermarket - */ - name: string; - /** - * - * @type {string} - * @memberof ShoppingListSupermarket - */ - description?: string | null; - /** - * - * @type {Array} - * @memberof ShoppingListSupermarket - */ - readonly categoryToSupermarket?: Array; - /** - * - * @type {string} - * @memberof ShoppingListSupermarket - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the ShoppingListSupermarket interface. - */ -export function instanceOfShoppingListSupermarket(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function ShoppingListSupermarketFromJSON(json: any): ShoppingListSupermarket { - return ShoppingListSupermarketFromJSONTyped(json, false); -} - -export function ShoppingListSupermarketFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListSupermarket { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'categoryToSupermarket': !exists(json, 'category_to_supermarket') ? undefined : ((json['category_to_supermarket'] as Array).map(ShoppingListSupermarketCategoryToSupermarketInnerFromJSON)), - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - }; -} - -export function ShoppingListSupermarketToJSON(value?: ShoppingListSupermarket | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListSupermarketCategoryToSupermarketInner.ts b/vue3/src/openapi/models/ShoppingListSupermarketCategoryToSupermarketInner.ts deleted file mode 100644 index 40496445a..000000000 --- a/vue3/src/openapi/models/ShoppingListSupermarketCategoryToSupermarketInner.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ShoppingListSupermarketCategoryToSupermarketInnerCategory } from './ShoppingListSupermarketCategoryToSupermarketInnerCategory'; -import { - ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSON, - ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSONTyped, - ShoppingListSupermarketCategoryToSupermarketInnerCategoryToJSON, -} from './ShoppingListSupermarketCategoryToSupermarketInnerCategory'; - -/** - * - * @export - * @interface ShoppingListSupermarketCategoryToSupermarketInner - */ -export interface ShoppingListSupermarketCategoryToSupermarketInner { - /** - * - * @type {number} - * @memberof ShoppingListSupermarketCategoryToSupermarketInner - */ - readonly id?: number; - /** - * - * @type {ShoppingListSupermarketCategoryToSupermarketInnerCategory} - * @memberof ShoppingListSupermarketCategoryToSupermarketInner - */ - category: ShoppingListSupermarketCategoryToSupermarketInnerCategory; - /** - * - * @type {number} - * @memberof ShoppingListSupermarketCategoryToSupermarketInner - */ - supermarket: number; - /** - * - * @type {number} - * @memberof ShoppingListSupermarketCategoryToSupermarketInner - */ - order?: number; -} - -/** - * Check if a given object implements the ShoppingListSupermarketCategoryToSupermarketInner interface. - */ -export function instanceOfShoppingListSupermarketCategoryToSupermarketInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "category" in value; - isInstance = isInstance && "supermarket" in value; - - return isInstance; -} - -export function ShoppingListSupermarketCategoryToSupermarketInnerFromJSON(json: any): ShoppingListSupermarketCategoryToSupermarketInner { - return ShoppingListSupermarketCategoryToSupermarketInnerFromJSONTyped(json, false); -} - -export function ShoppingListSupermarketCategoryToSupermarketInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListSupermarketCategoryToSupermarketInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'category': ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSON(json['category']), - 'supermarket': json['supermarket'], - 'order': !exists(json, 'order') ? undefined : json['order'], - }; -} - -export function ShoppingListSupermarketCategoryToSupermarketInnerToJSON(value?: ShoppingListSupermarketCategoryToSupermarketInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'category': ShoppingListSupermarketCategoryToSupermarketInnerCategoryToJSON(value.category), - 'supermarket': value.supermarket, - 'order': value.order, - }; -} - diff --git a/vue3/src/openapi/models/ShoppingListSupermarketCategoryToSupermarketInnerCategory.ts b/vue3/src/openapi/models/ShoppingListSupermarketCategoryToSupermarketInnerCategory.ts deleted file mode 100644 index 7712e575b..000000000 --- a/vue3/src/openapi/models/ShoppingListSupermarketCategoryToSupermarketInnerCategory.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ShoppingListSupermarketCategoryToSupermarketInnerCategory - */ -export interface ShoppingListSupermarketCategoryToSupermarketInnerCategory { - /** - * - * @type {number} - * @memberof ShoppingListSupermarketCategoryToSupermarketInnerCategory - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof ShoppingListSupermarketCategoryToSupermarketInnerCategory - */ - name: string; - /** - * - * @type {string} - * @memberof ShoppingListSupermarketCategoryToSupermarketInnerCategory - */ - description?: string | null; -} - -/** - * Check if a given object implements the ShoppingListSupermarketCategoryToSupermarketInnerCategory interface. - */ -export function instanceOfShoppingListSupermarketCategoryToSupermarketInnerCategory(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSON(json: any): ShoppingListSupermarketCategoryToSupermarketInnerCategory { - return ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSONTyped(json, false); -} - -export function ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListSupermarketCategoryToSupermarketInnerCategory { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function ShoppingListSupermarketCategoryToSupermarketInnerCategoryToJSON(value?: ShoppingListSupermarketCategoryToSupermarketInnerCategory | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - }; -} - diff --git a/vue3/src/openapi/models/SourceImportFood.ts b/vue3/src/openapi/models/SourceImportFood.ts new file mode 100644 index 000000000..5a8968b2d --- /dev/null +++ b/vue3/src/openapi/models/SourceImportFood.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SourceImportFood + */ +export interface SourceImportFood { + /** + * + * @type {string} + * @memberof SourceImportFood + */ + name: string; +} + +/** + * Check if a given object implements the SourceImportFood interface. + */ +export function instanceOfSourceImportFood(value: object): value is SourceImportFood { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function SourceImportFoodFromJSON(json: any): SourceImportFood { + return SourceImportFoodFromJSONTyped(json, false); +} + +export function SourceImportFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportFood { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function SourceImportFoodToJSON(json: any): SourceImportFood { + return SourceImportFoodToJSONTyped(json, false); +} + +export function SourceImportFoodToJSONTyped(value?: SourceImportFood | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/vue3/src/openapi/models/SourceImportIngredient.ts b/vue3/src/openapi/models/SourceImportIngredient.ts new file mode 100644 index 000000000..89db0ff3e --- /dev/null +++ b/vue3/src/openapi/models/SourceImportIngredient.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SourceImportUnit } from './SourceImportUnit'; +import { + SourceImportUnitFromJSON, + SourceImportUnitFromJSONTyped, + SourceImportUnitToJSON, + SourceImportUnitToJSONTyped, +} from './SourceImportUnit'; +import type { SourceImportFood } from './SourceImportFood'; +import { + SourceImportFoodFromJSON, + SourceImportFoodFromJSONTyped, + SourceImportFoodToJSON, + SourceImportFoodToJSONTyped, +} from './SourceImportFood'; + +/** + * + * @export + * @interface SourceImportIngredient + */ +export interface SourceImportIngredient { + /** + * + * @type {number} + * @memberof SourceImportIngredient + */ + amount: number; + /** + * + * @type {SourceImportFood} + * @memberof SourceImportIngredient + */ + food: SourceImportFood; + /** + * + * @type {SourceImportUnit} + * @memberof SourceImportIngredient + */ + unit: SourceImportUnit; + /** + * + * @type {string} + * @memberof SourceImportIngredient + */ + note?: string; + /** + * + * @type {string} + * @memberof SourceImportIngredient + */ + originalText: string; +} + +/** + * Check if a given object implements the SourceImportIngredient interface. + */ +export function instanceOfSourceImportIngredient(value: object): value is SourceImportIngredient { + if (!('amount' in value) || value['amount'] === undefined) return false; + if (!('food' in value) || value['food'] === undefined) return false; + if (!('unit' in value) || value['unit'] === undefined) return false; + if (!('originalText' in value) || value['originalText'] === undefined) return false; + return true; +} + +export function SourceImportIngredientFromJSON(json: any): SourceImportIngredient { + return SourceImportIngredientFromJSONTyped(json, false); +} + +export function SourceImportIngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportIngredient { + if (json == null) { + return json; + } + return { + + 'amount': json['amount'], + 'food': SourceImportFoodFromJSON(json['food']), + 'unit': SourceImportUnitFromJSON(json['unit']), + 'note': json['note'] == null ? undefined : json['note'], + 'originalText': json['original_text'], + }; +} + +export function SourceImportIngredientToJSON(json: any): SourceImportIngredient { + return SourceImportIngredientToJSONTyped(json, false); +} + +export function SourceImportIngredientToJSONTyped(value?: SourceImportIngredient | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'amount': value['amount'], + 'food': SourceImportFoodToJSON(value['food']), + 'unit': SourceImportUnitToJSON(value['unit']), + 'note': value['note'], + 'original_text': value['originalText'], + }; +} + diff --git a/vue3/src/openapi/models/SourceImportKeyword.ts b/vue3/src/openapi/models/SourceImportKeyword.ts new file mode 100644 index 000000000..80c9579b3 --- /dev/null +++ b/vue3/src/openapi/models/SourceImportKeyword.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SourceImportKeyword + */ +export interface SourceImportKeyword { + /** + * + * @type {number} + * @memberof SourceImportKeyword + */ + id?: number | null; + /** + * + * @type {string} + * @memberof SourceImportKeyword + */ + label: string; + /** + * + * @type {string} + * @memberof SourceImportKeyword + */ + name: string; + /** + * + * @type {boolean} + * @memberof SourceImportKeyword + */ + importKeyword: boolean; +} + +/** + * Check if a given object implements the SourceImportKeyword interface. + */ +export function instanceOfSourceImportKeyword(value: object): value is SourceImportKeyword { + if (!('label' in value) || value['label'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('importKeyword' in value) || value['importKeyword'] === undefined) return false; + return true; +} + +export function SourceImportKeywordFromJSON(json: any): SourceImportKeyword { + return SourceImportKeywordFromJSONTyped(json, false); +} + +export function SourceImportKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportKeyword { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'label': json['label'], + 'name': json['name'], + 'importKeyword': json['import_keyword'], + }; +} + +export function SourceImportKeywordToJSON(json: any): SourceImportKeyword { + return SourceImportKeywordToJSONTyped(json, false); +} + +export function SourceImportKeywordToJSONTyped(value?: SourceImportKeyword | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'label': value['label'], + 'name': value['name'], + 'import_keyword': value['importKeyword'], + }; +} + diff --git a/vue3/src/openapi/models/SourceImportProperty.ts b/vue3/src/openapi/models/SourceImportProperty.ts new file mode 100644 index 000000000..80ec65c4f --- /dev/null +++ b/vue3/src/openapi/models/SourceImportProperty.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SourceImportPropertyType } from './SourceImportPropertyType'; +import { + SourceImportPropertyTypeFromJSON, + SourceImportPropertyTypeFromJSONTyped, + SourceImportPropertyTypeToJSON, + SourceImportPropertyTypeToJSONTyped, +} from './SourceImportPropertyType'; + +/** + * + * @export + * @interface SourceImportProperty + */ +export interface SourceImportProperty { + /** + * + * @type {SourceImportPropertyType} + * @memberof SourceImportProperty + */ + propertyType: SourceImportPropertyType; + /** + * + * @type {number} + * @memberof SourceImportProperty + */ + propertyAmount: number; +} + +/** + * Check if a given object implements the SourceImportProperty interface. + */ +export function instanceOfSourceImportProperty(value: object): value is SourceImportProperty { + if (!('propertyType' in value) || value['propertyType'] === undefined) return false; + if (!('propertyAmount' in value) || value['propertyAmount'] === undefined) return false; + return true; +} + +export function SourceImportPropertyFromJSON(json: any): SourceImportProperty { + return SourceImportPropertyFromJSONTyped(json, false); +} + +export function SourceImportPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportProperty { + if (json == null) { + return json; + } + return { + + 'propertyType': SourceImportPropertyTypeFromJSON(json['property_type']), + 'propertyAmount': json['property_amount'], + }; +} + +export function SourceImportPropertyToJSON(json: any): SourceImportProperty { + return SourceImportPropertyToJSONTyped(json, false); +} + +export function SourceImportPropertyToJSONTyped(value?: SourceImportProperty | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'property_type': SourceImportPropertyTypeToJSON(value['propertyType']), + 'property_amount': value['propertyAmount'], + }; +} + diff --git a/vue3/src/openapi/models/SourceImportPropertyType.ts b/vue3/src/openapi/models/SourceImportPropertyType.ts new file mode 100644 index 000000000..017916a09 --- /dev/null +++ b/vue3/src/openapi/models/SourceImportPropertyType.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SourceImportPropertyType + */ +export interface SourceImportPropertyType { + /** + * + * @type {number} + * @memberof SourceImportPropertyType + */ + id?: number; + /** + * + * @type {string} + * @memberof SourceImportPropertyType + */ + name: string; +} + +/** + * Check if a given object implements the SourceImportPropertyType interface. + */ +export function instanceOfSourceImportPropertyType(value: object): value is SourceImportPropertyType { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function SourceImportPropertyTypeFromJSON(json: any): SourceImportPropertyType { + return SourceImportPropertyTypeFromJSONTyped(json, false); +} + +export function SourceImportPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportPropertyType { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'], + }; +} + +export function SourceImportPropertyTypeToJSON(json: any): SourceImportPropertyType { + return SourceImportPropertyTypeToJSONTyped(json, false); +} + +export function SourceImportPropertyTypeToJSONTyped(value?: SourceImportPropertyType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + diff --git a/vue3/src/openapi/models/SourceImportRecipe.ts b/vue3/src/openapi/models/SourceImportRecipe.ts new file mode 100644 index 000000000..b76104fe4 --- /dev/null +++ b/vue3/src/openapi/models/SourceImportRecipe.ts @@ -0,0 +1,187 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SourceImportStep } from './SourceImportStep'; +import { + SourceImportStepFromJSON, + SourceImportStepFromJSONTyped, + SourceImportStepToJSON, + SourceImportStepToJSONTyped, +} from './SourceImportStep'; +import type { SourceImportProperty } from './SourceImportProperty'; +import { + SourceImportPropertyFromJSON, + SourceImportPropertyFromJSONTyped, + SourceImportPropertyToJSON, + SourceImportPropertyToJSONTyped, +} from './SourceImportProperty'; +import type { SourceImportKeyword } from './SourceImportKeyword'; +import { + SourceImportKeywordFromJSON, + SourceImportKeywordFromJSONTyped, + SourceImportKeywordToJSON, + SourceImportKeywordToJSONTyped, +} from './SourceImportKeyword'; + +/** + * + * @export + * @interface SourceImportRecipe + */ +export interface SourceImportRecipe { + /** + * + * @type {Array} + * @memberof SourceImportRecipe + */ + steps: Array; + /** + * + * @type {boolean} + * @memberof SourceImportRecipe + */ + internal: boolean; + /** + * + * @type {string} + * @memberof SourceImportRecipe + */ + sourceUrl: string; + /** + * + * @type {string} + * @memberof SourceImportRecipe + */ + name: string; + /** + * + * @type {string} + * @memberof SourceImportRecipe + */ + description: string; + /** + * + * @type {number} + * @memberof SourceImportRecipe + */ + servings: number; + /** + * + * @type {string} + * @memberof SourceImportRecipe + */ + servingsText: string; + /** + * + * @type {number} + * @memberof SourceImportRecipe + */ + workingTime: number; + /** + * + * @type {number} + * @memberof SourceImportRecipe + */ + waitingTime: number; + /** + * + * @type {string} + * @memberof SourceImportRecipe + */ + image: string; + /** + * + * @type {Array} + * @memberof SourceImportRecipe + */ + keywords: Array; + /** + * + * @type {Array} + * @memberof SourceImportRecipe + */ + properties: Array; +} + +/** + * Check if a given object implements the SourceImportRecipe interface. + */ +export function instanceOfSourceImportRecipe(value: object): value is SourceImportRecipe { + if (!('steps' in value) || value['steps'] === undefined) return false; + if (!('internal' in value) || value['internal'] === undefined) return false; + if (!('sourceUrl' in value) || value['sourceUrl'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + if (!('servings' in value) || value['servings'] === undefined) return false; + if (!('servingsText' in value) || value['servingsText'] === undefined) return false; + if (!('workingTime' in value) || value['workingTime'] === undefined) return false; + if (!('waitingTime' in value) || value['waitingTime'] === undefined) return false; + if (!('image' in value) || value['image'] === undefined) return false; + if (!('keywords' in value) || value['keywords'] === undefined) return false; + if (!('properties' in value) || value['properties'] === undefined) return false; + return true; +} + +export function SourceImportRecipeFromJSON(json: any): SourceImportRecipe { + return SourceImportRecipeFromJSONTyped(json, false); +} + +export function SourceImportRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportRecipe { + if (json == null) { + return json; + } + return { + + 'steps': ((json['steps'] as Array).map(SourceImportStepFromJSON)), + 'internal': json['internal'], + 'sourceUrl': json['source_url'], + 'name': json['name'], + 'description': json['description'], + 'servings': json['servings'], + 'servingsText': json['servings_text'], + 'workingTime': json['working_time'], + 'waitingTime': json['waiting_time'], + 'image': json['image'], + 'keywords': ((json['keywords'] as Array).map(SourceImportKeywordFromJSON)), + 'properties': ((json['properties'] as Array).map(SourceImportPropertyFromJSON)), + }; +} + +export function SourceImportRecipeToJSON(json: any): SourceImportRecipe { + return SourceImportRecipeToJSONTyped(json, false); +} + +export function SourceImportRecipeToJSONTyped(value?: SourceImportRecipe | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'steps': ((value['steps'] as Array).map(SourceImportStepToJSON)), + 'internal': value['internal'], + 'source_url': value['sourceUrl'], + 'name': value['name'], + 'description': value['description'], + 'servings': value['servings'], + 'servings_text': value['servingsText'], + 'working_time': value['workingTime'], + 'waiting_time': value['waitingTime'], + 'image': value['image'], + 'keywords': ((value['keywords'] as Array).map(SourceImportKeywordToJSON)), + 'properties': ((value['properties'] as Array).map(SourceImportPropertyToJSON)), + }; +} + diff --git a/vue3/src/openapi/models/SourceImportStep.ts b/vue3/src/openapi/models/SourceImportStep.ts new file mode 100644 index 000000000..facf5407b --- /dev/null +++ b/vue3/src/openapi/models/SourceImportStep.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SourceImportIngredient } from './SourceImportIngredient'; +import { + SourceImportIngredientFromJSON, + SourceImportIngredientFromJSONTyped, + SourceImportIngredientToJSON, + SourceImportIngredientToJSONTyped, +} from './SourceImportIngredient'; + +/** + * + * @export + * @interface SourceImportStep + */ +export interface SourceImportStep { + /** + * + * @type {string} + * @memberof SourceImportStep + */ + instruction: string; + /** + * + * @type {Array} + * @memberof SourceImportStep + */ + ingredients: Array; + /** + * + * @type {boolean} + * @memberof SourceImportStep + */ + showIngredientsTable: boolean; +} + +/** + * Check if a given object implements the SourceImportStep interface. + */ +export function instanceOfSourceImportStep(value: object): value is SourceImportStep { + if (!('instruction' in value) || value['instruction'] === undefined) return false; + if (!('ingredients' in value) || value['ingredients'] === undefined) return false; + if (!('showIngredientsTable' in value) || value['showIngredientsTable'] === undefined) return false; + return true; +} + +export function SourceImportStepFromJSON(json: any): SourceImportStep { + return SourceImportStepFromJSONTyped(json, false); +} + +export function SourceImportStepFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportStep { + if (json == null) { + return json; + } + return { + + 'instruction': json['instruction'], + 'ingredients': ((json['ingredients'] as Array).map(SourceImportIngredientFromJSON)), + 'showIngredientsTable': json['show_ingredients_table'], + }; +} + +export function SourceImportStepToJSON(json: any): SourceImportStep { + return SourceImportStepToJSONTyped(json, false); +} + +export function SourceImportStepToJSONTyped(value?: SourceImportStep | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'instruction': value['instruction'], + 'ingredients': ((value['ingredients'] as Array).map(SourceImportIngredientToJSON)), + 'show_ingredients_table': value['showIngredientsTable'], + }; +} + diff --git a/vue3/src/openapi/models/SourceImportUnit.ts b/vue3/src/openapi/models/SourceImportUnit.ts new file mode 100644 index 000000000..973e2b5d0 --- /dev/null +++ b/vue3/src/openapi/models/SourceImportUnit.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tandoor + * Tandoor API Docs + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SourceImportUnit + */ +export interface SourceImportUnit { + /** + * + * @type {string} + * @memberof SourceImportUnit + */ + name: string; +} + +/** + * Check if a given object implements the SourceImportUnit interface. + */ +export function instanceOfSourceImportUnit(value: object): value is SourceImportUnit { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function SourceImportUnitFromJSON(json: any): SourceImportUnit { + return SourceImportUnitFromJSONTyped(json, false); +} + +export function SourceImportUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportUnit { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function SourceImportUnitToJSON(json: any): SourceImportUnit { + return SourceImportUnitToJSONTyped(json, false); +} + +export function SourceImportUnitToJSONTyped(value?: SourceImportUnit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/vue3/src/openapi/models/StepRequest.ts b/vue3/src/openapi/models/StepRequest.ts deleted file mode 100644 index 182b333d0..000000000 --- a/vue3/src/openapi/models/StepRequest.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { IngredientRequest } from './IngredientRequest'; -import { - IngredientRequestFromJSON, - IngredientRequestFromJSONTyped, - IngredientRequestToJSON, -} from './IngredientRequest'; -import type { UserFileViewRequest } from './UserFileViewRequest'; -import { - UserFileViewRequestFromJSON, - UserFileViewRequestFromJSONTyped, - UserFileViewRequestToJSON, -} from './UserFileViewRequest'; - -/** - * Adds nested create feature - * @export - * @interface StepRequest - */ -export interface StepRequest { - /** - * - * @type {string} - * @memberof StepRequest - */ - name?: string; - /** - * - * @type {string} - * @memberof StepRequest - */ - instruction?: string; - /** - * - * @type {Array} - * @memberof StepRequest - */ - ingredients: Array; - /** - * - * @type {number} - * @memberof StepRequest - */ - time?: number; - /** - * - * @type {number} - * @memberof StepRequest - */ - order?: number; - /** - * - * @type {boolean} - * @memberof StepRequest - */ - showAsHeader?: boolean; - /** - * - * @type {UserFileViewRequest} - * @memberof StepRequest - */ - file?: UserFileViewRequest; - /** - * - * @type {number} - * @memberof StepRequest - */ - stepRecipe?: number; - /** - * - * @type {boolean} - * @memberof StepRequest - */ - showIngredientsTable?: boolean; - /** - * - * @type {number} - * @memberof StepRequest - */ - id?: number; -} - -/** - * Check if a given object implements the StepRequest interface. - */ -export function instanceOfStepRequest(value: object): boolean { - if (!('ingredients' in value)) return false; - return true; -} - -export function StepRequestFromJSON(json: any): StepRequest { - return StepRequestFromJSONTyped(json, false); -} - -export function StepRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StepRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'instruction': json['instruction'] == null ? undefined : json['instruction'], - 'ingredients': ((json['ingredients'] as Array).map(IngredientRequestFromJSON)), - 'time': json['time'] == null ? undefined : json['time'], - 'order': json['order'] == null ? undefined : json['order'], - 'showAsHeader': json['show_as_header'] == null ? undefined : json['show_as_header'], - 'file': json['file'] == null ? undefined : UserFileViewRequestFromJSON(json['file']), - 'stepRecipe': json['step_recipe'] == null ? undefined : json['step_recipe'], - 'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function StepRequestToJSON(value?: StepRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'instruction': value['instruction'], - 'ingredients': ((value['ingredients'] as Array).map(IngredientRequestToJSON)), - 'time': value['time'], - 'order': value['order'], - 'show_as_header': value['showAsHeader'], - 'file': UserFileViewRequestToJSON(value['file']), - 'step_recipe': value['stepRecipe'], - 'show_ingredients_table': value['showIngredientsTable'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/StorageRequest.ts b/vue3/src/openapi/models/StorageRequest.ts deleted file mode 100644 index f08142f88..000000000 --- a/vue3/src/openapi/models/StorageRequest.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { MethodEnum } from './MethodEnum'; -import { - MethodEnumFromJSON, - MethodEnumFromJSONTyped, - MethodEnumToJSON, -} from './MethodEnum'; - -/** - * - * @export - * @interface StorageRequest - */ -export interface StorageRequest { - /** - * - * @type {string} - * @memberof StorageRequest - */ - name: string; - /** - * - * @type {MethodEnum} - * @memberof StorageRequest - */ - method?: MethodEnum; - /** - * - * @type {string} - * @memberof StorageRequest - */ - username?: string; - /** - * - * @type {string} - * @memberof StorageRequest - */ - password?: string; - /** - * - * @type {string} - * @memberof StorageRequest - */ - token?: string; - /** - * - * @type {number} - * @memberof StorageRequest - */ - id?: number; -} - -/** - * Check if a given object implements the StorageRequest interface. - */ -export function instanceOfStorageRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function StorageRequestFromJSON(json: any): StorageRequest { - return StorageRequestFromJSONTyped(json, false); -} - -export function StorageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StorageRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'method': json['method'] == null ? undefined : MethodEnumFromJSON(json['method']), - 'username': json['username'] == null ? undefined : json['username'], - 'password': json['password'] == null ? undefined : json['password'], - 'token': json['token'] == null ? undefined : json['token'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function StorageRequestToJSON(value?: StorageRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'method': MethodEnumToJSON(value['method']), - 'username': value['username'], - 'password': value['password'], - 'token': value['token'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/SupermarketCategoryRelationRequest.ts b/vue3/src/openapi/models/SupermarketCategoryRelationRequest.ts deleted file mode 100644 index f47f4a30b..000000000 --- a/vue3/src/openapi/models/SupermarketCategoryRelationRequest.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest'; -import { - SupermarketCategoryRequestFromJSON, - SupermarketCategoryRequestFromJSONTyped, - SupermarketCategoryRequestToJSON, -} from './SupermarketCategoryRequest'; - -/** - * Adds nested create feature - * @export - * @interface SupermarketCategoryRelationRequest - */ -export interface SupermarketCategoryRelationRequest { - /** - * - * @type {SupermarketCategoryRequest} - * @memberof SupermarketCategoryRelationRequest - */ - category: SupermarketCategoryRequest; - /** - * - * @type {number} - * @memberof SupermarketCategoryRelationRequest - */ - supermarket: number; - /** - * - * @type {number} - * @memberof SupermarketCategoryRelationRequest - */ - order?: number; - /** - * - * @type {number} - * @memberof SupermarketCategoryRelationRequest - */ - id?: number; -} - -/** - * Check if a given object implements the SupermarketCategoryRelationRequest interface. - */ -export function instanceOfSupermarketCategoryRelationRequest(value: object): boolean { - if (!('category' in value)) return false; - if (!('supermarket' in value)) return false; - return true; -} - -export function SupermarketCategoryRelationRequestFromJSON(json: any): SupermarketCategoryRelationRequest { - return SupermarketCategoryRelationRequestFromJSONTyped(json, false); -} - -export function SupermarketCategoryRelationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryRelationRequest { - if (json == null) { - return json; - } - return { - - 'category': SupermarketCategoryRequestFromJSON(json['category']), - 'supermarket': json['supermarket'], - 'order': json['order'] == null ? undefined : json['order'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function SupermarketCategoryRelationRequestToJSON(value?: SupermarketCategoryRelationRequest | null): any { - if (value == null) { - return value; - } - return { - - 'category': SupermarketCategoryRequestToJSON(value['category']), - 'supermarket': value['supermarket'], - 'order': value['order'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/SupermarketCategoryRequest.ts b/vue3/src/openapi/models/SupermarketCategoryRequest.ts deleted file mode 100644 index 0e82e6dbc..000000000 --- a/vue3/src/openapi/models/SupermarketCategoryRequest.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface SupermarketCategoryRequest - */ -export interface SupermarketCategoryRequest { - /** - * - * @type {string} - * @memberof SupermarketCategoryRequest - */ - name: string; - /** - * - * @type {string} - * @memberof SupermarketCategoryRequest - */ - description?: string; - /** - * - * @type {number} - * @memberof SupermarketCategoryRequest - */ - id?: number; -} - -/** - * Check if a given object implements the SupermarketCategoryRequest interface. - */ -export function instanceOfSupermarketCategoryRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function SupermarketCategoryRequestFromJSON(json: any): SupermarketCategoryRequest { - return SupermarketCategoryRequestFromJSONTyped(json, false); -} - -export function SupermarketCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function SupermarketCategoryRequestToJSON(value?: SupermarketCategoryRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/SupermarketCategoryToSupermarketInner.ts b/vue3/src/openapi/models/SupermarketCategoryToSupermarketInner.ts deleted file mode 100644 index 84bcc50b9..000000000 --- a/vue3/src/openapi/models/SupermarketCategoryToSupermarketInner.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SupermarketCategoryToSupermarketInnerCategory } from './SupermarketCategoryToSupermarketInnerCategory'; -import { - SupermarketCategoryToSupermarketInnerCategoryFromJSON, - SupermarketCategoryToSupermarketInnerCategoryFromJSONTyped, - SupermarketCategoryToSupermarketInnerCategoryToJSON, -} from './SupermarketCategoryToSupermarketInnerCategory'; - -/** - * - * @export - * @interface SupermarketCategoryToSupermarketInner - */ -export interface SupermarketCategoryToSupermarketInner { - /** - * - * @type {number} - * @memberof SupermarketCategoryToSupermarketInner - */ - readonly id?: number; - /** - * - * @type {SupermarketCategoryToSupermarketInnerCategory} - * @memberof SupermarketCategoryToSupermarketInner - */ - category: SupermarketCategoryToSupermarketInnerCategory; - /** - * - * @type {number} - * @memberof SupermarketCategoryToSupermarketInner - */ - supermarket: number; - /** - * - * @type {number} - * @memberof SupermarketCategoryToSupermarketInner - */ - order?: number; -} - -/** - * Check if a given object implements the SupermarketCategoryToSupermarketInner interface. - */ -export function instanceOfSupermarketCategoryToSupermarketInner(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "category" in value; - isInstance = isInstance && "supermarket" in value; - - return isInstance; -} - -export function SupermarketCategoryToSupermarketInnerFromJSON(json: any): SupermarketCategoryToSupermarketInner { - return SupermarketCategoryToSupermarketInnerFromJSONTyped(json, false); -} - -export function SupermarketCategoryToSupermarketInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryToSupermarketInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'category': SupermarketCategoryToSupermarketInnerCategoryFromJSON(json['category']), - 'supermarket': json['supermarket'], - 'order': !exists(json, 'order') ? undefined : json['order'], - }; -} - -export function SupermarketCategoryToSupermarketInnerToJSON(value?: SupermarketCategoryToSupermarketInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'category': SupermarketCategoryToSupermarketInnerCategoryToJSON(value.category), - 'supermarket': value.supermarket, - 'order': value.order, - }; -} - diff --git a/vue3/src/openapi/models/SupermarketCategoryToSupermarketInnerCategory.ts b/vue3/src/openapi/models/SupermarketCategoryToSupermarketInnerCategory.ts deleted file mode 100644 index be4d70013..000000000 --- a/vue3/src/openapi/models/SupermarketCategoryToSupermarketInnerCategory.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SupermarketCategoryToSupermarketInnerCategory - */ -export interface SupermarketCategoryToSupermarketInnerCategory { - /** - * - * @type {number} - * @memberof SupermarketCategoryToSupermarketInnerCategory - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof SupermarketCategoryToSupermarketInnerCategory - */ - name: string; - /** - * - * @type {string} - * @memberof SupermarketCategoryToSupermarketInnerCategory - */ - description?: string | null; -} - -/** - * Check if a given object implements the SupermarketCategoryToSupermarketInnerCategory interface. - */ -export function instanceOfSupermarketCategoryToSupermarketInnerCategory(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function SupermarketCategoryToSupermarketInnerCategoryFromJSON(json: any): SupermarketCategoryToSupermarketInnerCategory { - return SupermarketCategoryToSupermarketInnerCategoryFromJSONTyped(json, false); -} - -export function SupermarketCategoryToSupermarketInnerCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryToSupermarketInnerCategory { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function SupermarketCategoryToSupermarketInnerCategoryToJSON(value?: SupermarketCategoryToSupermarketInnerCategory | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - }; -} - diff --git a/vue3/src/openapi/models/SupermarketRequest.ts b/vue3/src/openapi/models/SupermarketRequest.ts deleted file mode 100644 index db3b08b2a..000000000 --- a/vue3/src/openapi/models/SupermarketRequest.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface SupermarketRequest - */ -export interface SupermarketRequest { - /** - * - * @type {string} - * @memberof SupermarketRequest - */ - name: string; - /** - * - * @type {string} - * @memberof SupermarketRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof SupermarketRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof SupermarketRequest - */ - id?: number; -} - -/** - * Check if a given object implements the SupermarketRequest interface. - */ -export function instanceOfSupermarketRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function SupermarketRequestFromJSON(json: any): SupermarketRequest { - return SupermarketRequestFromJSONTyped(json, false); -} - -export function SupermarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function SupermarketRequestToJSON(value?: SupermarketRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'description': value['description'], - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/SyncRequest.ts b/vue3/src/openapi/models/SyncRequest.ts deleted file mode 100644 index 15607c282..000000000 --- a/vue3/src/openapi/models/SyncRequest.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface SyncRequest - */ -export interface SyncRequest { - /** - * - * @type {number} - * @memberof SyncRequest - */ - storage: number; - /** - * - * @type {string} - * @memberof SyncRequest - */ - path?: string; - /** - * - * @type {boolean} - * @memberof SyncRequest - */ - active?: boolean; - /** - * - * @type {Date} - * @memberof SyncRequest - */ - lastChecked?: Date; - /** - * - * @type {number} - * @memberof SyncRequest - */ - id?: number; -} - -/** - * Check if a given object implements the SyncRequest interface. - */ -export function instanceOfSyncRequest(value: object): boolean { - if (!('storage' in value)) return false; - return true; -} - -export function SyncRequestFromJSON(json: any): SyncRequest { - return SyncRequestFromJSONTyped(json, false); -} - -export function SyncRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncRequest { - if (json == null) { - return json; - } - return { - - 'storage': json['storage'], - 'path': json['path'] == null ? undefined : json['path'], - 'active': json['active'] == null ? undefined : json['active'], - 'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])), - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function SyncRequestToJSON(value?: SyncRequest | null): any { - if (value == null) { - return value; - } - return { - - 'storage': value['storage'], - 'path': value['path'], - 'active': value['active'], - 'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()), - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/TypeEnum.ts b/vue3/src/openapi/models/TypeEnum.ts deleted file mode 100644 index f448ef895..000000000 --- a/vue3/src/openapi/models/TypeEnum.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * * `FOOD_ALIAS` - Food Alias - * * `UNIT_ALIAS` - Unit Alias - * * `KEYWORD_ALIAS` - Keyword Alias - * * `DESCRIPTION_REPLACE` - Description Replace - * * `INSTRUCTION_REPLACE` - Instruction Replace - * * `NEVER_UNIT` - Never Unit - * * `TRANSPOSE_WORDS` - Transpose Words - * * `FOOD_REPLACE` - Food Replace - * * `UNIT_REPLACE` - Unit Replace - * * `NAME_REPLACE` - Name Replace - * @export - */ -export const TypeEnum = { - FoodAlias: 'FOOD_ALIAS', - UnitAlias: 'UNIT_ALIAS', - KeywordAlias: 'KEYWORD_ALIAS', - DescriptionReplace: 'DESCRIPTION_REPLACE', - InstructionReplace: 'INSTRUCTION_REPLACE', - NeverUnit: 'NEVER_UNIT', - TransposeWords: 'TRANSPOSE_WORDS', - FoodReplace: 'FOOD_REPLACE', - UnitReplace: 'UNIT_REPLACE', - NameReplace: 'NAME_REPLACE' -} as const; -export type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum]; - - -export function instanceOfTypeEnum(value: any): boolean { - for (const key in TypeEnum) { - if (Object.prototype.hasOwnProperty.call(TypeEnum, key)) { - if (TypeEnum[key as keyof typeof TypeEnum] === value) { - return true; - } - } - } - return false; -} - -export function TypeEnumFromJSON(json: any): TypeEnum { - return TypeEnumFromJSONTyped(json, false); -} - -export function TypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TypeEnum { - return json as TypeEnum; -} - -export function TypeEnumToJSON(value?: TypeEnum | null): any { - return value as any; -} - -export function TypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TypeEnum { - return value as TypeEnum; -} - diff --git a/vue3/src/openapi/models/UnitConversionBaseUnit.ts b/vue3/src/openapi/models/UnitConversionBaseUnit.ts deleted file mode 100644 index a4f6e1b7d..000000000 --- a/vue3/src/openapi/models/UnitConversionBaseUnit.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Django Recipes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface UnitConversionBaseUnit - */ -export interface UnitConversionBaseUnit { - /** - * - * @type {number} - * @memberof UnitConversionBaseUnit - */ - readonly id?: number; - /** - * - * @type {string} - * @memberof UnitConversionBaseUnit - */ - name: string; - /** - * - * @type {string} - * @memberof UnitConversionBaseUnit - */ - pluralName?: string | null; - /** - * - * @type {string} - * @memberof UnitConversionBaseUnit - */ - description?: string | null; - /** - * - * @type {string} - * @memberof UnitConversionBaseUnit - */ - baseUnit?: string | null; - /** - * - * @type {string} - * @memberof UnitConversionBaseUnit - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the UnitConversionBaseUnit interface. - */ -export function instanceOfUnitConversionBaseUnit(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function UnitConversionBaseUnitFromJSON(json: any): UnitConversionBaseUnit { - return UnitConversionBaseUnitFromJSONTyped(json, false); -} - -export function UnitConversionBaseUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnitConversionBaseUnit { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'], - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - }; -} - -export function UnitConversionBaseUnitToJSON(value?: UnitConversionBaseUnit | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'plural_name': value.pluralName, - 'description': value.description, - 'base_unit': value.baseUnit, - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/vue3/src/openapi/models/UnitConversionRequest.ts b/vue3/src/openapi/models/UnitConversionRequest.ts deleted file mode 100644 index 0f4c50a4d..000000000 --- a/vue3/src/openapi/models/UnitConversionRequest.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FoodRequest } from './FoodRequest'; -import { - FoodRequestFromJSON, - FoodRequestFromJSONTyped, - FoodRequestToJSON, -} from './FoodRequest'; -import type { UnitRequest } from './UnitRequest'; -import { - UnitRequestFromJSON, - UnitRequestFromJSONTyped, - UnitRequestToJSON, -} from './UnitRequest'; - -/** - * Adds nested create feature - * @export - * @interface UnitConversionRequest - */ -export interface UnitConversionRequest { - /** - * - * @type {number} - * @memberof UnitConversionRequest - */ - baseAmount: number; - /** - * - * @type {UnitRequest} - * @memberof UnitConversionRequest - */ - baseUnit: UnitRequest; - /** - * - * @type {number} - * @memberof UnitConversionRequest - */ - convertedAmount: number; - /** - * - * @type {UnitRequest} - * @memberof UnitConversionRequest - */ - convertedUnit: UnitRequest; - /** - * - * @type {FoodRequest} - * @memberof UnitConversionRequest - */ - food?: FoodRequest; - /** - * - * @type {string} - * @memberof UnitConversionRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof UnitConversionRequest - */ - id?: number; -} - -/** - * Check if a given object implements the UnitConversionRequest interface. - */ -export function instanceOfUnitConversionRequest(value: object): boolean { - if (!('baseAmount' in value)) return false; - if (!('baseUnit' in value)) return false; - if (!('convertedAmount' in value)) return false; - if (!('convertedUnit' in value)) return false; - return true; -} - -export function UnitConversionRequestFromJSON(json: any): UnitConversionRequest { - return UnitConversionRequestFromJSONTyped(json, false); -} - -export function UnitConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnitConversionRequest { - if (json == null) { - return json; - } - return { - - 'baseAmount': json['base_amount'], - 'baseUnit': UnitRequestFromJSON(json['base_unit']), - 'convertedAmount': json['converted_amount'], - 'convertedUnit': UnitRequestFromJSON(json['converted_unit']), - 'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']), - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function UnitConversionRequestToJSON(value?: UnitConversionRequest | null): any { - if (value == null) { - return value; - } - return { - - 'base_amount': value['baseAmount'], - 'base_unit': UnitRequestToJSON(value['baseUnit']), - 'converted_amount': value['convertedAmount'], - 'converted_unit': UnitRequestToJSON(value['convertedUnit']), - 'food': FoodRequestToJSON(value['food']), - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/UnitRequest.ts b/vue3/src/openapi/models/UnitRequest.ts deleted file mode 100644 index 63cb57bcf..000000000 --- a/vue3/src/openapi/models/UnitRequest.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Moves `UniqueValidator`'s from the validation stage to the save stage. - * It solves the problem with nested validation for unique fields on update. - * - * If you want more details, you can read related issues and articles: - * https://github.com/beda-software/drf-writable-nested/issues/1 - * http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers - * - * Example of usage: - * ``` - * class Child(models.Model): - * field = models.CharField(unique=True) - * - * - * class Parent(models.Model): - * child = models.ForeignKey('Child') - * - * - * class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): - * class Meta: - * model = Child - * - * - * class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): - * child = ChildSerializer() - * - * class Meta: - * model = Parent - * ``` - * - * Note: `UniqueFieldsMixin` must be applied only on the serializer - * which has unique fields. - * - * Note: When you are using both mixins - * (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) - * you should put `UniqueFieldsMixin` ahead. - * @export - * @interface UnitRequest - */ -export interface UnitRequest { - /** - * - * @type {string} - * @memberof UnitRequest - */ - name: string; - /** - * - * @type {string} - * @memberof UnitRequest - */ - pluralName?: string; - /** - * - * @type {string} - * @memberof UnitRequest - */ - description?: string; - /** - * - * @type {string} - * @memberof UnitRequest - */ - baseUnit?: string; - /** - * - * @type {string} - * @memberof UnitRequest - */ - openDataSlug?: string; - /** - * - * @type {number} - * @memberof UnitRequest - */ - id?: number; -} - -/** - * Check if a given object implements the UnitRequest interface. - */ -export function instanceOfUnitRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function UnitRequestFromJSON(json: any): UnitRequest { - return UnitRequestFromJSONTyped(json, false); -} - -export function UnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnitRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], - 'description': json['description'] == null ? undefined : json['description'], - 'baseUnit': json['base_unit'] == null ? undefined : json['base_unit'], - 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function UnitRequestToJSON(value?: UnitRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'plural_name': value['pluralName'], - 'description': value['description'], - 'base_unit': value['baseUnit'], - 'open_data_slug': value['openDataSlug'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/UserFileViewRequest.ts b/vue3/src/openapi/models/UserFileViewRequest.ts deleted file mode 100644 index 5456814c5..000000000 --- a/vue3/src/openapi/models/UserFileViewRequest.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface UserFileViewRequest - */ -export interface UserFileViewRequest { - /** - * - * @type {string} - * @memberof UserFileViewRequest - */ - name: string; - /** - * - * @type {number} - * @memberof UserFileViewRequest - */ - id?: number; -} - -/** - * Check if a given object implements the UserFileViewRequest interface. - */ -export function instanceOfUserFileViewRequest(value: object): boolean { - if (!('name' in value)) return false; - return true; -} - -export function UserFileViewRequestFromJSON(json: any): UserFileViewRequest { - return UserFileViewRequestFromJSONTyped(json, false); -} - -export function UserFileViewRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFileViewRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function UserFileViewRequestToJSON(value?: UserFileViewRequest | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/UserRequest.ts b/vue3/src/openapi/models/UserRequest.ts deleted file mode 100644 index 11d98d519..000000000 --- a/vue3/src/openapi/models/UserRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Adds nested create feature - * @export - * @interface UserRequest - */ -export interface UserRequest { - /** - * - * @type {string} - * @memberof UserRequest - */ - firstName?: string; - /** - * - * @type {string} - * @memberof UserRequest - */ - lastName?: string; - /** - * - * @type {number} - * @memberof UserRequest - */ - id?: number; -} - -/** - * Check if a given object implements the UserRequest interface. - */ -export function instanceOfUserRequest(value: object): boolean { - return true; -} - -export function UserRequestFromJSON(json: any): UserRequest { - return UserRequestFromJSONTyped(json, false); -} - -export function UserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRequest { - if (json == null) { - return json; - } - return { - - 'firstName': json['first_name'] == null ? undefined : json['first_name'], - 'lastName': json['last_name'] == null ? undefined : json['last_name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function UserRequestToJSON(value?: UserRequest | null): any { - if (value == null) { - return value; - } - return { - - 'first_name': value['firstName'], - 'last_name': value['lastName'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/ViewLogRequest.ts b/vue3/src/openapi/models/ViewLogRequest.ts deleted file mode 100644 index 3f5ba3cef..000000000 --- a/vue3/src/openapi/models/ViewLogRequest.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ViewLogRequest - */ -export interface ViewLogRequest { - /** - * - * @type {number} - * @memberof ViewLogRequest - */ - recipe: number; - /** - * - * @type {number} - * @memberof ViewLogRequest - */ - id?: number; -} - -/** - * Check if a given object implements the ViewLogRequest interface. - */ -export function instanceOfViewLogRequest(value: object): boolean { - if (!('recipe' in value)) return false; - return true; -} - -export function ViewLogRequestFromJSON(json: any): ViewLogRequest { - return ViewLogRequestFromJSONTyped(json, false); -} - -export function ViewLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ViewLogRequest { - if (json == null) { - return json; - } - return { - - 'recipe': json['recipe'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - -export function ViewLogRequestToJSON(value?: ViewLogRequest | null): any { - if (value == null) { - return value; - } - return { - - 'recipe': value['recipe'], - 'id': value['id'], - }; -} - diff --git a/vue3/src/openapi/models/index.ts b/vue3/src/openapi/models/index.ts index 715c40c7f..b5f07cced 100644 --- a/vue3/src/openapi/models/index.ts +++ b/vue3/src/openapi/models/index.ts @@ -120,6 +120,8 @@ export * from './Recipe'; export * from './RecipeBook'; export * from './RecipeBookEntry'; export * from './RecipeFlat'; +export * from './RecipeFromSource'; +export * from './RecipeFromSourceResponse'; export * from './RecipeImage'; export * from './RecipeOverview'; export * from './RecipeShoppingUpdate'; @@ -129,6 +131,14 @@ export * from './ShareLink'; export * from './ShoppingListEntry'; export * from './ShoppingListEntryBulk'; export * from './ShoppingListRecipe'; +export * from './SourceImportFood'; +export * from './SourceImportIngredient'; +export * from './SourceImportKeyword'; +export * from './SourceImportProperty'; +export * from './SourceImportPropertyType'; +export * from './SourceImportRecipe'; +export * from './SourceImportStep'; +export * from './SourceImportUnit'; export * from './Space'; export * from './SpaceNavTextColorEnum'; export * from './SpaceThemeEnum'; diff --git a/vue3/src/openapi/templates/customModelFunctions.mustache b/vue3/src/openapi/templates/customModelFunctions.mustache deleted file mode 100644 index cf17f265f..000000000 --- a/vue3/src/openapi/templates/customModelFunctions.mustache +++ /dev/null @@ -1,12 +0,0 @@ -// ---------------------------------------------------------------------- -// Custom model functions added by custom openapi-generator template -// ---------------------------------------------------------------------- -import {ApiApi, Api{{classname}}ListRequest, Paginated{{classname}}List} from "@/openapi"; - -/** - * query list endpoint using the provided request parameters - */ -export function list(requestParameters: Api{{classname}}ListRequest = {}): Promise { - const api = new ApiApi() - return api.api{{classname}}List(requestParameters) -} \ No newline at end of file diff --git a/vue3/src/openapi/templates/modelGeneric.mustache b/vue3/src/openapi/templates/modelGeneric.mustache deleted file mode 100644 index 321e1593c..000000000 --- a/vue3/src/openapi/templates/modelGeneric.mustache +++ /dev/null @@ -1,172 +0,0 @@ -import { mapValues } from '../runtime{{importFileExtension}}'; -{{#hasImports}} -{{#tsImports}} -import type { {{{classname}}} } from './{{filename}}{{importFileExtension}}'; -import { - {{classname}}FromJSON, - {{classname}}FromJSONTyped, - {{classname}}ToJSON, -} from './{{filename}}{{importFileExtension}}'; -{{/tsImports}} - -{{/hasImports}} -{{#discriminator}} -{{#discriminator.mappedModels}} -import { {{modelName}}FromJSONTyped } from './{{modelName}}{{importFileExtension}}'; -{{/discriminator.mappedModels}} -{{/discriminator}} -{{>modelGenericInterfaces}} - -/** - * Check if a given object implements the {{classname}} interface. - */ -export function instanceOf{{classname}}(value: object): value is {{classname}} { - {{#vars}} - {{#required}} - if (!('{{name}}' in value) || value['{{name}}'] === undefined) return false; - {{/required}} - {{/vars}} - return true; -} - -export function {{classname}}FromJSON(json: any): {{classname}} { - return {{classname}}FromJSONTyped(json, false); -} - -export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boolean): {{classname}} { - {{#hasVars}} - if (json == null) { - return json; - } -{{#discriminator}} - if (!ignoreDiscriminator) { -{{#discriminator.mappedModels}} - if (json['{{discriminator.propertyBaseName}}'] === '{{mappingName}}') { - return {{modelName}}FromJSONTyped(json, true); - } -{{/discriminator.mappedModels}} - } -{{/discriminator}} - return { - {{#parent}}...{{{.}}}FromJSONTyped(json, ignoreDiscriminator),{{/parent}} - {{#additionalPropertiesType}} - ...json, - {{/additionalPropertiesType}} - {{#vars}} - {{#isPrimitiveType}} - {{#isDateType}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Date(json['{{baseName}}'])), - {{/isDateType}} - {{#isDateTimeType}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Date(json['{{baseName}}'])), - {{/isDateTimeType}} - {{^isDateType}} - {{^isDateTimeType}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}json['{{baseName}}'], - {{/isDateTimeType}} - {{/isDateType}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{#isArray}} - {{#uniqueItems}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Set((json['{{baseName}}'] as Array).map({{#items}}{{datatype}}{{/items}}FromJSON))), - {{/uniqueItems}} - {{^uniqueItems}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}(json['{{baseName}}'] as Array).map({{#items}}{{datatype}}{{/items}}FromJSON)), - {{/uniqueItems}} - {{/isArray}} - {{#isMap}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}mapValues(json['{{baseName}}'], {{#items}}{{datatype}}{{/items}}FromJSON)), - {{/isMap}} - {{^isArray}} - {{^isMap}} - {{^isFreeFormObject}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}{{datatype}}FromJSON(json['{{baseName}}']), - {{/isFreeFormObject}} - {{#isFreeFormObject}} - '{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}json['{{baseName}}'], - {{/isFreeFormObject}} - {{/isMap}} - {{/isArray}} - {{/isPrimitiveType}} - {{/vars}} - }; - {{/hasVars}} - {{^hasVars}} - return json; - {{/hasVars}} -} - -export function {{classname}}ToJSON(value?: {{#hasReadOnly}}Omit<{{classname}}, {{#readOnlyVars}}'{{baseName}}'{{^-last}}|{{/-last}}{{/readOnlyVars}}>{{/hasReadOnly}}{{^hasReadOnly}}{{classname}}{{/hasReadOnly}} | null): any { - {{#hasVars}} - if (value == null) { - return value; - } - return { - {{#parent}}...{{{.}}}ToJSON(value),{{/parent}} - {{#additionalPropertiesType}} - ...value, - {{/additionalPropertiesType}} - {{#vars}} - {{^isReadOnly}} - {{#isPrimitiveType}} - {{#isDateType}} - '{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}(value['{{name}}']{{#isNullable}} as any{{/isNullable}}).toISOString().substring(0,10)), - {{/isDateType}} - {{#isDateTimeType}} - '{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}(value['{{name}}']{{#isNullable}} as any{{/isNullable}}).toISOString()), - {{/isDateTimeType}} - {{#isArray}} - '{{baseName}}': {{#uniqueItems}}{{^required}}value['{{name}}'] == null ? undefined : {{/required}}{{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}Array.from(value['{{name}}'] as Set){{/uniqueItems}}{{^uniqueItems}}value['{{name}}']{{/uniqueItems}}, - {{/isArray}} - {{^isDateType}} - {{^isDateTimeType}} - {{^isArray}} - '{{baseName}}': value['{{name}}'], - {{/isArray}} - {{/isDateTimeType}} - {{/isDateType}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{#isArray}} - {{#uniqueItems}} - '{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}Array.from(value['{{name}}'] as Set).map({{#items}}{{datatype}}{{/items}}ToJSON)), - {{/uniqueItems}} - {{^uniqueItems}} - '{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}(value['{{name}}'] as Array).map({{#items}}{{datatype}}{{/items}}ToJSON)), - {{/uniqueItems}} - {{/isArray}} - {{#isMap}} - '{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}mapValues(value['{{name}}'], {{#items}}{{datatype}}{{/items}}ToJSON)), - {{/isMap}} - {{^isArray}} - {{^isMap}} - {{^isFreeFormObject}} - '{{baseName}}': {{datatype}}ToJSON(value['{{name}}']), - {{/isFreeFormObject}} - {{#isFreeFormObject}} - '{{baseName}}': value['{{name}}'], - {{/isFreeFormObject}} - {{/isMap}} - {{/isArray}} - {{/isPrimitiveType}} - {{/isReadOnly}} - {{/vars}} - }; - {{/hasVars}} - {{^hasVars}} - return value; - {{/hasVars}} -} -// ---------------------------------------------------------------------- -// Custom model functions added by custom openapi-generator template -// ---------------------------------------------------------------------- -import {ApiApi, Api{{classname}}ListRequest, Paginated{{classname}}List} from "@/openapi"; - -/** - * query list endpoint using the provided request parameters - */ -export function list(requestParameters: Api{{classname}}ListRequest = {}): Promise { - const api = new ApiApi() - return api.api{{classname}}List(requestParameters) -} \ No newline at end of file diff --git a/vue3/src/pages/RecipeImportPage.vue b/vue3/src/pages/RecipeImportPage.vue index 9437b6642..a0b063b41 100644 --- a/vue3/src/pages/RecipeImportPage.vue +++ b/vue3/src/pages/RecipeImportPage.vue @@ -4,34 +4,76 @@ - - - - - - - - - + - @@ -42,9 +84,40 @@