diff --git a/cookbook/helper/drf_spectacular_hooks.py b/cookbook/helper/drf_spectacular_hooks.py new file mode 100644 index 000000000..0804688bc --- /dev/null +++ b/cookbook/helper/drf_spectacular_hooks.py @@ -0,0 +1,11 @@ +from drf_spectacular.types import OpenApiTypes + + +def custom_postprocessing_hook(result, generator, request, public): + for c in result['components']['schemas'].keys(): + if 'properties' in result['components']['schemas'][c] and 'id' in result['components']['schemas'][c]['properties']: + print('setting non read only for ', c) + result['components']['schemas'][c]['properties']['id']['readOnly'] = False + if 'required' in result['components']['schemas'][c] and 'id' in result['components']['schemas'][c]['required']: + result['components']['schemas'][c]['required'].remove('id') + return result diff --git a/cookbook/serializer.py b/cookbook/serializer.py index e87284de9..d40a62b84 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -952,7 +952,12 @@ class RecipeOverviewSerializer(RecipeBaseSerializer): 'waiting_time', 'created_by', 'created_at', 'updated_at', 'internal', 'servings', 'servings_text', 'rating', 'last_cooked', 'new', 'recent' ) - read_only_fields = ['id', 'name', 'description', 'image', 'keywords', 'working_time', + # TODO having these readonly fields makes "RecipeOverview.ts" (API Client) not generate the RecipeOverviewToJSON second else block which leads to errors when using the api + # TODO find a solution (maybe trough a custom schema) to have these fields readonly (to save performance) and generate a proper client (two serializers would probably do the trick) + # read_only_fields = ['id', 'name', 'description', 'image', 'keywords', 'working_time', + # 'waiting_time', 'created_by', 'created_at', 'updated_at', + # 'internal', 'servings', 'servings_text', 'rating', 'last_cooked', 'new', 'recent'] + read_only_fields = ['image', 'keywords', 'working_time', 'waiting_time', 'created_by', 'created_at', 'updated_at', 'internal', 'servings', 'servings_text', 'rating', 'last_cooked', 'new', 'recent'] diff --git a/recipes/settings.py b/recipes/settings.py index c989865f2..3cd1864e7 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -310,10 +310,15 @@ REST_FRAMEWORK = { 'COERCE_DECIMAL_TO_STRING': False, } + + + + SPECTACULAR_SETTINGS = { 'TITLE': 'Tandoor', 'DESCRIPTION': 'Tandoor API Docs', 'SERVE_INCLUDE_SCHEMA': False, + 'COMPONENT_SPLIT_REQUEST': True, 'ENUM_ADD_EXPLICIT_BLANK_NULL_CHOICE': False, "AUTHENTICATION_WHITELIST": [], "APPEND_COMPONENTS": { @@ -325,7 +330,7 @@ SPECTACULAR_SETTINGS = { } } }, - "SECURITY": [{ "ApiKeyAuth": [] }], + "SECURITY": [{"ApiKeyAuth": []}], 'SWAGGER_UI_DIST': 'SIDECAR', 'SWAGGER_UI_FAVICON_HREF': 'SIDECAR', 'REDOC_DIST': 'SIDECAR', @@ -345,6 +350,10 @@ SPECTACULAR_SETTINGS = { 'schemaExpansionLevel': 'all', 'showExtensions': True }, + 'POSTPROCESSING_HOOKS': [ + 'drf_spectacular.hooks.postprocess_schema_enums', + 'cookbook.helper.drf_spectacular_hooks.custom_postprocessing_hook' + ] } ROOT_URLCONF = 'recipes.urls' diff --git a/vue3/src/openapi/.openapi-generator/FILES b/vue3/src/openapi/.openapi-generator/FILES index 124a767a0..89f999036 100644 --- a/vue3/src/openapi/.openapi-generator/FILES +++ b/vue3/src/openapi/.openapi-generator/FILES @@ -4,42 +4,71 @@ apis/ApiTokenAuthApi.ts apis/index.ts index.ts models/AccessToken.ts +models/AccessTokenRequest.ts models/AuthToken.ts +models/AuthTokenRequest.ts models/Automation.ts +models/AutomationRequest.ts models/AutomationTypeEnum.ts models/BaseUnitEnum.ts models/BookmarkletImport.ts models/BookmarkletImportList.ts +models/BookmarkletImportRequest.ts models/ConnectorConfigConfig.ts +models/ConnectorConfigConfigRequest.ts models/CookLog.ts +models/CookLogRequest.ts models/CustomFilter.ts +models/CustomFilterRequest.ts models/DefaultPageEnum.ts models/DeleteEnum.ts models/ExportLog.ts +models/ExportLogRequest.ts models/Food.ts models/FoodInheritField.ts +models/FoodInheritFieldRequest.ts +models/FoodRequest.ts models/FoodShoppingUpdate.ts +models/FoodShoppingUpdateRequest.ts models/FoodSimple.ts +models/FoodSimpleRequest.ts models/Group.ts +models/GroupRequest.ts models/ImportLog.ts +models/ImportLogRequest.ts models/Ingredient.ts +models/IngredientRequest.ts models/InviteLink.ts +models/InviteLinkRequest.ts models/Keyword.ts models/KeywordLabel.ts +models/KeywordRequest.ts models/MealPlan.ts +models/MealPlanRequest.ts models/MealType.ts +models/MealTypeRequest.ts models/MethodEnum.ts models/NutritionInformation.ts +models/NutritionInformationRequest.ts models/OpenDataCategory.ts +models/OpenDataCategoryRequest.ts models/OpenDataConversion.ts +models/OpenDataConversionRequest.ts models/OpenDataFood.ts models/OpenDataFoodProperty.ts +models/OpenDataFoodPropertyRequest.ts +models/OpenDataFoodRequest.ts models/OpenDataProperty.ts +models/OpenDataPropertyRequest.ts models/OpenDataStore.ts models/OpenDataStoreCategory.ts +models/OpenDataStoreCategoryRequest.ts +models/OpenDataStoreRequest.ts models/OpenDataUnit.ts +models/OpenDataUnitRequest.ts models/OpenDataUnitTypeEnum.ts models/OpenDataVersion.ts +models/OpenDataVersionRequest.ts models/PaginatedAutomationList.ts models/PaginatedCookLogList.ts models/PaginatedCustomFilterList.ts @@ -55,78 +84,100 @@ models/PaginatedSyncLogList.ts models/PaginatedUnitList.ts models/PaginatedUserSpaceList.ts models/PaginatedViewLogList.ts -models/PatchedAccessToken.ts -models/PatchedAutomation.ts -models/PatchedBookmarkletImport.ts -models/PatchedConnectorConfigConfig.ts -models/PatchedCookLog.ts -models/PatchedCustomFilter.ts -models/PatchedExportLog.ts -models/PatchedFood.ts -models/PatchedImportLog.ts -models/PatchedIngredient.ts -models/PatchedInviteLink.ts -models/PatchedKeyword.ts -models/PatchedMealPlan.ts -models/PatchedMealType.ts -models/PatchedOpenDataCategory.ts -models/PatchedOpenDataConversion.ts -models/PatchedOpenDataFood.ts -models/PatchedOpenDataProperty.ts -models/PatchedOpenDataStore.ts -models/PatchedOpenDataUnit.ts -models/PatchedOpenDataVersion.ts -models/PatchedProperty.ts -models/PatchedPropertyType.ts -models/PatchedRecipe.ts -models/PatchedRecipeBook.ts -models/PatchedRecipeBookEntry.ts -models/PatchedShoppingListEntry.ts -models/PatchedShoppingListRecipe.ts -models/PatchedSpace.ts -models/PatchedStep.ts -models/PatchedStorage.ts -models/PatchedSupermarket.ts -models/PatchedSupermarketCategory.ts -models/PatchedSupermarketCategoryRelation.ts -models/PatchedSync.ts -models/PatchedUnit.ts -models/PatchedUnitConversion.ts -models/PatchedUser.ts -models/PatchedUserPreference.ts -models/PatchedUserSpace.ts -models/PatchedViewLog.ts +models/PatchedAccessTokenRequest.ts +models/PatchedAutomationRequest.ts +models/PatchedBookmarkletImportRequest.ts +models/PatchedConnectorConfigConfigRequest.ts +models/PatchedCookLogRequest.ts +models/PatchedCustomFilterRequest.ts +models/PatchedExportLogRequest.ts +models/PatchedFoodRequest.ts +models/PatchedImportLogRequest.ts +models/PatchedIngredientRequest.ts +models/PatchedInviteLinkRequest.ts +models/PatchedKeywordRequest.ts +models/PatchedMealPlanRequest.ts +models/PatchedMealTypeRequest.ts +models/PatchedOpenDataCategoryRequest.ts +models/PatchedOpenDataConversionRequest.ts +models/PatchedOpenDataFoodRequest.ts +models/PatchedOpenDataPropertyRequest.ts +models/PatchedOpenDataStoreRequest.ts +models/PatchedOpenDataUnitRequest.ts +models/PatchedOpenDataVersionRequest.ts +models/PatchedPropertyRequest.ts +models/PatchedPropertyTypeRequest.ts +models/PatchedRecipeBookEntryRequest.ts +models/PatchedRecipeBookRequest.ts +models/PatchedRecipeRequest.ts +models/PatchedShoppingListEntryRequest.ts +models/PatchedShoppingListRecipeRequest.ts +models/PatchedSpaceRequest.ts +models/PatchedStepRequest.ts +models/PatchedStorageRequest.ts +models/PatchedSupermarketCategoryRelationRequest.ts +models/PatchedSupermarketCategoryRequest.ts +models/PatchedSupermarketRequest.ts +models/PatchedSyncRequest.ts +models/PatchedUnitConversionRequest.ts +models/PatchedUnitRequest.ts +models/PatchedUserPreferenceRequest.ts +models/PatchedUserRequest.ts +models/PatchedUserSpaceRequest.ts +models/PatchedViewLogRequest.ts models/Property.ts +models/PropertyRequest.ts models/PropertyType.ts +models/PropertyTypeRequest.ts models/Recipe.ts models/RecipeBook.ts models/RecipeBookEntry.ts +models/RecipeBookEntryRequest.ts +models/RecipeBookRequest.ts models/RecipeFlat.ts models/RecipeImage.ts models/RecipeOverview.ts +models/RecipeOverviewRequest.ts +models/RecipeRequest.ts models/RecipeShoppingUpdate.ts +models/RecipeShoppingUpdateRequest.ts models/RecipeSimple.ts +models/RecipeSimpleRequest.ts models/ShoppingListEntry.ts models/ShoppingListEntryBulk.ts +models/ShoppingListEntryBulkRequest.ts +models/ShoppingListEntryRequest.ts models/ShoppingListRecipe.ts +models/ShoppingListRecipeRequest.ts models/Space.ts models/SpaceNavTextColorEnum.ts models/SpaceThemeEnum.ts models/Step.ts +models/StepRequest.ts models/Storage.ts +models/StorageRequest.ts models/Supermarket.ts models/SupermarketCategory.ts models/SupermarketCategoryRelation.ts +models/SupermarketCategoryRelationRequest.ts +models/SupermarketCategoryRequest.ts +models/SupermarketRequest.ts models/Sync.ts models/SyncLog.ts +models/SyncRequest.ts models/ThemeEnum.ts models/Unit.ts models/UnitConversion.ts +models/UnitConversionRequest.ts +models/UnitRequest.ts models/User.ts models/UserFile.ts models/UserFileView.ts +models/UserFileViewRequest.ts models/UserPreference.ts models/UserPreferenceNavTextColorEnum.ts +models/UserRequest.ts models/UserSpace.ts models/ViewLog.ts +models/ViewLogRequest.ts models/index.ts diff --git a/vue3/src/openapi/apis/ApiApi.ts b/vue3/src/openapi/apis/ApiApi.ts index 20ca64382..100b011a0 100644 --- a/vue3/src/openapi/apis/ApiApi.ts +++ b/vue3/src/openapi/apis/ApiApi.ts @@ -16,30 +16,52 @@ import * as runtime from '../runtime'; import type { AccessToken, + AccessTokenRequest, Automation, + AutomationRequest, BookmarkletImport, BookmarkletImportList, + BookmarkletImportRequest, ConnectorConfigConfig, + ConnectorConfigConfigRequest, CookLog, + CookLogRequest, CustomFilter, + CustomFilterRequest, ExportLog, + ExportLogRequest, Food, FoodInheritField, + FoodRequest, FoodShoppingUpdate, + FoodShoppingUpdateRequest, Group, ImportLog, + ImportLogRequest, Ingredient, + IngredientRequest, InviteLink, + InviteLinkRequest, Keyword, + KeywordRequest, MealPlan, + MealPlanRequest, MealType, + MealTypeRequest, OpenDataCategory, + OpenDataCategoryRequest, OpenDataConversion, + OpenDataConversionRequest, OpenDataFood, + OpenDataFoodRequest, OpenDataProperty, + OpenDataPropertyRequest, OpenDataStore, + OpenDataStoreRequest, OpenDataUnit, + OpenDataUnitRequest, OpenDataVersion, + OpenDataVersionRequest, PaginatedAutomationList, PaginatedCookLogList, PaginatedCustomFilterList, @@ -55,126 +77,188 @@ import type { PaginatedUnitList, PaginatedUserSpaceList, PaginatedViewLogList, - PatchedAccessToken, - PatchedAutomation, - PatchedBookmarkletImport, - PatchedConnectorConfigConfig, - PatchedCookLog, - PatchedCustomFilter, - PatchedExportLog, - PatchedFood, - PatchedImportLog, - PatchedIngredient, - PatchedInviteLink, - PatchedKeyword, - PatchedMealPlan, - PatchedMealType, - PatchedOpenDataCategory, - PatchedOpenDataConversion, - PatchedOpenDataFood, - PatchedOpenDataProperty, - PatchedOpenDataStore, - PatchedOpenDataUnit, - PatchedOpenDataVersion, - PatchedProperty, - PatchedPropertyType, - PatchedRecipe, - PatchedRecipeBook, - PatchedRecipeBookEntry, - PatchedShoppingListEntry, - PatchedShoppingListRecipe, - PatchedSpace, - PatchedStep, - PatchedStorage, - PatchedSupermarket, - PatchedSupermarketCategory, - PatchedSupermarketCategoryRelation, - PatchedSync, - PatchedUnit, - PatchedUnitConversion, - PatchedUser, - PatchedUserPreference, - PatchedUserSpace, - PatchedViewLog, + PatchedAccessTokenRequest, + PatchedAutomationRequest, + PatchedBookmarkletImportRequest, + PatchedConnectorConfigConfigRequest, + PatchedCookLogRequest, + PatchedCustomFilterRequest, + PatchedExportLogRequest, + PatchedFoodRequest, + PatchedImportLogRequest, + PatchedIngredientRequest, + PatchedInviteLinkRequest, + PatchedKeywordRequest, + PatchedMealPlanRequest, + PatchedMealTypeRequest, + PatchedOpenDataCategoryRequest, + PatchedOpenDataConversionRequest, + PatchedOpenDataFoodRequest, + PatchedOpenDataPropertyRequest, + PatchedOpenDataStoreRequest, + PatchedOpenDataUnitRequest, + PatchedOpenDataVersionRequest, + PatchedPropertyRequest, + PatchedPropertyTypeRequest, + PatchedRecipeBookEntryRequest, + PatchedRecipeBookRequest, + PatchedRecipeRequest, + PatchedShoppingListEntryRequest, + PatchedShoppingListRecipeRequest, + PatchedSpaceRequest, + PatchedStepRequest, + PatchedStorageRequest, + PatchedSupermarketCategoryRelationRequest, + PatchedSupermarketCategoryRequest, + PatchedSupermarketRequest, + PatchedSyncRequest, + PatchedUnitConversionRequest, + PatchedUnitRequest, + PatchedUserPreferenceRequest, + PatchedUserRequest, + PatchedUserSpaceRequest, + PatchedViewLogRequest, Property, + PropertyRequest, PropertyType, + PropertyTypeRequest, Recipe, RecipeBook, RecipeBookEntry, + RecipeBookEntryRequest, + RecipeBookRequest, RecipeFlat, RecipeImage, + RecipeRequest, RecipeShoppingUpdate, + RecipeShoppingUpdateRequest, RecipeSimple, ShoppingListEntry, ShoppingListEntryBulk, + ShoppingListEntryBulkRequest, + ShoppingListEntryRequest, ShoppingListRecipe, + ShoppingListRecipeRequest, Space, Step, + StepRequest, Storage, + StorageRequest, Supermarket, SupermarketCategory, SupermarketCategoryRelation, + SupermarketCategoryRelationRequest, + SupermarketCategoryRequest, + SupermarketRequest, Sync, SyncLog, + SyncRequest, Unit, UnitConversion, + UnitConversionRequest, + UnitRequest, User, UserFile, UserPreference, UserSpace, ViewLog, + ViewLogRequest, } from '../models/index'; import { AccessTokenFromJSON, AccessTokenToJSON, + AccessTokenRequestFromJSON, + AccessTokenRequestToJSON, AutomationFromJSON, AutomationToJSON, + AutomationRequestFromJSON, + AutomationRequestToJSON, BookmarkletImportFromJSON, BookmarkletImportToJSON, BookmarkletImportListFromJSON, BookmarkletImportListToJSON, + BookmarkletImportRequestFromJSON, + BookmarkletImportRequestToJSON, ConnectorConfigConfigFromJSON, ConnectorConfigConfigToJSON, + ConnectorConfigConfigRequestFromJSON, + ConnectorConfigConfigRequestToJSON, CookLogFromJSON, CookLogToJSON, + CookLogRequestFromJSON, + CookLogRequestToJSON, CustomFilterFromJSON, CustomFilterToJSON, + CustomFilterRequestFromJSON, + CustomFilterRequestToJSON, ExportLogFromJSON, ExportLogToJSON, + ExportLogRequestFromJSON, + ExportLogRequestToJSON, FoodFromJSON, FoodToJSON, FoodInheritFieldFromJSON, FoodInheritFieldToJSON, + FoodRequestFromJSON, + FoodRequestToJSON, FoodShoppingUpdateFromJSON, FoodShoppingUpdateToJSON, + FoodShoppingUpdateRequestFromJSON, + FoodShoppingUpdateRequestToJSON, GroupFromJSON, GroupToJSON, ImportLogFromJSON, ImportLogToJSON, + ImportLogRequestFromJSON, + ImportLogRequestToJSON, IngredientFromJSON, IngredientToJSON, + IngredientRequestFromJSON, + IngredientRequestToJSON, InviteLinkFromJSON, InviteLinkToJSON, + InviteLinkRequestFromJSON, + InviteLinkRequestToJSON, KeywordFromJSON, KeywordToJSON, + KeywordRequestFromJSON, + KeywordRequestToJSON, MealPlanFromJSON, MealPlanToJSON, + MealPlanRequestFromJSON, + MealPlanRequestToJSON, MealTypeFromJSON, MealTypeToJSON, + MealTypeRequestFromJSON, + MealTypeRequestToJSON, OpenDataCategoryFromJSON, OpenDataCategoryToJSON, + OpenDataCategoryRequestFromJSON, + OpenDataCategoryRequestToJSON, OpenDataConversionFromJSON, OpenDataConversionToJSON, + OpenDataConversionRequestFromJSON, + OpenDataConversionRequestToJSON, OpenDataFoodFromJSON, OpenDataFoodToJSON, + OpenDataFoodRequestFromJSON, + OpenDataFoodRequestToJSON, OpenDataPropertyFromJSON, OpenDataPropertyToJSON, + OpenDataPropertyRequestFromJSON, + OpenDataPropertyRequestToJSON, OpenDataStoreFromJSON, OpenDataStoreToJSON, + OpenDataStoreRequestFromJSON, + OpenDataStoreRequestToJSON, OpenDataUnitFromJSON, OpenDataUnitToJSON, + OpenDataUnitRequestFromJSON, + OpenDataUnitRequestToJSON, OpenDataVersionFromJSON, OpenDataVersionToJSON, + OpenDataVersionRequestFromJSON, + OpenDataVersionRequestToJSON, PaginatedAutomationListFromJSON, PaginatedAutomationListToJSON, PaginatedCookLogListFromJSON, @@ -205,132 +289,166 @@ import { PaginatedUserSpaceListToJSON, PaginatedViewLogListFromJSON, PaginatedViewLogListToJSON, - PatchedAccessTokenFromJSON, - PatchedAccessTokenToJSON, - PatchedAutomationFromJSON, - PatchedAutomationToJSON, - PatchedBookmarkletImportFromJSON, - PatchedBookmarkletImportToJSON, - PatchedConnectorConfigConfigFromJSON, - PatchedConnectorConfigConfigToJSON, - PatchedCookLogFromJSON, - PatchedCookLogToJSON, - PatchedCustomFilterFromJSON, - PatchedCustomFilterToJSON, - PatchedExportLogFromJSON, - PatchedExportLogToJSON, - PatchedFoodFromJSON, - PatchedFoodToJSON, - PatchedImportLogFromJSON, - PatchedImportLogToJSON, - PatchedIngredientFromJSON, - PatchedIngredientToJSON, - PatchedInviteLinkFromJSON, - PatchedInviteLinkToJSON, - PatchedKeywordFromJSON, - PatchedKeywordToJSON, - PatchedMealPlanFromJSON, - PatchedMealPlanToJSON, - PatchedMealTypeFromJSON, - PatchedMealTypeToJSON, - PatchedOpenDataCategoryFromJSON, - PatchedOpenDataCategoryToJSON, - PatchedOpenDataConversionFromJSON, - PatchedOpenDataConversionToJSON, - PatchedOpenDataFoodFromJSON, - PatchedOpenDataFoodToJSON, - PatchedOpenDataPropertyFromJSON, - PatchedOpenDataPropertyToJSON, - PatchedOpenDataStoreFromJSON, - PatchedOpenDataStoreToJSON, - PatchedOpenDataUnitFromJSON, - PatchedOpenDataUnitToJSON, - PatchedOpenDataVersionFromJSON, - PatchedOpenDataVersionToJSON, - PatchedPropertyFromJSON, - PatchedPropertyToJSON, - PatchedPropertyTypeFromJSON, - PatchedPropertyTypeToJSON, - PatchedRecipeFromJSON, - PatchedRecipeToJSON, - PatchedRecipeBookFromJSON, - PatchedRecipeBookToJSON, - PatchedRecipeBookEntryFromJSON, - PatchedRecipeBookEntryToJSON, - PatchedShoppingListEntryFromJSON, - PatchedShoppingListEntryToJSON, - PatchedShoppingListRecipeFromJSON, - PatchedShoppingListRecipeToJSON, - PatchedSpaceFromJSON, - PatchedSpaceToJSON, - PatchedStepFromJSON, - PatchedStepToJSON, - PatchedStorageFromJSON, - PatchedStorageToJSON, - PatchedSupermarketFromJSON, - PatchedSupermarketToJSON, - PatchedSupermarketCategoryFromJSON, - PatchedSupermarketCategoryToJSON, - PatchedSupermarketCategoryRelationFromJSON, - PatchedSupermarketCategoryRelationToJSON, - PatchedSyncFromJSON, - PatchedSyncToJSON, - PatchedUnitFromJSON, - PatchedUnitToJSON, - PatchedUnitConversionFromJSON, - PatchedUnitConversionToJSON, - PatchedUserFromJSON, - PatchedUserToJSON, - PatchedUserPreferenceFromJSON, - PatchedUserPreferenceToJSON, - PatchedUserSpaceFromJSON, - PatchedUserSpaceToJSON, - PatchedViewLogFromJSON, - PatchedViewLogToJSON, + PatchedAccessTokenRequestFromJSON, + PatchedAccessTokenRequestToJSON, + PatchedAutomationRequestFromJSON, + PatchedAutomationRequestToJSON, + PatchedBookmarkletImportRequestFromJSON, + PatchedBookmarkletImportRequestToJSON, + PatchedConnectorConfigConfigRequestFromJSON, + PatchedConnectorConfigConfigRequestToJSON, + PatchedCookLogRequestFromJSON, + PatchedCookLogRequestToJSON, + PatchedCustomFilterRequestFromJSON, + PatchedCustomFilterRequestToJSON, + PatchedExportLogRequestFromJSON, + PatchedExportLogRequestToJSON, + PatchedFoodRequestFromJSON, + PatchedFoodRequestToJSON, + PatchedImportLogRequestFromJSON, + PatchedImportLogRequestToJSON, + PatchedIngredientRequestFromJSON, + PatchedIngredientRequestToJSON, + PatchedInviteLinkRequestFromJSON, + PatchedInviteLinkRequestToJSON, + PatchedKeywordRequestFromJSON, + PatchedKeywordRequestToJSON, + PatchedMealPlanRequestFromJSON, + PatchedMealPlanRequestToJSON, + PatchedMealTypeRequestFromJSON, + PatchedMealTypeRequestToJSON, + PatchedOpenDataCategoryRequestFromJSON, + PatchedOpenDataCategoryRequestToJSON, + PatchedOpenDataConversionRequestFromJSON, + PatchedOpenDataConversionRequestToJSON, + PatchedOpenDataFoodRequestFromJSON, + PatchedOpenDataFoodRequestToJSON, + PatchedOpenDataPropertyRequestFromJSON, + PatchedOpenDataPropertyRequestToJSON, + PatchedOpenDataStoreRequestFromJSON, + PatchedOpenDataStoreRequestToJSON, + PatchedOpenDataUnitRequestFromJSON, + PatchedOpenDataUnitRequestToJSON, + PatchedOpenDataVersionRequestFromJSON, + PatchedOpenDataVersionRequestToJSON, + PatchedPropertyRequestFromJSON, + PatchedPropertyRequestToJSON, + PatchedPropertyTypeRequestFromJSON, + PatchedPropertyTypeRequestToJSON, + PatchedRecipeBookEntryRequestFromJSON, + PatchedRecipeBookEntryRequestToJSON, + PatchedRecipeBookRequestFromJSON, + PatchedRecipeBookRequestToJSON, + PatchedRecipeRequestFromJSON, + PatchedRecipeRequestToJSON, + PatchedShoppingListEntryRequestFromJSON, + PatchedShoppingListEntryRequestToJSON, + PatchedShoppingListRecipeRequestFromJSON, + PatchedShoppingListRecipeRequestToJSON, + PatchedSpaceRequestFromJSON, + PatchedSpaceRequestToJSON, + PatchedStepRequestFromJSON, + PatchedStepRequestToJSON, + PatchedStorageRequestFromJSON, + PatchedStorageRequestToJSON, + PatchedSupermarketCategoryRelationRequestFromJSON, + PatchedSupermarketCategoryRelationRequestToJSON, + PatchedSupermarketCategoryRequestFromJSON, + PatchedSupermarketCategoryRequestToJSON, + PatchedSupermarketRequestFromJSON, + PatchedSupermarketRequestToJSON, + PatchedSyncRequestFromJSON, + PatchedSyncRequestToJSON, + PatchedUnitConversionRequestFromJSON, + PatchedUnitConversionRequestToJSON, + PatchedUnitRequestFromJSON, + PatchedUnitRequestToJSON, + PatchedUserPreferenceRequestFromJSON, + PatchedUserPreferenceRequestToJSON, + PatchedUserRequestFromJSON, + PatchedUserRequestToJSON, + PatchedUserSpaceRequestFromJSON, + PatchedUserSpaceRequestToJSON, + PatchedViewLogRequestFromJSON, + PatchedViewLogRequestToJSON, PropertyFromJSON, PropertyToJSON, + PropertyRequestFromJSON, + PropertyRequestToJSON, PropertyTypeFromJSON, PropertyTypeToJSON, + PropertyTypeRequestFromJSON, + PropertyTypeRequestToJSON, RecipeFromJSON, RecipeToJSON, RecipeBookFromJSON, RecipeBookToJSON, RecipeBookEntryFromJSON, RecipeBookEntryToJSON, + RecipeBookEntryRequestFromJSON, + RecipeBookEntryRequestToJSON, + RecipeBookRequestFromJSON, + RecipeBookRequestToJSON, RecipeFlatFromJSON, RecipeFlatToJSON, RecipeImageFromJSON, RecipeImageToJSON, + RecipeRequestFromJSON, + RecipeRequestToJSON, RecipeShoppingUpdateFromJSON, RecipeShoppingUpdateToJSON, + RecipeShoppingUpdateRequestFromJSON, + RecipeShoppingUpdateRequestToJSON, RecipeSimpleFromJSON, RecipeSimpleToJSON, ShoppingListEntryFromJSON, ShoppingListEntryToJSON, ShoppingListEntryBulkFromJSON, ShoppingListEntryBulkToJSON, + ShoppingListEntryBulkRequestFromJSON, + ShoppingListEntryBulkRequestToJSON, + ShoppingListEntryRequestFromJSON, + ShoppingListEntryRequestToJSON, ShoppingListRecipeFromJSON, ShoppingListRecipeToJSON, + ShoppingListRecipeRequestFromJSON, + ShoppingListRecipeRequestToJSON, SpaceFromJSON, SpaceToJSON, StepFromJSON, StepToJSON, + StepRequestFromJSON, + StepRequestToJSON, StorageFromJSON, StorageToJSON, + StorageRequestFromJSON, + StorageRequestToJSON, SupermarketFromJSON, SupermarketToJSON, SupermarketCategoryFromJSON, SupermarketCategoryToJSON, SupermarketCategoryRelationFromJSON, SupermarketCategoryRelationToJSON, + SupermarketCategoryRelationRequestFromJSON, + SupermarketCategoryRelationRequestToJSON, + SupermarketCategoryRequestFromJSON, + SupermarketCategoryRequestToJSON, + SupermarketRequestFromJSON, + SupermarketRequestToJSON, SyncFromJSON, SyncToJSON, SyncLogFromJSON, SyncLogToJSON, + SyncRequestFromJSON, + SyncRequestToJSON, UnitFromJSON, UnitToJSON, UnitConversionFromJSON, UnitConversionToJSON, + UnitConversionRequestFromJSON, + UnitConversionRequestToJSON, + UnitRequestFromJSON, + UnitRequestToJSON, UserFromJSON, UserToJSON, UserFileFromJSON, @@ -341,10 +459,12 @@ import { UserSpaceToJSON, ViewLogFromJSON, ViewLogToJSON, + ViewLogRequestFromJSON, + ViewLogRequestToJSON, } from '../models/index'; export interface ApiAccessTokenCreateRequest { - accessToken: AccessToken; + accessTokenRequest: AccessTokenRequest; } export interface ApiAccessTokenDestroyRequest { @@ -353,7 +473,7 @@ export interface ApiAccessTokenDestroyRequest { export interface ApiAccessTokenPartialUpdateRequest { id: number; - patchedAccessToken?: PatchedAccessToken; + patchedAccessTokenRequest?: PatchedAccessTokenRequest; } export interface ApiAccessTokenRetrieveRequest { @@ -362,11 +482,11 @@ export interface ApiAccessTokenRetrieveRequest { export interface ApiAccessTokenUpdateRequest { id: number; - accessToken: AccessToken; + accessTokenRequest: AccessTokenRequest; } export interface ApiAutomationCreateRequest { - automation: Automation; + automationRequest: AutomationRequest; } export interface ApiAutomationDestroyRequest { @@ -381,7 +501,7 @@ export interface ApiAutomationListRequest { export interface ApiAutomationPartialUpdateRequest { id: number; - patchedAutomation?: PatchedAutomation; + patchedAutomationRequest?: PatchedAutomationRequest; } export interface ApiAutomationRetrieveRequest { @@ -390,11 +510,11 @@ export interface ApiAutomationRetrieveRequest { export interface ApiAutomationUpdateRequest { id: number; - automation: Automation; + automationRequest: AutomationRequest; } export interface ApiBookmarkletImportCreateRequest { - bookmarkletImport: BookmarkletImport; + bookmarkletImportRequest: BookmarkletImportRequest; } export interface ApiBookmarkletImportDestroyRequest { @@ -403,7 +523,7 @@ export interface ApiBookmarkletImportDestroyRequest { export interface ApiBookmarkletImportPartialUpdateRequest { id: number; - patchedBookmarkletImport?: PatchedBookmarkletImport; + patchedBookmarkletImportRequest?: PatchedBookmarkletImportRequest; } export interface ApiBookmarkletImportRetrieveRequest { @@ -412,11 +532,11 @@ export interface ApiBookmarkletImportRetrieveRequest { export interface ApiBookmarkletImportUpdateRequest { id: number; - bookmarkletImport: BookmarkletImport; + bookmarkletImportRequest: BookmarkletImportRequest; } export interface ApiConnectorConfigCreateRequest { - connectorConfigConfig: ConnectorConfigConfig; + connectorConfigConfigRequest: ConnectorConfigConfigRequest; } export interface ApiConnectorConfigDestroyRequest { @@ -425,7 +545,7 @@ export interface ApiConnectorConfigDestroyRequest { export interface ApiConnectorConfigPartialUpdateRequest { id: number; - patchedConnectorConfigConfig?: PatchedConnectorConfigConfig; + patchedConnectorConfigConfigRequest?: PatchedConnectorConfigConfigRequest; } export interface ApiConnectorConfigRetrieveRequest { @@ -434,11 +554,11 @@ export interface ApiConnectorConfigRetrieveRequest { export interface ApiConnectorConfigUpdateRequest { id: number; - connectorConfigConfig: ConnectorConfigConfig; + connectorConfigConfigRequest: ConnectorConfigConfigRequest; } export interface ApiCookLogCreateRequest { - cookLog: CookLog; + cookLogRequest: CookLogRequest; } export interface ApiCookLogDestroyRequest { @@ -453,7 +573,7 @@ export interface ApiCookLogListRequest { export interface ApiCookLogPartialUpdateRequest { id: number; - patchedCookLog?: PatchedCookLog; + patchedCookLogRequest?: PatchedCookLogRequest; } export interface ApiCookLogRetrieveRequest { @@ -462,11 +582,11 @@ export interface ApiCookLogRetrieveRequest { export interface ApiCookLogUpdateRequest { id: number; - cookLog: CookLog; + cookLogRequest: CookLogRequest; } export interface ApiCustomFilterCreateRequest { - customFilter: CustomFilter; + customFilterRequest: CustomFilterRequest; } export interface ApiCustomFilterDestroyRequest { @@ -484,7 +604,7 @@ export interface ApiCustomFilterListRequest { export interface ApiCustomFilterPartialUpdateRequest { id: number; - patchedCustomFilter?: PatchedCustomFilter; + patchedCustomFilterRequest?: PatchedCustomFilterRequest; } export interface ApiCustomFilterRetrieveRequest { @@ -493,7 +613,7 @@ export interface ApiCustomFilterRetrieveRequest { export interface ApiCustomFilterUpdateRequest { id: number; - customFilter: CustomFilter; + customFilterRequest: CustomFilterRequest; } export interface ApiDownloadFileRetrieveRequest { @@ -501,7 +621,7 @@ export interface ApiDownloadFileRetrieveRequest { } export interface ApiExportLogCreateRequest { - exportLog: ExportLog; + exportLogRequest: ExportLogRequest; } export interface ApiExportLogDestroyRequest { @@ -515,7 +635,7 @@ export interface ApiExportLogListRequest { export interface ApiExportLogPartialUpdateRequest { id: number; - patchedExportLog?: PatchedExportLog; + patchedExportLogRequest?: PatchedExportLogRequest; } export interface ApiExportLogRetrieveRequest { @@ -524,11 +644,11 @@ export interface ApiExportLogRetrieveRequest { export interface ApiExportLogUpdateRequest { id: number; - exportLog: ExportLog; + exportLogRequest: ExportLogRequest; } export interface ApiFoodCreateRequest { - food: Food; + foodRequest: FoodRequest; } export interface ApiFoodDestroyRequest { @@ -537,7 +657,7 @@ export interface ApiFoodDestroyRequest { export interface ApiFoodFdcCreateRequest { id: number; - food: Food; + foodRequest: FoodRequest; } export interface ApiFoodInheritFieldRetrieveRequest { @@ -558,22 +678,22 @@ export interface ApiFoodListRequest { export interface ApiFoodMergeUpdateRequest { id: number; target: string; - food: Food; + foodRequest: FoodRequest; } export interface ApiFoodMoveUpdateRequest { id: number; parent: string; - food: Food; + foodRequest: FoodRequest; } export interface ApiFoodPartialUpdateRequest { id: number; - patchedFood?: PatchedFood; + patchedFoodRequest?: PatchedFoodRequest; } export interface ApiFoodPropertyCreateRequest { - property: Property; + propertyRequest: PropertyRequest; } export interface ApiFoodPropertyDestroyRequest { @@ -582,7 +702,7 @@ export interface ApiFoodPropertyDestroyRequest { export interface ApiFoodPropertyPartialUpdateRequest { id: number; - patchedProperty?: PatchedProperty; + patchedPropertyRequest?: PatchedPropertyRequest; } export interface ApiFoodPropertyRetrieveRequest { @@ -590,7 +710,7 @@ export interface ApiFoodPropertyRetrieveRequest { } export interface ApiFoodPropertyTypeCreateRequest { - propertyType: PropertyType; + propertyTypeRequest: PropertyTypeRequest; } export interface ApiFoodPropertyTypeDestroyRequest { @@ -599,7 +719,7 @@ export interface ApiFoodPropertyTypeDestroyRequest { export interface ApiFoodPropertyTypePartialUpdateRequest { id: number; - patchedPropertyType?: PatchedPropertyType; + patchedPropertyTypeRequest?: PatchedPropertyTypeRequest; } export interface ApiFoodPropertyTypeRetrieveRequest { @@ -608,12 +728,12 @@ export interface ApiFoodPropertyTypeRetrieveRequest { export interface ApiFoodPropertyTypeUpdateRequest { id: number; - propertyType: PropertyType; + propertyTypeRequest: PropertyTypeRequest; } export interface ApiFoodPropertyUpdateRequest { id: number; - property: Property; + propertyRequest: PropertyRequest; } export interface ApiFoodRetrieveRequest { @@ -622,12 +742,12 @@ export interface ApiFoodRetrieveRequest { export interface ApiFoodShoppingUpdateRequest { id: number; - foodShoppingUpdate: FoodShoppingUpdate; + foodShoppingUpdateRequest: FoodShoppingUpdateRequest; } export interface ApiFoodUpdateRequest { id: number; - food: Food; + foodRequest: FoodRequest; } export interface ApiGroupRetrieveRequest { @@ -635,7 +755,7 @@ export interface ApiGroupRetrieveRequest { } export interface ApiImportLogCreateRequest { - importLog: ImportLog; + importLogRequest: ImportLogRequest; } export interface ApiImportLogDestroyRequest { @@ -649,7 +769,7 @@ export interface ApiImportLogListRequest { export interface ApiImportLogPartialUpdateRequest { id: number; - patchedImportLog?: PatchedImportLog; + patchedImportLogRequest?: PatchedImportLogRequest; } export interface ApiImportLogRetrieveRequest { @@ -658,11 +778,11 @@ export interface ApiImportLogRetrieveRequest { export interface ApiImportLogUpdateRequest { id: number; - importLog: ImportLog; + importLogRequest: ImportLogRequest; } export interface ApiIngredientCreateRequest { - ingredient: Ingredient; + ingredientRequest: IngredientRequest; } export interface ApiIngredientDestroyRequest { @@ -676,7 +796,7 @@ export interface ApiIngredientListRequest { export interface ApiIngredientPartialUpdateRequest { id: number; - patchedIngredient?: PatchedIngredient; + patchedIngredientRequest?: PatchedIngredientRequest; } export interface ApiIngredientRetrieveRequest { @@ -685,11 +805,11 @@ export interface ApiIngredientRetrieveRequest { export interface ApiIngredientUpdateRequest { id: number; - ingredient: Ingredient; + ingredientRequest: IngredientRequest; } export interface ApiInviteLinkCreateRequest { - inviteLink: InviteLink; + inviteLinkRequest: InviteLinkRequest; } export interface ApiInviteLinkDestroyRequest { @@ -705,7 +825,7 @@ export interface ApiInviteLinkListRequest { export interface ApiInviteLinkPartialUpdateRequest { id: number; - patchedInviteLink?: PatchedInviteLink; + patchedInviteLinkRequest?: PatchedInviteLinkRequest; } export interface ApiInviteLinkRetrieveRequest { @@ -714,11 +834,11 @@ export interface ApiInviteLinkRetrieveRequest { export interface ApiInviteLinkUpdateRequest { id: number; - inviteLink: InviteLink; + inviteLinkRequest: InviteLinkRequest; } export interface ApiKeywordCreateRequest { - keyword: Keyword; + keywordRequest: KeywordRequest; } export interface ApiKeywordDestroyRequest { @@ -739,18 +859,18 @@ export interface ApiKeywordListRequest { export interface ApiKeywordMergeUpdateRequest { id: number; target: string; - keyword: Keyword; + keywordRequest: KeywordRequest; } export interface ApiKeywordMoveUpdateRequest { id: number; parent: string; - keyword: Keyword; + keywordRequest: KeywordRequest; } export interface ApiKeywordPartialUpdateRequest { id: number; - patchedKeyword?: PatchedKeyword; + patchedKeywordRequest?: PatchedKeywordRequest; } export interface ApiKeywordRetrieveRequest { @@ -759,11 +879,11 @@ export interface ApiKeywordRetrieveRequest { export interface ApiKeywordUpdateRequest { id: number; - keyword: Keyword; + keywordRequest: KeywordRequest; } export interface ApiMealPlanCreateRequest { - mealPlan: MealPlan; + mealPlanRequest: MealPlanRequest; } export interface ApiMealPlanDestroyRequest { @@ -784,7 +904,7 @@ export interface ApiMealPlanListRequest { export interface ApiMealPlanPartialUpdateRequest { id: number; - patchedMealPlan?: PatchedMealPlan; + patchedMealPlanRequest?: PatchedMealPlanRequest; } export interface ApiMealPlanRetrieveRequest { @@ -793,11 +913,11 @@ export interface ApiMealPlanRetrieveRequest { export interface ApiMealPlanUpdateRequest { id: number; - mealPlan: MealPlan; + mealPlanRequest: MealPlanRequest; } export interface ApiMealTypeCreateRequest { - mealType: MealType; + mealTypeRequest: MealTypeRequest; } export interface ApiMealTypeDestroyRequest { @@ -806,7 +926,7 @@ export interface ApiMealTypeDestroyRequest { export interface ApiMealTypePartialUpdateRequest { id: number; - patchedMealType?: PatchedMealType; + patchedMealTypeRequest?: PatchedMealTypeRequest; } export interface ApiMealTypeRetrieveRequest { @@ -815,11 +935,11 @@ export interface ApiMealTypeRetrieveRequest { export interface ApiMealTypeUpdateRequest { id: number; - mealType: MealType; + mealTypeRequest: MealTypeRequest; } export interface ApiOpenDataCategoryCreateRequest { - openDataCategory: OpenDataCategory; + openDataCategoryRequest: OpenDataCategoryRequest; } export interface ApiOpenDataCategoryDestroyRequest { @@ -828,7 +948,7 @@ export interface ApiOpenDataCategoryDestroyRequest { export interface ApiOpenDataCategoryPartialUpdateRequest { id: number; - patchedOpenDataCategory?: PatchedOpenDataCategory; + patchedOpenDataCategoryRequest?: PatchedOpenDataCategoryRequest; } export interface ApiOpenDataCategoryRetrieveRequest { @@ -837,11 +957,11 @@ export interface ApiOpenDataCategoryRetrieveRequest { export interface ApiOpenDataCategoryUpdateRequest { id: number; - openDataCategory: OpenDataCategory; + openDataCategoryRequest: OpenDataCategoryRequest; } export interface ApiOpenDataConversionCreateRequest { - openDataConversion: OpenDataConversion; + openDataConversionRequest: OpenDataConversionRequest; } export interface ApiOpenDataConversionDestroyRequest { @@ -850,7 +970,7 @@ export interface ApiOpenDataConversionDestroyRequest { export interface ApiOpenDataConversionPartialUpdateRequest { id: number; - patchedOpenDataConversion?: PatchedOpenDataConversion; + patchedOpenDataConversionRequest?: PatchedOpenDataConversionRequest; } export interface ApiOpenDataConversionRetrieveRequest { @@ -859,7 +979,7 @@ export interface ApiOpenDataConversionRetrieveRequest { export interface ApiOpenDataConversionUpdateRequest { id: number; - openDataConversion: OpenDataConversion; + openDataConversionRequest: OpenDataConversionRequest; } export interface ApiOpenDataFDCRetrieveRequest { @@ -867,7 +987,7 @@ export interface ApiOpenDataFDCRetrieveRequest { } export interface ApiOpenDataFoodCreateRequest { - openDataFood: OpenDataFood; + openDataFoodRequest: OpenDataFoodRequest; } export interface ApiOpenDataFoodDestroyRequest { @@ -876,7 +996,7 @@ export interface ApiOpenDataFoodDestroyRequest { export interface ApiOpenDataFoodPartialUpdateRequest { id: number; - patchedOpenDataFood?: PatchedOpenDataFood; + patchedOpenDataFoodRequest?: PatchedOpenDataFoodRequest; } export interface ApiOpenDataFoodRetrieveRequest { @@ -885,11 +1005,11 @@ export interface ApiOpenDataFoodRetrieveRequest { export interface ApiOpenDataFoodUpdateRequest { id: number; - openDataFood: OpenDataFood; + openDataFoodRequest: OpenDataFoodRequest; } export interface ApiOpenDataPropertyCreateRequest { - openDataProperty: OpenDataProperty; + openDataPropertyRequest: OpenDataPropertyRequest; } export interface ApiOpenDataPropertyDestroyRequest { @@ -898,7 +1018,7 @@ export interface ApiOpenDataPropertyDestroyRequest { export interface ApiOpenDataPropertyPartialUpdateRequest { id: number; - patchedOpenDataProperty?: PatchedOpenDataProperty; + patchedOpenDataPropertyRequest?: PatchedOpenDataPropertyRequest; } export interface ApiOpenDataPropertyRetrieveRequest { @@ -907,11 +1027,11 @@ export interface ApiOpenDataPropertyRetrieveRequest { export interface ApiOpenDataPropertyUpdateRequest { id: number; - openDataProperty: OpenDataProperty; + openDataPropertyRequest: OpenDataPropertyRequest; } export interface ApiOpenDataStoreCreateRequest { - openDataStore: OpenDataStore; + openDataStoreRequest: OpenDataStoreRequest; } export interface ApiOpenDataStoreDestroyRequest { @@ -920,7 +1040,7 @@ export interface ApiOpenDataStoreDestroyRequest { export interface ApiOpenDataStorePartialUpdateRequest { id: number; - patchedOpenDataStore?: PatchedOpenDataStore; + patchedOpenDataStoreRequest?: PatchedOpenDataStoreRequest; } export interface ApiOpenDataStoreRetrieveRequest { @@ -929,11 +1049,11 @@ export interface ApiOpenDataStoreRetrieveRequest { export interface ApiOpenDataStoreUpdateRequest { id: number; - openDataStore: OpenDataStore; + openDataStoreRequest: OpenDataStoreRequest; } export interface ApiOpenDataUnitCreateRequest { - openDataUnit: OpenDataUnit; + openDataUnitRequest: OpenDataUnitRequest; } export interface ApiOpenDataUnitDestroyRequest { @@ -942,7 +1062,7 @@ export interface ApiOpenDataUnitDestroyRequest { export interface ApiOpenDataUnitPartialUpdateRequest { id: number; - patchedOpenDataUnit?: PatchedOpenDataUnit; + patchedOpenDataUnitRequest?: PatchedOpenDataUnitRequest; } export interface ApiOpenDataUnitRetrieveRequest { @@ -951,11 +1071,11 @@ export interface ApiOpenDataUnitRetrieveRequest { export interface ApiOpenDataUnitUpdateRequest { id: number; - openDataUnit: OpenDataUnit; + openDataUnitRequest: OpenDataUnitRequest; } export interface ApiOpenDataVersionCreateRequest { - openDataVersion: OpenDataVersion; + openDataVersionRequest: OpenDataVersionRequest; } export interface ApiOpenDataVersionDestroyRequest { @@ -964,7 +1084,7 @@ export interface ApiOpenDataVersionDestroyRequest { export interface ApiOpenDataVersionPartialUpdateRequest { id: number; - patchedOpenDataVersion?: PatchedOpenDataVersion; + patchedOpenDataVersionRequest?: PatchedOpenDataVersionRequest; } export interface ApiOpenDataVersionRetrieveRequest { @@ -973,7 +1093,7 @@ export interface ApiOpenDataVersionRetrieveRequest { export interface ApiOpenDataVersionUpdateRequest { id: number; - openDataVersion: OpenDataVersion; + openDataVersionRequest: OpenDataVersionRequest; } export interface ApiPlanIcalRetrieveRequest { @@ -982,7 +1102,7 @@ export interface ApiPlanIcalRetrieveRequest { } export interface ApiRecipeBookCreateRequest { - recipeBook: RecipeBook; + recipeBookRequest: RecipeBookRequest; } export interface ApiRecipeBookDestroyRequest { @@ -990,7 +1110,7 @@ export interface ApiRecipeBookDestroyRequest { } export interface ApiRecipeBookEntryCreateRequest { - recipeBookEntry: RecipeBookEntry; + recipeBookEntryRequest: RecipeBookEntryRequest; } export interface ApiRecipeBookEntryDestroyRequest { @@ -999,7 +1119,7 @@ export interface ApiRecipeBookEntryDestroyRequest { export interface ApiRecipeBookEntryPartialUpdateRequest { id: number; - patchedRecipeBookEntry?: PatchedRecipeBookEntry; + patchedRecipeBookEntryRequest?: PatchedRecipeBookEntryRequest; } export interface ApiRecipeBookEntryRetrieveRequest { @@ -1008,7 +1128,7 @@ export interface ApiRecipeBookEntryRetrieveRequest { export interface ApiRecipeBookEntryUpdateRequest { id: number; - recipeBookEntry: RecipeBookEntry; + recipeBookEntryRequest: RecipeBookEntryRequest; } export interface ApiRecipeBookListRequest { @@ -1020,7 +1140,7 @@ export interface ApiRecipeBookListRequest { export interface ApiRecipeBookPartialUpdateRequest { id: number; - patchedRecipeBook?: PatchedRecipeBook; + patchedRecipeBookRequest?: PatchedRecipeBookRequest; } export interface ApiRecipeBookRetrieveRequest { @@ -1029,11 +1149,11 @@ export interface ApiRecipeBookRetrieveRequest { export interface ApiRecipeBookUpdateRequest { id: number; - recipeBook: RecipeBook; + recipeBookRequest: RecipeBookRequest; } export interface ApiRecipeCreateRequest { - recipe: Recipe; + recipeRequest: RecipeRequest; } export interface ApiRecipeDestroyRequest { @@ -1042,7 +1162,7 @@ export interface ApiRecipeDestroyRequest { export interface ApiRecipeImageUpdateRequest { id: number; - image?: string; + image?: Blob; imageUrl?: string; } @@ -1080,7 +1200,7 @@ export interface ApiRecipeListRequest { export interface ApiRecipePartialUpdateRequest { id: number; - patchedRecipe?: PatchedRecipe; + patchedRecipeRequest?: PatchedRecipeRequest; } export interface ApiRecipeRelatedRetrieveRequest { @@ -1093,12 +1213,12 @@ export interface ApiRecipeRetrieveRequest { export interface ApiRecipeShoppingUpdateRequest { id: number; - recipeShoppingUpdate?: RecipeShoppingUpdate; + recipeShoppingUpdateRequest?: RecipeShoppingUpdateRequest; } export interface ApiRecipeUpdateRequest { id: number; - recipe: Recipe; + recipeRequest: RecipeRequest; } export interface ApiShareLinkRetrieveRequest { @@ -1106,11 +1226,11 @@ export interface ApiShareLinkRetrieveRequest { } export interface ApiShoppingListEntryBulkCreateRequest { - shoppingListEntryBulk: ShoppingListEntryBulk; + shoppingListEntryBulkRequest: ShoppingListEntryBulkRequest; } export interface ApiShoppingListEntryCreateRequest { - shoppingListEntry: ShoppingListEntry; + shoppingListEntryRequest: ShoppingListEntryRequest; } export interface ApiShoppingListEntryDestroyRequest { @@ -1125,7 +1245,7 @@ export interface ApiShoppingListEntryListRequest { export interface ApiShoppingListEntryPartialUpdateRequest { id: number; - patchedShoppingListEntry?: PatchedShoppingListEntry; + patchedShoppingListEntryRequest?: PatchedShoppingListEntryRequest; } export interface ApiShoppingListEntryRetrieveRequest { @@ -1134,11 +1254,11 @@ export interface ApiShoppingListEntryRetrieveRequest { export interface ApiShoppingListEntryUpdateRequest { id: number; - shoppingListEntry: ShoppingListEntry; + shoppingListEntryRequest: ShoppingListEntryRequest; } export interface ApiShoppingListRecipeCreateRequest { - shoppingListRecipe: ShoppingListRecipe; + shoppingListRecipeRequest: ShoppingListRecipeRequest; } export interface ApiShoppingListRecipeDestroyRequest { @@ -1147,7 +1267,7 @@ export interface ApiShoppingListRecipeDestroyRequest { export interface ApiShoppingListRecipePartialUpdateRequest { id: number; - patchedShoppingListRecipe?: PatchedShoppingListRecipe; + patchedShoppingListRecipeRequest?: PatchedShoppingListRecipeRequest; } export interface ApiShoppingListRecipeRetrieveRequest { @@ -1156,12 +1276,12 @@ export interface ApiShoppingListRecipeRetrieveRequest { export interface ApiShoppingListRecipeUpdateRequest { id: number; - shoppingListRecipe: ShoppingListRecipe; + shoppingListRecipeRequest: ShoppingListRecipeRequest; } export interface ApiSpacePartialUpdateRequest { id: number; - patchedSpace?: PatchedSpace; + patchedSpaceRequest?: PatchedSpaceRequest; } export interface ApiSpaceRetrieveRequest { @@ -1169,7 +1289,7 @@ export interface ApiSpaceRetrieveRequest { } export interface ApiStepCreateRequest { - step: Step; + stepRequest: StepRequest; } export interface ApiStepDestroyRequest { @@ -1185,7 +1305,7 @@ export interface ApiStepListRequest { export interface ApiStepPartialUpdateRequest { id: number; - patchedStep?: PatchedStep; + patchedStepRequest?: PatchedStepRequest; } export interface ApiStepRetrieveRequest { @@ -1194,11 +1314,11 @@ export interface ApiStepRetrieveRequest { export interface ApiStepUpdateRequest { id: number; - step: Step; + stepRequest: StepRequest; } export interface ApiStorageCreateRequest { - storage: Storage; + storageRequest: StorageRequest; } export interface ApiStorageDestroyRequest { @@ -1207,7 +1327,7 @@ export interface ApiStorageDestroyRequest { export interface ApiStoragePartialUpdateRequest { id: number; - patchedStorage?: PatchedStorage; + patchedStorageRequest?: PatchedStorageRequest; } export interface ApiStorageRetrieveRequest { @@ -1216,11 +1336,11 @@ export interface ApiStorageRetrieveRequest { export interface ApiStorageUpdateRequest { id: number; - storage: Storage; + storageRequest: StorageRequest; } export interface ApiSupermarketCategoryCreateRequest { - supermarketCategory: SupermarketCategory; + supermarketCategoryRequest: SupermarketCategoryRequest; } export interface ApiSupermarketCategoryDestroyRequest { @@ -1237,16 +1357,16 @@ export interface ApiSupermarketCategoryListRequest { export interface ApiSupermarketCategoryMergeUpdateRequest { id: number; target: string; - supermarketCategory: SupermarketCategory; + supermarketCategoryRequest: SupermarketCategoryRequest; } export interface ApiSupermarketCategoryPartialUpdateRequest { id: number; - patchedSupermarketCategory?: PatchedSupermarketCategory; + patchedSupermarketCategoryRequest?: PatchedSupermarketCategoryRequest; } export interface ApiSupermarketCategoryRelationCreateRequest { - supermarketCategoryRelation: SupermarketCategoryRelation; + supermarketCategoryRelationRequest: SupermarketCategoryRelationRequest; } export interface ApiSupermarketCategoryRelationDestroyRequest { @@ -1264,7 +1384,7 @@ export interface ApiSupermarketCategoryRelationListRequest { export interface ApiSupermarketCategoryRelationPartialUpdateRequest { id: number; - patchedSupermarketCategoryRelation?: PatchedSupermarketCategoryRelation; + patchedSupermarketCategoryRelationRequest?: PatchedSupermarketCategoryRelationRequest; } export interface ApiSupermarketCategoryRelationRetrieveRequest { @@ -1273,7 +1393,7 @@ export interface ApiSupermarketCategoryRelationRetrieveRequest { export interface ApiSupermarketCategoryRelationUpdateRequest { id: number; - supermarketCategoryRelation: SupermarketCategoryRelation; + supermarketCategoryRelationRequest: SupermarketCategoryRelationRequest; } export interface ApiSupermarketCategoryRetrieveRequest { @@ -1282,11 +1402,11 @@ export interface ApiSupermarketCategoryRetrieveRequest { export interface ApiSupermarketCategoryUpdateRequest { id: number; - supermarketCategory: SupermarketCategory; + supermarketCategoryRequest: SupermarketCategoryRequest; } export interface ApiSupermarketCreateRequest { - supermarket: Supermarket; + supermarketRequest: SupermarketRequest; } export interface ApiSupermarketDestroyRequest { @@ -1302,7 +1422,7 @@ export interface ApiSupermarketListRequest { export interface ApiSupermarketPartialUpdateRequest { id: number; - patchedSupermarket?: PatchedSupermarket; + patchedSupermarketRequest?: PatchedSupermarketRequest; } export interface ApiSupermarketRetrieveRequest { @@ -1311,7 +1431,7 @@ export interface ApiSupermarketRetrieveRequest { export interface ApiSupermarketUpdateRequest { id: number; - supermarket: Supermarket; + supermarketRequest: SupermarketRequest; } export interface ApiSwitchActiveSpaceRetrieveRequest { @@ -1319,7 +1439,7 @@ export interface ApiSwitchActiveSpaceRetrieveRequest { } export interface ApiSyncCreateRequest { - sync: Sync; + syncRequest: SyncRequest; } export interface ApiSyncDestroyRequest { @@ -1337,7 +1457,7 @@ export interface ApiSyncLogRetrieveRequest { export interface ApiSyncPartialUpdateRequest { id: number; - patchedSync?: PatchedSync; + patchedSyncRequest?: PatchedSyncRequest; } export interface ApiSyncRetrieveRequest { @@ -1346,11 +1466,11 @@ export interface ApiSyncRetrieveRequest { export interface ApiSyncUpdateRequest { id: number; - sync: Sync; + syncRequest: SyncRequest; } export interface ApiUnitConversionCreateRequest { - unitConversion: UnitConversion; + unitConversionRequest: UnitConversionRequest; } export interface ApiUnitConversionDestroyRequest { @@ -1363,7 +1483,7 @@ export interface ApiUnitConversionListRequest { export interface ApiUnitConversionPartialUpdateRequest { id: number; - patchedUnitConversion?: PatchedUnitConversion; + patchedUnitConversionRequest?: PatchedUnitConversionRequest; } export interface ApiUnitConversionRetrieveRequest { @@ -1372,11 +1492,11 @@ export interface ApiUnitConversionRetrieveRequest { export interface ApiUnitConversionUpdateRequest { id: number; - unitConversion: UnitConversion; + unitConversionRequest: UnitConversionRequest; } export interface ApiUnitCreateRequest { - unit: Unit; + unitRequest: UnitRequest; } export interface ApiUnitDestroyRequest { @@ -1395,12 +1515,12 @@ export interface ApiUnitListRequest { export interface ApiUnitMergeUpdateRequest { id: number; target: string; - unit: Unit; + unitRequest: UnitRequest; } export interface ApiUnitPartialUpdateRequest { id: number; - patchedUnit?: PatchedUnit; + patchedUnitRequest?: PatchedUnitRequest; } export interface ApiUnitRetrieveRequest { @@ -1409,16 +1529,12 @@ export interface ApiUnitRetrieveRequest { export interface ApiUnitUpdateRequest { id: number; - unit: Unit; + unitRequest: UnitRequest; } export interface ApiUserFileCreateRequest { - id: number; name: string; - file: string; - fileDownload: string; - preview: string; - fileSizeKb: number; + file: Blob; } export interface ApiUserFileDestroyRequest { @@ -1434,12 +1550,8 @@ export interface ApiUserFileListRequest { export interface ApiUserFilePartialUpdateRequest { id: number; - id2?: number; name?: string; - file?: string; - fileDownload?: string; - preview?: string; - fileSizeKb?: number; + file?: Blob; } export interface ApiUserFileRetrieveRequest { @@ -1448,22 +1560,18 @@ export interface ApiUserFileRetrieveRequest { export interface ApiUserFileUpdateRequest { id: number; - id2: number; name: string; - file: string; - fileDownload: string; - preview: string; - fileSizeKb: number; + file: Blob; } export interface ApiUserPartialUpdateRequest { id: number; - patchedUser?: PatchedUser; + patchedUserRequest?: PatchedUserRequest; } export interface ApiUserPreferencePartialUpdateRequest { user: number; - patchedUserPreference?: PatchedUserPreference; + patchedUserPreferenceRequest?: PatchedUserPreferenceRequest; } export interface ApiUserPreferenceRetrieveRequest { @@ -1485,7 +1593,7 @@ export interface ApiUserSpaceListRequest { export interface ApiUserSpacePartialUpdateRequest { id: number; - patchedUserSpace?: PatchedUserSpace; + patchedUserSpaceRequest?: PatchedUserSpaceRequest; } export interface ApiUserSpaceRetrieveRequest { @@ -1493,7 +1601,7 @@ export interface ApiUserSpaceRetrieveRequest { } export interface ApiViewLogCreateRequest { - viewLog: ViewLog; + viewLogRequest: ViewLogRequest; } export interface ApiViewLogDestroyRequest { @@ -1507,7 +1615,7 @@ export interface ApiViewLogListRequest { export interface ApiViewLogPartialUpdateRequest { id: number; - patchedViewLog?: PatchedViewLog; + patchedViewLogRequest?: PatchedViewLogRequest; } export interface ApiViewLogRetrieveRequest { @@ -1516,7 +1624,7 @@ export interface ApiViewLogRetrieveRequest { export interface ApiViewLogUpdateRequest { id: number; - viewLog: ViewLog; + viewLogRequest: ViewLogRequest; } /** @@ -1527,10 +1635,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiAccessTokenCreateRaw(requestParameters: ApiAccessTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['accessToken'] == null) { + if (requestParameters['accessTokenRequest'] == null) { throw new runtime.RequiredError( - 'accessToken', - 'Required parameter "accessToken" was null or undefined when calling apiAccessTokenCreate().' + 'accessTokenRequest', + 'Required parameter "accessTokenRequest" was null or undefined when calling apiAccessTokenCreate().' ); } @@ -1549,7 +1657,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: AccessTokenToJSON(requestParameters['accessToken']), + body: AccessTokenRequestToJSON(requestParameters['accessTokenRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue)); @@ -1649,7 +1757,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedAccessTokenToJSON(requestParameters['patchedAccessToken']), + body: PatchedAccessTokenRequestToJSON(requestParameters['patchedAccessTokenRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue)); @@ -1707,10 +1815,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['accessToken'] == null) { + if (requestParameters['accessTokenRequest'] == null) { throw new runtime.RequiredError( - 'accessToken', - 'Required parameter "accessToken" was null or undefined when calling apiAccessTokenUpdate().' + 'accessTokenRequest', + 'Required parameter "accessTokenRequest" was null or undefined when calling apiAccessTokenUpdate().' ); } @@ -1729,7 +1837,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: AccessTokenToJSON(requestParameters['accessToken']), + body: AccessTokenRequestToJSON(requestParameters['accessTokenRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue)); @@ -1773,10 +1881,10 @@ export class ApiApi extends runtime.BaseAPI { * list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace */ async apiAutomationCreateRaw(requestParameters: ApiAutomationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['automation'] == null) { + if (requestParameters['automationRequest'] == null) { throw new runtime.RequiredError( - 'automation', - 'Required parameter "automation" was null or undefined when calling apiAutomationCreate().' + 'automationRequest', + 'Required parameter "automationRequest" was null or undefined when calling apiAutomationCreate().' ); } @@ -1795,7 +1903,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: AutomationToJSON(requestParameters['automation']), + body: AutomationRequestToJSON(requestParameters['automationRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue)); @@ -1913,7 +2021,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedAutomationToJSON(requestParameters['patchedAutomation']), + body: PatchedAutomationRequestToJSON(requestParameters['patchedAutomationRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue)); @@ -1975,10 +2083,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['automation'] == null) { + if (requestParameters['automationRequest'] == null) { throw new runtime.RequiredError( - 'automation', - 'Required parameter "automation" was null or undefined when calling apiAutomationUpdate().' + 'automationRequest', + 'Required parameter "automationRequest" was null or undefined when calling apiAutomationUpdate().' ); } @@ -1997,7 +2105,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: AutomationToJSON(requestParameters['automation']), + body: AutomationRequestToJSON(requestParameters['automationRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue)); @@ -2014,10 +2122,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiBookmarkletImportCreateRaw(requestParameters: ApiBookmarkletImportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['bookmarkletImport'] == null) { + if (requestParameters['bookmarkletImportRequest'] == null) { throw new runtime.RequiredError( - 'bookmarkletImport', - 'Required parameter "bookmarkletImport" was null or undefined when calling apiBookmarkletImportCreate().' + 'bookmarkletImportRequest', + 'Required parameter "bookmarkletImportRequest" was null or undefined when calling apiBookmarkletImportCreate().' ); } @@ -2036,7 +2144,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: BookmarkletImportToJSON(requestParameters['bookmarkletImport']), + body: BookmarkletImportRequestToJSON(requestParameters['bookmarkletImportRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue)); @@ -2136,7 +2244,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedBookmarkletImportToJSON(requestParameters['patchedBookmarkletImport']), + body: PatchedBookmarkletImportRequestToJSON(requestParameters['patchedBookmarkletImportRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue)); @@ -2194,10 +2302,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['bookmarkletImport'] == null) { + if (requestParameters['bookmarkletImportRequest'] == null) { throw new runtime.RequiredError( - 'bookmarkletImport', - 'Required parameter "bookmarkletImport" was null or undefined when calling apiBookmarkletImportUpdate().' + 'bookmarkletImportRequest', + 'Required parameter "bookmarkletImportRequest" was null or undefined when calling apiBookmarkletImportUpdate().' ); } @@ -2216,7 +2324,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: BookmarkletImportToJSON(requestParameters['bookmarkletImport']), + body: BookmarkletImportRequestToJSON(requestParameters['bookmarkletImportRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue)); @@ -2232,10 +2340,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiConnectorConfigCreateRaw(requestParameters: ApiConnectorConfigCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['connectorConfigConfig'] == null) { + if (requestParameters['connectorConfigConfigRequest'] == null) { throw new runtime.RequiredError( - 'connectorConfigConfig', - 'Required parameter "connectorConfigConfig" was null or undefined when calling apiConnectorConfigCreate().' + 'connectorConfigConfigRequest', + 'Required parameter "connectorConfigConfigRequest" was null or undefined when calling apiConnectorConfigCreate().' ); } @@ -2254,7 +2362,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ConnectorConfigConfigToJSON(requestParameters['connectorConfigConfig']), + body: ConnectorConfigConfigRequestToJSON(requestParameters['connectorConfigConfigRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue)); @@ -2354,7 +2462,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedConnectorConfigConfigToJSON(requestParameters['patchedConnectorConfigConfig']), + body: PatchedConnectorConfigConfigRequestToJSON(requestParameters['patchedConnectorConfigConfigRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue)); @@ -2412,10 +2520,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['connectorConfigConfig'] == null) { + if (requestParameters['connectorConfigConfigRequest'] == null) { throw new runtime.RequiredError( - 'connectorConfigConfig', - 'Required parameter "connectorConfigConfig" was null or undefined when calling apiConnectorConfigUpdate().' + 'connectorConfigConfigRequest', + 'Required parameter "connectorConfigConfigRequest" was null or undefined when calling apiConnectorConfigUpdate().' ); } @@ -2434,7 +2542,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: ConnectorConfigConfigToJSON(requestParameters['connectorConfigConfig']), + body: ConnectorConfigConfigRequestToJSON(requestParameters['connectorConfigConfigRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue)); @@ -2450,10 +2558,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiCookLogCreateRaw(requestParameters: ApiCookLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cookLog'] == null) { + if (requestParameters['cookLogRequest'] == null) { throw new runtime.RequiredError( - 'cookLog', - 'Required parameter "cookLog" was null or undefined when calling apiCookLogCreate().' + 'cookLogRequest', + 'Required parameter "cookLogRequest" was null or undefined when calling apiCookLogCreate().' ); } @@ -2472,7 +2580,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: CookLogToJSON(requestParameters['cookLog']), + body: CookLogRequestToJSON(requestParameters['cookLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue)); @@ -2584,7 +2692,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedCookLogToJSON(requestParameters['patchedCookLog']), + body: PatchedCookLogRequestToJSON(requestParameters['patchedCookLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue)); @@ -2642,10 +2750,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['cookLog'] == null) { + if (requestParameters['cookLogRequest'] == null) { throw new runtime.RequiredError( - 'cookLog', - 'Required parameter "cookLog" was null or undefined when calling apiCookLogUpdate().' + 'cookLogRequest', + 'Required parameter "cookLogRequest" was null or undefined when calling apiCookLogUpdate().' ); } @@ -2664,7 +2772,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: CookLogToJSON(requestParameters['cookLog']), + body: CookLogRequestToJSON(requestParameters['cookLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue)); @@ -2680,10 +2788,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiCustomFilterCreateRaw(requestParameters: ApiCustomFilterCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['customFilter'] == null) { + if (requestParameters['customFilterRequest'] == null) { throw new runtime.RequiredError( - 'customFilter', - 'Required parameter "customFilter" was null or undefined when calling apiCustomFilterCreate().' + 'customFilterRequest', + 'Required parameter "customFilterRequest" was null or undefined when calling apiCustomFilterCreate().' ); } @@ -2702,7 +2810,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: CustomFilterToJSON(requestParameters['customFilter']), + body: CustomFilterRequestToJSON(requestParameters['customFilterRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue)); @@ -2826,7 +2934,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedCustomFilterToJSON(requestParameters['patchedCustomFilter']), + body: PatchedCustomFilterRequestToJSON(requestParameters['patchedCustomFilterRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue)); @@ -2884,10 +2992,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['customFilter'] == null) { + if (requestParameters['customFilterRequest'] == null) { throw new runtime.RequiredError( - 'customFilter', - 'Required parameter "customFilter" was null or undefined when calling apiCustomFilterUpdate().' + 'customFilterRequest', + 'Required parameter "customFilterRequest" was null or undefined when calling apiCustomFilterUpdate().' ); } @@ -2906,7 +3014,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: CustomFilterToJSON(requestParameters['customFilter']), + body: CustomFilterRequestToJSON(requestParameters['customFilterRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue)); @@ -2958,10 +3066,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiExportLogCreateRaw(requestParameters: ApiExportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['exportLog'] == null) { + if (requestParameters['exportLogRequest'] == null) { throw new runtime.RequiredError( - 'exportLog', - 'Required parameter "exportLog" was null or undefined when calling apiExportLogCreate().' + 'exportLogRequest', + 'Required parameter "exportLogRequest" was null or undefined when calling apiExportLogCreate().' ); } @@ -2980,7 +3088,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ExportLogToJSON(requestParameters['exportLog']), + body: ExportLogRequestToJSON(requestParameters['exportLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue)); @@ -3088,7 +3196,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedExportLogToJSON(requestParameters['patchedExportLog']), + body: PatchedExportLogRequestToJSON(requestParameters['patchedExportLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue)); @@ -3146,10 +3254,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['exportLog'] == null) { + if (requestParameters['exportLogRequest'] == null) { throw new runtime.RequiredError( - 'exportLog', - 'Required parameter "exportLog" was null or undefined when calling apiExportLogUpdate().' + 'exportLogRequest', + 'Required parameter "exportLogRequest" was null or undefined when calling apiExportLogUpdate().' ); } @@ -3168,7 +3276,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: ExportLogToJSON(requestParameters['exportLog']), + body: ExportLogRequestToJSON(requestParameters['exportLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue)); @@ -3184,10 +3292,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiFoodCreateRaw(requestParameters: ApiFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['food'] == null) { + if (requestParameters['foodRequest'] == null) { throw new runtime.RequiredError( - 'food', - 'Required parameter "food" was null or undefined when calling apiFoodCreate().' + 'foodRequest', + 'Required parameter "foodRequest" was null or undefined when calling apiFoodCreate().' ); } @@ -3206,7 +3314,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: FoodToJSON(requestParameters['food']), + body: FoodRequestToJSON(requestParameters['foodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); @@ -3264,10 +3372,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['food'] == null) { + if (requestParameters['foodRequest'] == null) { throw new runtime.RequiredError( - 'food', - 'Required parameter "food" was null or undefined when calling apiFoodFdcCreate().' + 'foodRequest', + 'Required parameter "foodRequest" was null or undefined when calling apiFoodFdcCreate().' ); } @@ -3286,7 +3394,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: FoodToJSON(requestParameters['food']), + body: FoodRequestToJSON(requestParameters['foodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); @@ -3440,10 +3548,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['food'] == null) { + if (requestParameters['foodRequest'] == null) { throw new runtime.RequiredError( - 'food', - 'Required parameter "food" was null or undefined when calling apiFoodMergeUpdate().' + 'foodRequest', + 'Required parameter "foodRequest" was null or undefined when calling apiFoodMergeUpdate().' ); } @@ -3462,7 +3570,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: FoodToJSON(requestParameters['food']), + body: FoodRequestToJSON(requestParameters['foodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); @@ -3492,10 +3600,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['food'] == null) { + if (requestParameters['foodRequest'] == null) { throw new runtime.RequiredError( - 'food', - 'Required parameter "food" was null or undefined when calling apiFoodMoveUpdate().' + 'foodRequest', + 'Required parameter "foodRequest" was null or undefined when calling apiFoodMoveUpdate().' ); } @@ -3514,7 +3622,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: FoodToJSON(requestParameters['food']), + body: FoodRequestToJSON(requestParameters['foodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); @@ -3552,7 +3660,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedFoodToJSON(requestParameters['patchedFood']), + body: PatchedFoodRequestToJSON(requestParameters['patchedFoodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); @@ -3568,10 +3676,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiFoodPropertyCreateRaw(requestParameters: ApiFoodPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['property'] == null) { + if (requestParameters['propertyRequest'] == null) { throw new runtime.RequiredError( - 'property', - 'Required parameter "property" was null or undefined when calling apiFoodPropertyCreate().' + 'propertyRequest', + 'Required parameter "propertyRequest" was null or undefined when calling apiFoodPropertyCreate().' ); } @@ -3590,7 +3698,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: PropertyToJSON(requestParameters['property']), + body: PropertyRequestToJSON(requestParameters['propertyRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue)); @@ -3690,7 +3798,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedPropertyToJSON(requestParameters['patchedProperty']), + body: PatchedPropertyRequestToJSON(requestParameters['patchedPropertyRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue)); @@ -3741,10 +3849,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiFoodPropertyTypeCreateRaw(requestParameters: ApiFoodPropertyTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['propertyType'] == null) { + if (requestParameters['propertyTypeRequest'] == null) { throw new runtime.RequiredError( - 'propertyType', - 'Required parameter "propertyType" was null or undefined when calling apiFoodPropertyTypeCreate().' + 'propertyTypeRequest', + 'Required parameter "propertyTypeRequest" was null or undefined when calling apiFoodPropertyTypeCreate().' ); } @@ -3763,7 +3871,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: PropertyTypeToJSON(requestParameters['propertyType']), + body: PropertyTypeRequestToJSON(requestParameters['propertyTypeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue)); @@ -3863,7 +3971,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedPropertyTypeToJSON(requestParameters['patchedPropertyType']), + body: PatchedPropertyTypeRequestToJSON(requestParameters['patchedPropertyTypeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue)); @@ -3921,10 +4029,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['propertyType'] == null) { + if (requestParameters['propertyTypeRequest'] == null) { throw new runtime.RequiredError( - 'propertyType', - 'Required parameter "propertyType" was null or undefined when calling apiFoodPropertyTypeUpdate().' + 'propertyTypeRequest', + 'Required parameter "propertyTypeRequest" was null or undefined when calling apiFoodPropertyTypeUpdate().' ); } @@ -3943,7 +4051,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: PropertyTypeToJSON(requestParameters['propertyType']), + body: PropertyTypeRequestToJSON(requestParameters['propertyTypeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue)); @@ -3966,10 +4074,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['property'] == null) { + if (requestParameters['propertyRequest'] == null) { throw new runtime.RequiredError( - 'property', - 'Required parameter "property" was null or undefined when calling apiFoodPropertyUpdate().' + 'propertyRequest', + 'Required parameter "propertyRequest" was null or undefined when calling apiFoodPropertyUpdate().' ); } @@ -3988,7 +4096,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: PropertyToJSON(requestParameters['property']), + body: PropertyRequestToJSON(requestParameters['propertyRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue)); @@ -4046,10 +4154,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['foodShoppingUpdate'] == null) { + if (requestParameters['foodShoppingUpdateRequest'] == null) { throw new runtime.RequiredError( - 'foodShoppingUpdate', - 'Required parameter "foodShoppingUpdate" was null or undefined when calling apiFoodShoppingUpdate().' + 'foodShoppingUpdateRequest', + 'Required parameter "foodShoppingUpdateRequest" was null or undefined when calling apiFoodShoppingUpdate().' ); } @@ -4068,7 +4176,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: FoodShoppingUpdateToJSON(requestParameters['foodShoppingUpdate']), + body: FoodShoppingUpdateRequestToJSON(requestParameters['foodShoppingUpdateRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodShoppingUpdateFromJSON(jsonValue)); @@ -4091,10 +4199,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['food'] == null) { + if (requestParameters['foodRequest'] == null) { throw new runtime.RequiredError( - 'food', - 'Required parameter "food" was null or undefined when calling apiFoodUpdate().' + 'foodRequest', + 'Required parameter "foodRequest" was null or undefined when calling apiFoodUpdate().' ); } @@ -4113,7 +4221,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: FoodToJSON(requestParameters['food']), + body: FoodRequestToJSON(requestParameters['foodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); @@ -4221,10 +4329,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiImportLogCreateRaw(requestParameters: ApiImportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['importLog'] == null) { + if (requestParameters['importLogRequest'] == null) { throw new runtime.RequiredError( - 'importLog', - 'Required parameter "importLog" was null or undefined when calling apiImportLogCreate().' + 'importLogRequest', + 'Required parameter "importLogRequest" was null or undefined when calling apiImportLogCreate().' ); } @@ -4243,7 +4351,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ImportLogToJSON(requestParameters['importLog']), + body: ImportLogRequestToJSON(requestParameters['importLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue)); @@ -4351,7 +4459,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedImportLogToJSON(requestParameters['patchedImportLog']), + body: PatchedImportLogRequestToJSON(requestParameters['patchedImportLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue)); @@ -4409,10 +4517,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['importLog'] == null) { + if (requestParameters['importLogRequest'] == null) { throw new runtime.RequiredError( - 'importLog', - 'Required parameter "importLog" was null or undefined when calling apiImportLogUpdate().' + 'importLogRequest', + 'Required parameter "importLogRequest" was null or undefined when calling apiImportLogUpdate().' ); } @@ -4431,7 +4539,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: ImportLogToJSON(requestParameters['importLog']), + body: ImportLogRequestToJSON(requestParameters['importLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue)); @@ -4447,10 +4555,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiIngredientCreateRaw(requestParameters: ApiIngredientCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['ingredient'] == null) { + if (requestParameters['ingredientRequest'] == null) { throw new runtime.RequiredError( - 'ingredient', - 'Required parameter "ingredient" was null or undefined when calling apiIngredientCreate().' + 'ingredientRequest', + 'Required parameter "ingredientRequest" was null or undefined when calling apiIngredientCreate().' ); } @@ -4469,7 +4577,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: IngredientToJSON(requestParameters['ingredient']), + body: IngredientRequestToJSON(requestParameters['ingredientRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue)); @@ -4577,7 +4685,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedIngredientToJSON(requestParameters['patchedIngredient']), + body: PatchedIngredientRequestToJSON(requestParameters['patchedIngredientRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue)); @@ -4635,10 +4743,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['ingredient'] == null) { + if (requestParameters['ingredientRequest'] == null) { throw new runtime.RequiredError( - 'ingredient', - 'Required parameter "ingredient" was null or undefined when calling apiIngredientUpdate().' + 'ingredientRequest', + 'Required parameter "ingredientRequest" was null or undefined when calling apiIngredientUpdate().' ); } @@ -4657,7 +4765,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: IngredientToJSON(requestParameters['ingredient']), + body: IngredientRequestToJSON(requestParameters['ingredientRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue)); @@ -4673,10 +4781,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiInviteLinkCreateRaw(requestParameters: ApiInviteLinkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['inviteLink'] == null) { + if (requestParameters['inviteLinkRequest'] == null) { throw new runtime.RequiredError( - 'inviteLink', - 'Required parameter "inviteLink" was null or undefined when calling apiInviteLinkCreate().' + 'inviteLinkRequest', + 'Required parameter "inviteLinkRequest" was null or undefined when calling apiInviteLinkCreate().' ); } @@ -4695,7 +4803,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: InviteLinkToJSON(requestParameters['inviteLink']), + body: InviteLinkRequestToJSON(requestParameters['inviteLinkRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue)); @@ -4811,7 +4919,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedInviteLinkToJSON(requestParameters['patchedInviteLink']), + body: PatchedInviteLinkRequestToJSON(requestParameters['patchedInviteLinkRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue)); @@ -4869,10 +4977,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['inviteLink'] == null) { + if (requestParameters['inviteLinkRequest'] == null) { throw new runtime.RequiredError( - 'inviteLink', - 'Required parameter "inviteLink" was null or undefined when calling apiInviteLinkUpdate().' + 'inviteLinkRequest', + 'Required parameter "inviteLinkRequest" was null or undefined when calling apiInviteLinkUpdate().' ); } @@ -4891,7 +4999,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: InviteLinkToJSON(requestParameters['inviteLink']), + body: InviteLinkRequestToJSON(requestParameters['inviteLinkRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue)); @@ -4907,10 +5015,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiKeywordCreateRaw(requestParameters: ApiKeywordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['keyword'] == null) { + if (requestParameters['keywordRequest'] == null) { throw new runtime.RequiredError( - 'keyword', - 'Required parameter "keyword" was null or undefined when calling apiKeywordCreate().' + 'keywordRequest', + 'Required parameter "keywordRequest" was null or undefined when calling apiKeywordCreate().' ); } @@ -4929,7 +5037,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: KeywordToJSON(requestParameters['keyword']), + body: KeywordRequestToJSON(requestParameters['keywordRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue)); @@ -5053,10 +5161,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['keyword'] == null) { + if (requestParameters['keywordRequest'] == null) { throw new runtime.RequiredError( - 'keyword', - 'Required parameter "keyword" was null or undefined when calling apiKeywordMergeUpdate().' + 'keywordRequest', + 'Required parameter "keywordRequest" was null or undefined when calling apiKeywordMergeUpdate().' ); } @@ -5075,7 +5183,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: KeywordToJSON(requestParameters['keyword']), + body: KeywordRequestToJSON(requestParameters['keywordRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue)); @@ -5105,10 +5213,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['keyword'] == null) { + if (requestParameters['keywordRequest'] == null) { throw new runtime.RequiredError( - 'keyword', - 'Required parameter "keyword" was null or undefined when calling apiKeywordMoveUpdate().' + 'keywordRequest', + 'Required parameter "keywordRequest" was null or undefined when calling apiKeywordMoveUpdate().' ); } @@ -5127,7 +5235,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: KeywordToJSON(requestParameters['keyword']), + body: KeywordRequestToJSON(requestParameters['keywordRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue)); @@ -5165,7 +5273,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedKeywordToJSON(requestParameters['patchedKeyword']), + body: PatchedKeywordRequestToJSON(requestParameters['patchedKeywordRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue)); @@ -5223,10 +5331,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['keyword'] == null) { + if (requestParameters['keywordRequest'] == null) { throw new runtime.RequiredError( - 'keyword', - 'Required parameter "keyword" was null or undefined when calling apiKeywordUpdate().' + 'keywordRequest', + 'Required parameter "keywordRequest" was null or undefined when calling apiKeywordUpdate().' ); } @@ -5245,7 +5353,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: KeywordToJSON(requestParameters['keyword']), + body: KeywordRequestToJSON(requestParameters['keywordRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue)); @@ -5262,10 +5370,10 @@ export class ApiApi extends runtime.BaseAPI { * list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID */ async apiMealPlanCreateRaw(requestParameters: ApiMealPlanCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['mealPlan'] == null) { + if (requestParameters['mealPlanRequest'] == null) { throw new runtime.RequiredError( - 'mealPlan', - 'Required parameter "mealPlan" was null or undefined when calling apiMealPlanCreate().' + 'mealPlanRequest', + 'Required parameter "mealPlanRequest" was null or undefined when calling apiMealPlanCreate().' ); } @@ -5284,7 +5392,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: MealPlanToJSON(requestParameters['mealPlan']), + body: MealPlanRequestToJSON(requestParameters['mealPlanRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue)); @@ -5448,7 +5556,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedMealPlanToJSON(requestParameters['patchedMealPlan']), + body: PatchedMealPlanRequestToJSON(requestParameters['patchedMealPlanRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue)); @@ -5510,10 +5618,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['mealPlan'] == null) { + if (requestParameters['mealPlanRequest'] == null) { throw new runtime.RequiredError( - 'mealPlan', - 'Required parameter "mealPlan" was null or undefined when calling apiMealPlanUpdate().' + 'mealPlanRequest', + 'Required parameter "mealPlanRequest" was null or undefined when calling apiMealPlanUpdate().' ); } @@ -5532,7 +5640,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: MealPlanToJSON(requestParameters['mealPlan']), + body: MealPlanRequestToJSON(requestParameters['mealPlanRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue)); @@ -5550,10 +5658,10 @@ export class ApiApi extends runtime.BaseAPI { * returns list of meal types created by the requesting user ordered by the order field. */ async apiMealTypeCreateRaw(requestParameters: ApiMealTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['mealType'] == null) { + if (requestParameters['mealTypeRequest'] == null) { throw new runtime.RequiredError( - 'mealType', - 'Required parameter "mealType" was null or undefined when calling apiMealTypeCreate().' + 'mealTypeRequest', + 'Required parameter "mealTypeRequest" was null or undefined when calling apiMealTypeCreate().' ); } @@ -5572,7 +5680,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: MealTypeToJSON(requestParameters['mealType']), + body: MealTypeRequestToJSON(requestParameters['mealTypeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue)); @@ -5678,7 +5786,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedMealTypeToJSON(requestParameters['patchedMealType']), + body: PatchedMealTypeRequestToJSON(requestParameters['patchedMealTypeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue)); @@ -5740,10 +5848,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['mealType'] == null) { + if (requestParameters['mealTypeRequest'] == null) { throw new runtime.RequiredError( - 'mealType', - 'Required parameter "mealType" was null or undefined when calling apiMealTypeUpdate().' + 'mealTypeRequest', + 'Required parameter "mealTypeRequest" was null or undefined when calling apiMealTypeUpdate().' ); } @@ -5762,7 +5870,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: MealTypeToJSON(requestParameters['mealType']), + body: MealTypeRequestToJSON(requestParameters['mealTypeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue)); @@ -5779,10 +5887,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataCategoryCreateRaw(requestParameters: ApiOpenDataCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataCategory'] == null) { + if (requestParameters['openDataCategoryRequest'] == null) { throw new runtime.RequiredError( - 'openDataCategory', - 'Required parameter "openDataCategory" was null or undefined when calling apiOpenDataCategoryCreate().' + 'openDataCategoryRequest', + 'Required parameter "openDataCategoryRequest" was null or undefined when calling apiOpenDataCategoryCreate().' ); } @@ -5801,7 +5909,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataCategoryToJSON(requestParameters['openDataCategory']), + body: OpenDataCategoryRequestToJSON(requestParameters['openDataCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue)); @@ -5901,7 +6009,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataCategoryToJSON(requestParameters['patchedOpenDataCategory']), + body: PatchedOpenDataCategoryRequestToJSON(requestParameters['patchedOpenDataCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue)); @@ -5959,10 +6067,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataCategory'] == null) { + if (requestParameters['openDataCategoryRequest'] == null) { throw new runtime.RequiredError( - 'openDataCategory', - 'Required parameter "openDataCategory" was null or undefined when calling apiOpenDataCategoryUpdate().' + 'openDataCategoryRequest', + 'Required parameter "openDataCategoryRequest" was null or undefined when calling apiOpenDataCategoryUpdate().' ); } @@ -5981,7 +6089,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataCategoryToJSON(requestParameters['openDataCategory']), + body: OpenDataCategoryRequestToJSON(requestParameters['openDataCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue)); @@ -5997,10 +6105,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataConversionCreateRaw(requestParameters: ApiOpenDataConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataConversion'] == null) { + if (requestParameters['openDataConversionRequest'] == null) { throw new runtime.RequiredError( - 'openDataConversion', - 'Required parameter "openDataConversion" was null or undefined when calling apiOpenDataConversionCreate().' + 'openDataConversionRequest', + 'Required parameter "openDataConversionRequest" was null or undefined when calling apiOpenDataConversionCreate().' ); } @@ -6019,7 +6127,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataConversionToJSON(requestParameters['openDataConversion']), + body: OpenDataConversionRequestToJSON(requestParameters['openDataConversionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue)); @@ -6119,7 +6227,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataConversionToJSON(requestParameters['patchedOpenDataConversion']), + body: PatchedOpenDataConversionRequestToJSON(requestParameters['patchedOpenDataConversionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue)); @@ -6177,10 +6285,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataConversion'] == null) { + if (requestParameters['openDataConversionRequest'] == null) { throw new runtime.RequiredError( - 'openDataConversion', - 'Required parameter "openDataConversion" was null or undefined when calling apiOpenDataConversionUpdate().' + 'openDataConversionRequest', + 'Required parameter "openDataConversionRequest" was null or undefined when calling apiOpenDataConversionUpdate().' ); } @@ -6199,7 +6307,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataConversionToJSON(requestParameters['openDataConversion']), + body: OpenDataConversionRequestToJSON(requestParameters['openDataConversionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue)); @@ -6249,10 +6357,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataFoodCreateRaw(requestParameters: ApiOpenDataFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataFood'] == null) { + if (requestParameters['openDataFoodRequest'] == null) { throw new runtime.RequiredError( - 'openDataFood', - 'Required parameter "openDataFood" was null or undefined when calling apiOpenDataFoodCreate().' + 'openDataFoodRequest', + 'Required parameter "openDataFoodRequest" was null or undefined when calling apiOpenDataFoodCreate().' ); } @@ -6271,7 +6379,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataFoodToJSON(requestParameters['openDataFood']), + body: OpenDataFoodRequestToJSON(requestParameters['openDataFoodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue)); @@ -6371,7 +6479,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataFoodToJSON(requestParameters['patchedOpenDataFood']), + body: PatchedOpenDataFoodRequestToJSON(requestParameters['patchedOpenDataFoodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue)); @@ -6429,10 +6537,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataFood'] == null) { + if (requestParameters['openDataFoodRequest'] == null) { throw new runtime.RequiredError( - 'openDataFood', - 'Required parameter "openDataFood" was null or undefined when calling apiOpenDataFoodUpdate().' + 'openDataFoodRequest', + 'Required parameter "openDataFoodRequest" was null or undefined when calling apiOpenDataFoodUpdate().' ); } @@ -6451,7 +6559,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataFoodToJSON(requestParameters['openDataFood']), + body: OpenDataFoodRequestToJSON(requestParameters['openDataFoodRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue)); @@ -6467,10 +6575,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataPropertyCreateRaw(requestParameters: ApiOpenDataPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataProperty'] == null) { + if (requestParameters['openDataPropertyRequest'] == null) { throw new runtime.RequiredError( - 'openDataProperty', - 'Required parameter "openDataProperty" was null or undefined when calling apiOpenDataPropertyCreate().' + 'openDataPropertyRequest', + 'Required parameter "openDataPropertyRequest" was null or undefined when calling apiOpenDataPropertyCreate().' ); } @@ -6489,7 +6597,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataPropertyToJSON(requestParameters['openDataProperty']), + body: OpenDataPropertyRequestToJSON(requestParameters['openDataPropertyRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue)); @@ -6589,7 +6697,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataPropertyToJSON(requestParameters['patchedOpenDataProperty']), + body: PatchedOpenDataPropertyRequestToJSON(requestParameters['patchedOpenDataPropertyRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue)); @@ -6647,10 +6755,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataProperty'] == null) { + if (requestParameters['openDataPropertyRequest'] == null) { throw new runtime.RequiredError( - 'openDataProperty', - 'Required parameter "openDataProperty" was null or undefined when calling apiOpenDataPropertyUpdate().' + 'openDataPropertyRequest', + 'Required parameter "openDataPropertyRequest" was null or undefined when calling apiOpenDataPropertyUpdate().' ); } @@ -6669,7 +6777,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataPropertyToJSON(requestParameters['openDataProperty']), + body: OpenDataPropertyRequestToJSON(requestParameters['openDataPropertyRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue)); @@ -6712,10 +6820,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataStoreCreateRaw(requestParameters: ApiOpenDataStoreCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataStore'] == null) { + if (requestParameters['openDataStoreRequest'] == null) { throw new runtime.RequiredError( - 'openDataStore', - 'Required parameter "openDataStore" was null or undefined when calling apiOpenDataStoreCreate().' + 'openDataStoreRequest', + 'Required parameter "openDataStoreRequest" was null or undefined when calling apiOpenDataStoreCreate().' ); } @@ -6734,7 +6842,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataStoreToJSON(requestParameters['openDataStore']), + body: OpenDataStoreRequestToJSON(requestParameters['openDataStoreRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue)); @@ -6834,7 +6942,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataStoreToJSON(requestParameters['patchedOpenDataStore']), + body: PatchedOpenDataStoreRequestToJSON(requestParameters['patchedOpenDataStoreRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue)); @@ -6892,10 +7000,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataStore'] == null) { + if (requestParameters['openDataStoreRequest'] == null) { throw new runtime.RequiredError( - 'openDataStore', - 'Required parameter "openDataStore" was null or undefined when calling apiOpenDataStoreUpdate().' + 'openDataStoreRequest', + 'Required parameter "openDataStoreRequest" was null or undefined when calling apiOpenDataStoreUpdate().' ); } @@ -6914,7 +7022,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataStoreToJSON(requestParameters['openDataStore']), + body: OpenDataStoreRequestToJSON(requestParameters['openDataStoreRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue)); @@ -6930,10 +7038,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataUnitCreateRaw(requestParameters: ApiOpenDataUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataUnit'] == null) { + if (requestParameters['openDataUnitRequest'] == null) { throw new runtime.RequiredError( - 'openDataUnit', - 'Required parameter "openDataUnit" was null or undefined when calling apiOpenDataUnitCreate().' + 'openDataUnitRequest', + 'Required parameter "openDataUnitRequest" was null or undefined when calling apiOpenDataUnitCreate().' ); } @@ -6952,7 +7060,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataUnitToJSON(requestParameters['openDataUnit']), + body: OpenDataUnitRequestToJSON(requestParameters['openDataUnitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue)); @@ -7052,7 +7160,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataUnitToJSON(requestParameters['patchedOpenDataUnit']), + body: PatchedOpenDataUnitRequestToJSON(requestParameters['patchedOpenDataUnitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue)); @@ -7110,10 +7218,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataUnit'] == null) { + if (requestParameters['openDataUnitRequest'] == null) { throw new runtime.RequiredError( - 'openDataUnit', - 'Required parameter "openDataUnit" was null or undefined when calling apiOpenDataUnitUpdate().' + 'openDataUnitRequest', + 'Required parameter "openDataUnitRequest" was null or undefined when calling apiOpenDataUnitUpdate().' ); } @@ -7132,7 +7240,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataUnitToJSON(requestParameters['openDataUnit']), + body: OpenDataUnitRequestToJSON(requestParameters['openDataUnitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue)); @@ -7148,10 +7256,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiOpenDataVersionCreateRaw(requestParameters: ApiOpenDataVersionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openDataVersion'] == null) { + if (requestParameters['openDataVersionRequest'] == null) { throw new runtime.RequiredError( - 'openDataVersion', - 'Required parameter "openDataVersion" was null or undefined when calling apiOpenDataVersionCreate().' + 'openDataVersionRequest', + 'Required parameter "openDataVersionRequest" was null or undefined when calling apiOpenDataVersionCreate().' ); } @@ -7170,7 +7278,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenDataVersionToJSON(requestParameters['openDataVersion']), + body: OpenDataVersionRequestToJSON(requestParameters['openDataVersionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue)); @@ -7270,7 +7378,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedOpenDataVersionToJSON(requestParameters['patchedOpenDataVersion']), + body: PatchedOpenDataVersionRequestToJSON(requestParameters['patchedOpenDataVersionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue)); @@ -7328,10 +7436,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['openDataVersion'] == null) { + if (requestParameters['openDataVersionRequest'] == null) { throw new runtime.RequiredError( - 'openDataVersion', - 'Required parameter "openDataVersion" was null or undefined when calling apiOpenDataVersionUpdate().' + 'openDataVersionRequest', + 'Required parameter "openDataVersionRequest" was null or undefined when calling apiOpenDataVersionUpdate().' ); } @@ -7350,7 +7458,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenDataVersionToJSON(requestParameters['openDataVersion']), + body: OpenDataVersionRequestToJSON(requestParameters['openDataVersionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue)); @@ -7407,10 +7515,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiRecipeBookCreateRaw(requestParameters: ApiRecipeBookCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['recipeBook'] == null) { + if (requestParameters['recipeBookRequest'] == null) { throw new runtime.RequiredError( - 'recipeBook', - 'Required parameter "recipeBook" was null or undefined when calling apiRecipeBookCreate().' + 'recipeBookRequest', + 'Required parameter "recipeBookRequest" was null or undefined when calling apiRecipeBookCreate().' ); } @@ -7429,7 +7537,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: RecipeBookToJSON(requestParameters['recipeBook']), + body: RecipeBookRequestToJSON(requestParameters['recipeBookRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue)); @@ -7480,10 +7588,10 @@ export class ApiApi extends runtime.BaseAPI { * list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book */ async apiRecipeBookEntryCreateRaw(requestParameters: ApiRecipeBookEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['recipeBookEntry'] == null) { + if (requestParameters['recipeBookEntryRequest'] == null) { throw new runtime.RequiredError( - 'recipeBookEntry', - 'Required parameter "recipeBookEntry" was null or undefined when calling apiRecipeBookEntryCreate().' + 'recipeBookEntryRequest', + 'Required parameter "recipeBookEntryRequest" was null or undefined when calling apiRecipeBookEntryCreate().' ); } @@ -7502,7 +7610,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: RecipeBookEntryToJSON(requestParameters['recipeBookEntry']), + body: RecipeBookEntryRequestToJSON(requestParameters['recipeBookEntryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue)); @@ -7608,7 +7716,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedRecipeBookEntryToJSON(requestParameters['patchedRecipeBookEntry']), + body: PatchedRecipeBookEntryRequestToJSON(requestParameters['patchedRecipeBookEntryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue)); @@ -7670,10 +7778,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['recipeBookEntry'] == null) { + if (requestParameters['recipeBookEntryRequest'] == null) { throw new runtime.RequiredError( - 'recipeBookEntry', - 'Required parameter "recipeBookEntry" was null or undefined when calling apiRecipeBookEntryUpdate().' + 'recipeBookEntryRequest', + 'Required parameter "recipeBookEntryRequest" was null or undefined when calling apiRecipeBookEntryUpdate().' ); } @@ -7692,7 +7800,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: RecipeBookEntryToJSON(requestParameters['recipeBookEntry']), + body: RecipeBookEntryRequestToJSON(requestParameters['recipeBookEntryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue)); @@ -7775,7 +7883,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedRecipeBookToJSON(requestParameters['patchedRecipeBook']), + body: PatchedRecipeBookRequestToJSON(requestParameters['patchedRecipeBookRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue)); @@ -7833,10 +7941,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['recipeBook'] == null) { + if (requestParameters['recipeBookRequest'] == null) { throw new runtime.RequiredError( - 'recipeBook', - 'Required parameter "recipeBook" was null or undefined when calling apiRecipeBookUpdate().' + 'recipeBookRequest', + 'Required parameter "recipeBookRequest" was null or undefined when calling apiRecipeBookUpdate().' ); } @@ -7855,7 +7963,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: RecipeBookToJSON(requestParameters['recipeBook']), + body: RecipeBookRequestToJSON(requestParameters['recipeBookRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue)); @@ -7871,10 +7979,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiRecipeCreateRaw(requestParameters: ApiRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['recipe'] == null) { + if (requestParameters['recipeRequest'] == null) { throw new runtime.RequiredError( - 'recipe', - 'Required parameter "recipe" was null or undefined when calling apiRecipeCreate().' + 'recipeRequest', + 'Required parameter "recipeRequest" was null or undefined when calling apiRecipeCreate().' ); } @@ -7893,7 +8001,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: RecipeToJSON(requestParameters['recipe']), + body: RecipeRequestToJSON(requestParameters['recipeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue)); @@ -8023,6 +8131,8 @@ export class ApiApi extends runtime.BaseAPI { let formParams: { append(param: string, value: any): any }; let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; if (useForm) { formParams = new FormData(); } else { @@ -8224,7 +8334,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedRecipeToJSON(requestParameters['patchedRecipe']), + body: PatchedRecipeRequestToJSON(requestParameters['patchedRecipeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue)); @@ -8332,7 +8442,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: RecipeShoppingUpdateToJSON(requestParameters['recipeShoppingUpdate']), + body: RecipeShoppingUpdateRequestToJSON(requestParameters['recipeShoppingUpdateRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeShoppingUpdateFromJSON(jsonValue)); @@ -8355,10 +8465,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['recipe'] == null) { + if (requestParameters['recipeRequest'] == null) { throw new runtime.RequiredError( - 'recipe', - 'Required parameter "recipe" was null or undefined when calling apiRecipeUpdate().' + 'recipeRequest', + 'Required parameter "recipeRequest" was null or undefined when calling apiRecipeUpdate().' ); } @@ -8377,7 +8487,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: RecipeToJSON(requestParameters['recipe']), + body: RecipeRequestToJSON(requestParameters['recipeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue)); @@ -8456,10 +8566,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiShoppingListEntryBulkCreateRaw(requestParameters: ApiShoppingListEntryBulkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['shoppingListEntryBulk'] == null) { + if (requestParameters['shoppingListEntryBulkRequest'] == null) { throw new runtime.RequiredError( - 'shoppingListEntryBulk', - 'Required parameter "shoppingListEntryBulk" was null or undefined when calling apiShoppingListEntryBulkCreate().' + 'shoppingListEntryBulkRequest', + 'Required parameter "shoppingListEntryBulkRequest" was null or undefined when calling apiShoppingListEntryBulkCreate().' ); } @@ -8478,7 +8588,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ShoppingListEntryBulkToJSON(requestParameters['shoppingListEntryBulk']), + body: ShoppingListEntryBulkRequestToJSON(requestParameters['shoppingListEntryBulkRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryBulkFromJSON(jsonValue)); @@ -8494,10 +8604,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiShoppingListEntryCreateRaw(requestParameters: ApiShoppingListEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['shoppingListEntry'] == null) { + if (requestParameters['shoppingListEntryRequest'] == null) { throw new runtime.RequiredError( - 'shoppingListEntry', - 'Required parameter "shoppingListEntry" was null or undefined when calling apiShoppingListEntryCreate().' + 'shoppingListEntryRequest', + 'Required parameter "shoppingListEntryRequest" was null or undefined when calling apiShoppingListEntryCreate().' ); } @@ -8516,7 +8626,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ShoppingListEntryToJSON(requestParameters['shoppingListEntry']), + body: ShoppingListEntryRequestToJSON(requestParameters['shoppingListEntryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue)); @@ -8628,7 +8738,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedShoppingListEntryToJSON(requestParameters['patchedShoppingListEntry']), + body: PatchedShoppingListEntryRequestToJSON(requestParameters['patchedShoppingListEntryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue)); @@ -8686,10 +8796,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['shoppingListEntry'] == null) { + if (requestParameters['shoppingListEntryRequest'] == null) { throw new runtime.RequiredError( - 'shoppingListEntry', - 'Required parameter "shoppingListEntry" was null or undefined when calling apiShoppingListEntryUpdate().' + 'shoppingListEntryRequest', + 'Required parameter "shoppingListEntryRequest" was null or undefined when calling apiShoppingListEntryUpdate().' ); } @@ -8708,7 +8818,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: ShoppingListEntryToJSON(requestParameters['shoppingListEntry']), + body: ShoppingListEntryRequestToJSON(requestParameters['shoppingListEntryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue)); @@ -8724,10 +8834,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiShoppingListRecipeCreateRaw(requestParameters: ApiShoppingListRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['shoppingListRecipe'] == null) { + if (requestParameters['shoppingListRecipeRequest'] == null) { throw new runtime.RequiredError( - 'shoppingListRecipe', - 'Required parameter "shoppingListRecipe" was null or undefined when calling apiShoppingListRecipeCreate().' + 'shoppingListRecipeRequest', + 'Required parameter "shoppingListRecipeRequest" was null or undefined when calling apiShoppingListRecipeCreate().' ); } @@ -8746,7 +8856,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ShoppingListRecipeToJSON(requestParameters['shoppingListRecipe']), + body: ShoppingListRecipeRequestToJSON(requestParameters['shoppingListRecipeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue)); @@ -8846,7 +8956,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedShoppingListRecipeToJSON(requestParameters['patchedShoppingListRecipe']), + body: PatchedShoppingListRecipeRequestToJSON(requestParameters['patchedShoppingListRecipeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue)); @@ -8904,10 +9014,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['shoppingListRecipe'] == null) { + if (requestParameters['shoppingListRecipeRequest'] == null) { throw new runtime.RequiredError( - 'shoppingListRecipe', - 'Required parameter "shoppingListRecipe" was null or undefined when calling apiShoppingListRecipeUpdate().' + 'shoppingListRecipeRequest', + 'Required parameter "shoppingListRecipeRequest" was null or undefined when calling apiShoppingListRecipeUpdate().' ); } @@ -8926,7 +9036,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: ShoppingListRecipeToJSON(requestParameters['shoppingListRecipe']), + body: ShoppingListRecipeRequestToJSON(requestParameters['shoppingListRecipeRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue)); @@ -8992,7 +9102,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedSpaceToJSON(requestParameters['patchedSpace']), + body: PatchedSpaceRequestToJSON(requestParameters['patchedSpaceRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SpaceFromJSON(jsonValue)); @@ -9043,10 +9153,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiStepCreateRaw(requestParameters: ApiStepCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['step'] == null) { + if (requestParameters['stepRequest'] == null) { throw new runtime.RequiredError( - 'step', - 'Required parameter "step" was null or undefined when calling apiStepCreate().' + 'stepRequest', + 'Required parameter "stepRequest" was null or undefined when calling apiStepCreate().' ); } @@ -9065,7 +9175,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: StepToJSON(requestParameters['step']), + body: StepRequestToJSON(requestParameters['stepRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue)); @@ -9181,7 +9291,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedStepToJSON(requestParameters['patchedStep']), + body: PatchedStepRequestToJSON(requestParameters['patchedStepRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue)); @@ -9239,10 +9349,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['step'] == null) { + if (requestParameters['stepRequest'] == null) { throw new runtime.RequiredError( - 'step', - 'Required parameter "step" was null or undefined when calling apiStepUpdate().' + 'stepRequest', + 'Required parameter "stepRequest" was null or undefined when calling apiStepUpdate().' ); } @@ -9261,7 +9371,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: StepToJSON(requestParameters['step']), + body: StepRequestToJSON(requestParameters['stepRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue)); @@ -9277,10 +9387,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiStorageCreateRaw(requestParameters: ApiStorageCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['storage'] == null) { + if (requestParameters['storageRequest'] == null) { throw new runtime.RequiredError( - 'storage', - 'Required parameter "storage" was null or undefined when calling apiStorageCreate().' + 'storageRequest', + 'Required parameter "storageRequest" was null or undefined when calling apiStorageCreate().' ); } @@ -9299,7 +9409,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: StorageToJSON(requestParameters['storage']), + body: StorageRequestToJSON(requestParameters['storageRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue)); @@ -9399,7 +9509,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedStorageToJSON(requestParameters['patchedStorage']), + body: PatchedStorageRequestToJSON(requestParameters['patchedStorageRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue)); @@ -9457,10 +9567,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['storage'] == null) { + if (requestParameters['storageRequest'] == null) { throw new runtime.RequiredError( - 'storage', - 'Required parameter "storage" was null or undefined when calling apiStorageUpdate().' + 'storageRequest', + 'Required parameter "storageRequest" was null or undefined when calling apiStorageUpdate().' ); } @@ -9479,7 +9589,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: StorageToJSON(requestParameters['storage']), + body: StorageRequestToJSON(requestParameters['storageRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue)); @@ -9495,10 +9605,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiSupermarketCategoryCreateRaw(requestParameters: ApiSupermarketCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['supermarketCategory'] == null) { + if (requestParameters['supermarketCategoryRequest'] == null) { throw new runtime.RequiredError( - 'supermarketCategory', - 'Required parameter "supermarketCategory" was null or undefined when calling apiSupermarketCategoryCreate().' + 'supermarketCategoryRequest', + 'Required parameter "supermarketCategoryRequest" was null or undefined when calling apiSupermarketCategoryCreate().' ); } @@ -9517,7 +9627,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: SupermarketCategoryToJSON(requestParameters['supermarketCategory']), + body: SupermarketCategoryRequestToJSON(requestParameters['supermarketCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue)); @@ -9625,10 +9735,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['supermarketCategory'] == null) { + if (requestParameters['supermarketCategoryRequest'] == null) { throw new runtime.RequiredError( - 'supermarketCategory', - 'Required parameter "supermarketCategory" was null or undefined when calling apiSupermarketCategoryMergeUpdate().' + 'supermarketCategoryRequest', + 'Required parameter "supermarketCategoryRequest" was null or undefined when calling apiSupermarketCategoryMergeUpdate().' ); } @@ -9647,7 +9757,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: SupermarketCategoryToJSON(requestParameters['supermarketCategory']), + body: SupermarketCategoryRequestToJSON(requestParameters['supermarketCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue)); @@ -9685,7 +9795,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedSupermarketCategoryToJSON(requestParameters['patchedSupermarketCategory']), + body: PatchedSupermarketCategoryRequestToJSON(requestParameters['patchedSupermarketCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue)); @@ -9701,10 +9811,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiSupermarketCategoryRelationCreateRaw(requestParameters: ApiSupermarketCategoryRelationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['supermarketCategoryRelation'] == null) { + if (requestParameters['supermarketCategoryRelationRequest'] == null) { throw new runtime.RequiredError( - 'supermarketCategoryRelation', - 'Required parameter "supermarketCategoryRelation" was null or undefined when calling apiSupermarketCategoryRelationCreate().' + 'supermarketCategoryRelationRequest', + 'Required parameter "supermarketCategoryRelationRequest" was null or undefined when calling apiSupermarketCategoryRelationCreate().' ); } @@ -9723,7 +9833,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: SupermarketCategoryRelationToJSON(requestParameters['supermarketCategoryRelation']), + body: SupermarketCategoryRelationRequestToJSON(requestParameters['supermarketCategoryRelationRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue)); @@ -9847,7 +9957,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedSupermarketCategoryRelationToJSON(requestParameters['patchedSupermarketCategoryRelation']), + body: PatchedSupermarketCategoryRelationRequestToJSON(requestParameters['patchedSupermarketCategoryRelationRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue)); @@ -9905,10 +10015,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['supermarketCategoryRelation'] == null) { + if (requestParameters['supermarketCategoryRelationRequest'] == null) { throw new runtime.RequiredError( - 'supermarketCategoryRelation', - 'Required parameter "supermarketCategoryRelation" was null or undefined when calling apiSupermarketCategoryRelationUpdate().' + 'supermarketCategoryRelationRequest', + 'Required parameter "supermarketCategoryRelationRequest" was null or undefined when calling apiSupermarketCategoryRelationUpdate().' ); } @@ -9927,7 +10037,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: SupermarketCategoryRelationToJSON(requestParameters['supermarketCategoryRelation']), + body: SupermarketCategoryRelationRequestToJSON(requestParameters['supermarketCategoryRelationRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue)); @@ -9985,10 +10095,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['supermarketCategory'] == null) { + if (requestParameters['supermarketCategoryRequest'] == null) { throw new runtime.RequiredError( - 'supermarketCategory', - 'Required parameter "supermarketCategory" was null or undefined when calling apiSupermarketCategoryUpdate().' + 'supermarketCategoryRequest', + 'Required parameter "supermarketCategoryRequest" was null or undefined when calling apiSupermarketCategoryUpdate().' ); } @@ -10007,7 +10117,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: SupermarketCategoryToJSON(requestParameters['supermarketCategory']), + body: SupermarketCategoryRequestToJSON(requestParameters['supermarketCategoryRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue)); @@ -10023,10 +10133,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiSupermarketCreateRaw(requestParameters: ApiSupermarketCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['supermarket'] == null) { + if (requestParameters['supermarketRequest'] == null) { throw new runtime.RequiredError( - 'supermarket', - 'Required parameter "supermarket" was null or undefined when calling apiSupermarketCreate().' + 'supermarketRequest', + 'Required parameter "supermarketRequest" was null or undefined when calling apiSupermarketCreate().' ); } @@ -10045,7 +10155,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: SupermarketToJSON(requestParameters['supermarket']), + body: SupermarketRequestToJSON(requestParameters['supermarketRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue)); @@ -10161,7 +10271,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedSupermarketToJSON(requestParameters['patchedSupermarket']), + body: PatchedSupermarketRequestToJSON(requestParameters['patchedSupermarketRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue)); @@ -10219,10 +10329,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['supermarket'] == null) { + if (requestParameters['supermarketRequest'] == null) { throw new runtime.RequiredError( - 'supermarket', - 'Required parameter "supermarket" was null or undefined when calling apiSupermarketUpdate().' + 'supermarketRequest', + 'Required parameter "supermarketRequest" was null or undefined when calling apiSupermarketUpdate().' ); } @@ -10241,7 +10351,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: SupermarketToJSON(requestParameters['supermarket']), + body: SupermarketRequestToJSON(requestParameters['supermarketRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue)); @@ -10293,10 +10403,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiSyncCreateRaw(requestParameters: ApiSyncCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['sync'] == null) { + if (requestParameters['syncRequest'] == null) { throw new runtime.RequiredError( - 'sync', - 'Required parameter "sync" was null or undefined when calling apiSyncCreate().' + 'syncRequest', + 'Required parameter "syncRequest" was null or undefined when calling apiSyncCreate().' ); } @@ -10315,7 +10425,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: SyncToJSON(requestParameters['sync']), + body: SyncRequestToJSON(requestParameters['syncRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue)); @@ -10486,7 +10596,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedSyncToJSON(requestParameters['patchedSync']), + body: PatchedSyncRequestToJSON(requestParameters['patchedSyncRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue)); @@ -10544,10 +10654,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['sync'] == null) { + if (requestParameters['syncRequest'] == null) { throw new runtime.RequiredError( - 'sync', - 'Required parameter "sync" was null or undefined when calling apiSyncUpdate().' + 'syncRequest', + 'Required parameter "syncRequest" was null or undefined when calling apiSyncUpdate().' ); } @@ -10566,7 +10676,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: SyncToJSON(requestParameters['sync']), + body: SyncRequestToJSON(requestParameters['syncRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue)); @@ -10582,10 +10692,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiUnitConversionCreateRaw(requestParameters: ApiUnitConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['unitConversion'] == null) { + if (requestParameters['unitConversionRequest'] == null) { throw new runtime.RequiredError( - 'unitConversion', - 'Required parameter "unitConversion" was null or undefined when calling apiUnitConversionCreate().' + 'unitConversionRequest', + 'Required parameter "unitConversionRequest" was null or undefined when calling apiUnitConversionCreate().' ); } @@ -10604,7 +10714,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: UnitConversionToJSON(requestParameters['unitConversion']), + body: UnitConversionRequestToJSON(requestParameters['unitConversionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue)); @@ -10708,7 +10818,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedUnitConversionToJSON(requestParameters['patchedUnitConversion']), + body: PatchedUnitConversionRequestToJSON(requestParameters['patchedUnitConversionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue)); @@ -10766,10 +10876,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['unitConversion'] == null) { + if (requestParameters['unitConversionRequest'] == null) { throw new runtime.RequiredError( - 'unitConversion', - 'Required parameter "unitConversion" was null or undefined when calling apiUnitConversionUpdate().' + 'unitConversionRequest', + 'Required parameter "unitConversionRequest" was null or undefined when calling apiUnitConversionUpdate().' ); } @@ -10788,7 +10898,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: UnitConversionToJSON(requestParameters['unitConversion']), + body: UnitConversionRequestToJSON(requestParameters['unitConversionRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue)); @@ -10804,10 +10914,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiUnitCreateRaw(requestParameters: ApiUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['unit'] == null) { + if (requestParameters['unitRequest'] == null) { throw new runtime.RequiredError( - 'unit', - 'Required parameter "unit" was null or undefined when calling apiUnitCreate().' + 'unitRequest', + 'Required parameter "unitRequest" was null or undefined when calling apiUnitCreate().' ); } @@ -10826,7 +10936,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: UnitToJSON(requestParameters['unit']), + body: UnitRequestToJSON(requestParameters['unitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue)); @@ -10942,10 +11052,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['unit'] == null) { + if (requestParameters['unitRequest'] == null) { throw new runtime.RequiredError( - 'unit', - 'Required parameter "unit" was null or undefined when calling apiUnitMergeUpdate().' + 'unitRequest', + 'Required parameter "unitRequest" was null or undefined when calling apiUnitMergeUpdate().' ); } @@ -10964,7 +11074,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: UnitToJSON(requestParameters['unit']), + body: UnitRequestToJSON(requestParameters['unitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue)); @@ -11002,7 +11112,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedUnitToJSON(requestParameters['patchedUnit']), + body: PatchedUnitRequestToJSON(requestParameters['patchedUnitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue)); @@ -11060,10 +11170,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['unit'] == null) { + if (requestParameters['unitRequest'] == null) { throw new runtime.RequiredError( - 'unit', - 'Required parameter "unit" was null or undefined when calling apiUnitUpdate().' + 'unitRequest', + 'Required parameter "unitRequest" was null or undefined when calling apiUnitUpdate().' ); } @@ -11082,7 +11192,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: UnitToJSON(requestParameters['unit']), + body: UnitRequestToJSON(requestParameters['unitRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue)); @@ -11098,13 +11208,6 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiUserFileCreateRaw(requestParameters: ApiUserFileCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling apiUserFileCreate().' - ); - } - if (requestParameters['name'] == null) { throw new runtime.RequiredError( 'name', @@ -11119,27 +11222,6 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['fileDownload'] == null) { - throw new runtime.RequiredError( - 'fileDownload', - 'Required parameter "fileDownload" was null or undefined when calling apiUserFileCreate().' - ); - } - - if (requestParameters['preview'] == null) { - throw new runtime.RequiredError( - 'preview', - 'Required parameter "preview" was null or undefined when calling apiUserFileCreate().' - ); - } - - if (requestParameters['fileSizeKb'] == null) { - throw new runtime.RequiredError( - 'fileSizeKb', - 'Required parameter "fileSizeKb" was null or undefined when calling apiUserFileCreate().' - ); - } - const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -11156,16 +11238,14 @@ export class ApiApi extends runtime.BaseAPI { let formParams: { append(param: string, value: any): any }; let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; if (useForm) { formParams = new FormData(); } else { formParams = new URLSearchParams(); } - if (requestParameters['id'] != null) { - formParams.append('id', requestParameters['id'] as any); - } - if (requestParameters['name'] != null) { formParams.append('name', requestParameters['name'] as any); } @@ -11174,18 +11254,6 @@ export class ApiApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } - if (requestParameters['fileDownload'] != null) { - formParams.append('file_download', requestParameters['fileDownload'] as any); - } - - if (requestParameters['preview'] != null) { - formParams.append('preview', requestParameters['preview'] as any); - } - - if (requestParameters['fileSizeKb'] != null) { - formParams.append('file_size_kb', requestParameters['fileSizeKb'] as any); - } - const response = await this.request({ path: `/api/user-file/`, method: 'POST', @@ -11308,16 +11376,14 @@ export class ApiApi extends runtime.BaseAPI { let formParams: { append(param: string, value: any): any }; let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; if (useForm) { formParams = new FormData(); } else { formParams = new URLSearchParams(); } - if (requestParameters['id2'] != null) { - formParams.append('id', requestParameters['id2'] as any); - } - if (requestParameters['name'] != null) { formParams.append('name', requestParameters['name'] as any); } @@ -11326,18 +11392,6 @@ export class ApiApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } - if (requestParameters['fileDownload'] != null) { - formParams.append('file_download', requestParameters['fileDownload'] as any); - } - - if (requestParameters['preview'] != null) { - formParams.append('preview', requestParameters['preview'] as any); - } - - if (requestParameters['fileSizeKb'] != null) { - formParams.append('file_size_kb', requestParameters['fileSizeKb'] as any); - } - const response = await this.request({ path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -11401,13 +11455,6 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['id2'] == null) { - throw new runtime.RequiredError( - 'id2', - 'Required parameter "id2" was null or undefined when calling apiUserFileUpdate().' - ); - } - if (requestParameters['name'] == null) { throw new runtime.RequiredError( 'name', @@ -11422,27 +11469,6 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['fileDownload'] == null) { - throw new runtime.RequiredError( - 'fileDownload', - 'Required parameter "fileDownload" was null or undefined when calling apiUserFileUpdate().' - ); - } - - if (requestParameters['preview'] == null) { - throw new runtime.RequiredError( - 'preview', - 'Required parameter "preview" was null or undefined when calling apiUserFileUpdate().' - ); - } - - if (requestParameters['fileSizeKb'] == null) { - throw new runtime.RequiredError( - 'fileSizeKb', - 'Required parameter "fileSizeKb" was null or undefined when calling apiUserFileUpdate().' - ); - } - const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -11459,16 +11485,14 @@ export class ApiApi extends runtime.BaseAPI { let formParams: { append(param: string, value: any): any }; let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; if (useForm) { formParams = new FormData(); } else { formParams = new URLSearchParams(); } - if (requestParameters['id2'] != null) { - formParams.append('id', requestParameters['id2'] as any); - } - if (requestParameters['name'] != null) { formParams.append('name', requestParameters['name'] as any); } @@ -11477,18 +11501,6 @@ export class ApiApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } - if (requestParameters['fileDownload'] != null) { - formParams.append('file_download', requestParameters['fileDownload'] as any); - } - - if (requestParameters['preview'] != null) { - formParams.append('preview', requestParameters['preview'] as any); - } - - if (requestParameters['fileSizeKb'] != null) { - formParams.append('file_size_kb', requestParameters['fileSizeKb'] as any); - } - const response = await this.request({ path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -11563,7 +11575,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedUserToJSON(requestParameters['patchedUser']), + body: PatchedUserRequestToJSON(requestParameters['patchedUserRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); @@ -11630,7 +11642,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedUserPreferenceToJSON(requestParameters['patchedUserPreference']), + body: PatchedUserPreferenceRequestToJSON(requestParameters['patchedUserPreferenceRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferenceFromJSON(jsonValue)); @@ -11810,7 +11822,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedUserSpaceToJSON(requestParameters['patchedUserSpace']), + body: PatchedUserSpaceRequestToJSON(requestParameters['patchedUserSpaceRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserSpaceFromJSON(jsonValue)); @@ -11861,10 +11873,10 @@ export class ApiApi extends runtime.BaseAPI { /** */ async apiViewLogCreateRaw(requestParameters: ApiViewLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['viewLog'] == null) { + if (requestParameters['viewLogRequest'] == null) { throw new runtime.RequiredError( - 'viewLog', - 'Required parameter "viewLog" was null or undefined when calling apiViewLogCreate().' + 'viewLogRequest', + 'Required parameter "viewLogRequest" was null or undefined when calling apiViewLogCreate().' ); } @@ -11883,7 +11895,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: ViewLogToJSON(requestParameters['viewLog']), + body: ViewLogRequestToJSON(requestParameters['viewLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue)); @@ -11991,7 +12003,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PATCH', headers: headerParameters, query: queryParameters, - body: PatchedViewLogToJSON(requestParameters['patchedViewLog']), + body: PatchedViewLogRequestToJSON(requestParameters['patchedViewLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue)); @@ -12049,10 +12061,10 @@ export class ApiApi extends runtime.BaseAPI { ); } - if (requestParameters['viewLog'] == null) { + if (requestParameters['viewLogRequest'] == null) { throw new runtime.RequiredError( - 'viewLog', - 'Required parameter "viewLog" was null or undefined when calling apiViewLogUpdate().' + 'viewLogRequest', + 'Required parameter "viewLogRequest" was null or undefined when calling apiViewLogUpdate().' ); } @@ -12071,7 +12083,7 @@ export class ApiApi extends runtime.BaseAPI { method: 'PUT', headers: headerParameters, query: queryParameters, - body: ViewLogToJSON(requestParameters['viewLog']), + body: ViewLogRequestToJSON(requestParameters['viewLogRequest']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue)); diff --git a/vue3/src/openapi/apis/ApiTokenAuthApi.ts b/vue3/src/openapi/apis/ApiTokenAuthApi.ts index 066ad9400..b5dc81aef 100644 --- a/vue3/src/openapi/apis/ApiTokenAuthApi.ts +++ b/vue3/src/openapi/apis/ApiTokenAuthApi.ts @@ -25,7 +25,6 @@ import { export interface ApiTokenAuthCreateRequest { username: string; password: string; - token: string; } /** @@ -50,13 +49,6 @@ export class ApiTokenAuthApi extends runtime.BaseAPI { ); } - if (requestParameters['token'] == null) { - throw new runtime.RequiredError( - 'token', - 'Required parameter "token" was null or undefined when calling apiTokenAuthCreate().' - ); - } - const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -89,10 +81,6 @@ export class ApiTokenAuthApi extends runtime.BaseAPI { formParams.append('password', requestParameters['password'] as any); } - if (requestParameters['token'] != null) { - formParams.append('token', requestParameters['token'] as any); - } - const response = await this.request({ path: `/api-token-auth/`, method: 'POST', diff --git a/vue3/src/openapi/models/AccessToken.ts b/vue3/src/openapi/models/AccessToken.ts index 253cbf8be..6d7729d91 100644 --- a/vue3/src/openapi/models/AccessToken.ts +++ b/vue3/src/openapi/models/AccessToken.ts @@ -24,7 +24,7 @@ export interface AccessToken { * @type {number} * @memberof AccessToken */ - readonly id: number; + id?: number; /** * * @type {string} @@ -61,7 +61,6 @@ export interface AccessToken { * Check if a given object implements the AccessToken interface. */ export function instanceOfAccessToken(value: object): boolean { - if (!('id' in value)) return false; if (!('token' in value)) return false; if (!('expires' in value)) return false; if (!('created' in value)) return false; @@ -79,7 +78,7 @@ export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'token': json['token'], 'expires': (new Date(json['expires'])), 'scope': json['scope'] == null ? undefined : json['scope'], @@ -94,6 +93,7 @@ export function AccessTokenToJSON(value?: AccessToken | null): any { } return { + 'id': value['id'], 'expires': ((value['expires']).toISOString()), 'scope': value['scope'], }; diff --git a/vue3/src/openapi/models/AccessTokenRequest.ts b/vue3/src/openapi/models/AccessTokenRequest.ts new file mode 100644 index 000000000..a38f518bc --- /dev/null +++ b/vue3/src/openapi/models/AccessTokenRequest.ts @@ -0,0 +1,69 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any { + if (value == null) { + return value; + } + return { + + 'expires': ((value['expires']).toISOString()), + 'scope': value['scope'], + }; +} + diff --git a/vue3/src/openapi/models/AuthToken.ts b/vue3/src/openapi/models/AuthToken.ts index 59fad29b9..36d5d97d1 100644 --- a/vue3/src/openapi/models/AuthToken.ts +++ b/vue3/src/openapi/models/AuthToken.ts @@ -19,18 +19,6 @@ import { mapValues } from '../runtime'; * @interface AuthToken */ export interface AuthToken { - /** - * - * @type {string} - * @memberof AuthToken - */ - username: string; - /** - * - * @type {string} - * @memberof AuthToken - */ - password: string; /** * * @type {string} @@ -43,8 +31,6 @@ export interface AuthToken { * Check if a given object implements the AuthToken interface. */ export function instanceOfAuthToken(value: object): boolean { - if (!('username' in value)) return false; - if (!('password' in value)) return false; if (!('token' in value)) return false; return true; } @@ -59,8 +45,6 @@ export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'username': json['username'], - 'password': json['password'], 'token': json['token'], }; } @@ -71,8 +55,6 @@ export function AuthTokenToJSON(value?: AuthToken | null): any { } return { - 'username': value['username'], - 'password': value['password'], }; } diff --git a/vue3/src/openapi/models/AuthTokenRequest.ts b/vue3/src/openapi/models/AuthTokenRequest.ts new file mode 100644 index 000000000..fdabefe50 --- /dev/null +++ b/vue3/src/openapi/models/AuthTokenRequest.ts @@ -0,0 +1,70 @@ +/* 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/Automation.ts b/vue3/src/openapi/models/Automation.ts index f2513221f..bf779b250 100644 --- a/vue3/src/openapi/models/Automation.ts +++ b/vue3/src/openapi/models/Automation.ts @@ -31,7 +31,7 @@ export interface Automation { * @type {number} * @memberof Automation */ - readonly id: number; + id?: number; /** * * @type {AutomationTypeEnum} @@ -92,7 +92,6 @@ export interface Automation { * Check if a given object implements the Automation interface. */ export function instanceOfAutomation(value: object): boolean { - if (!('id' in value)) return false; if (!('type' in value)) return false; if (!('createdBy' in value)) return false; return true; @@ -108,7 +107,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'type': AutomationTypeEnumFromJSON(json['type']), 'name': json['name'] == null ? undefined : json['name'], 'description': json['description'] == null ? undefined : json['description'], @@ -127,6 +126,7 @@ export function AutomationToJSON(value?: Automation | null): any { } return { + 'id': value['id'], 'type': AutomationTypeEnumToJSON(value['type']), 'name': value['name'], 'description': value['description'], diff --git a/vue3/src/openapi/models/AutomationRequest.ts b/vue3/src/openapi/models/AutomationRequest.ts new file mode 100644 index 000000000..304bafe55 --- /dev/null +++ b/vue3/src/openapi/models/AutomationRequest.ts @@ -0,0 +1,124 @@ +/* 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 { AutomationTypeEnum } from './AutomationTypeEnum'; +import { + AutomationTypeEnumFromJSON, + AutomationTypeEnumFromJSONTyped, + AutomationTypeEnumToJSON, +} from './AutomationTypeEnum'; + +/** + * + * @export + * @interface AutomationRequest + */ +export interface AutomationRequest { + /** + * + * @type {AutomationTypeEnum} + * @memberof AutomationRequest + */ + type: AutomationTypeEnum; + /** + * + * @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; +} + +/** + * 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': AutomationTypeEnumFromJSON(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'], + }; +} + +export function AutomationRequestToJSON(value?: AutomationRequest | null): any { + if (value == null) { + return value; + } + return { + + 'type': AutomationTypeEnumToJSON(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'], + }; +} + diff --git a/vue3/src/openapi/models/BookmarkletImport.ts b/vue3/src/openapi/models/BookmarkletImport.ts index c0e42fd61..e4a044752 100644 --- a/vue3/src/openapi/models/BookmarkletImport.ts +++ b/vue3/src/openapi/models/BookmarkletImport.ts @@ -24,7 +24,7 @@ export interface BookmarkletImport { * @type {number} * @memberof BookmarkletImport */ - readonly id: number; + id?: number; /** * * @type {string} @@ -55,7 +55,6 @@ export interface BookmarkletImport { * Check if a given object implements the BookmarkletImport interface. */ export function instanceOfBookmarkletImport(value: object): boolean { - if (!('id' in value)) return false; if (!('html' in value)) return false; if (!('createdBy' in value)) return false; if (!('createdAt' in value)) return false; @@ -72,7 +71,7 @@ export function BookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: b } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'url': json['url'] == null ? undefined : json['url'], 'html': json['html'], 'createdBy': json['created_by'], @@ -86,6 +85,7 @@ export function BookmarkletImportToJSON(value?: BookmarkletImport | null): any { } return { + 'id': value['id'], 'url': value['url'], 'html': value['html'], }; diff --git a/vue3/src/openapi/models/BookmarkletImportList.ts b/vue3/src/openapi/models/BookmarkletImportList.ts index 3fa437510..3a7310ee0 100644 --- a/vue3/src/openapi/models/BookmarkletImportList.ts +++ b/vue3/src/openapi/models/BookmarkletImportList.ts @@ -24,7 +24,7 @@ export interface BookmarkletImportList { * @type {number} * @memberof BookmarkletImportList */ - readonly id: number; + id?: number; /** * * @type {string} @@ -49,7 +49,6 @@ export interface BookmarkletImportList { * Check if a given object implements the BookmarkletImportList interface. */ export function instanceOfBookmarkletImportList(value: object): boolean { - if (!('id' in value)) return false; if (!('createdBy' in value)) return false; if (!('createdAt' in value)) return false; return true; @@ -65,7 +64,7 @@ export function BookmarkletImportListFromJSONTyped(json: any, ignoreDiscriminato } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'url': json['url'] == null ? undefined : json['url'], 'createdBy': json['created_by'], 'createdAt': (new Date(json['created_at'])), @@ -78,6 +77,7 @@ export function BookmarkletImportListToJSON(value?: BookmarkletImportList | null } return { + 'id': value['id'], 'url': value['url'], }; } diff --git a/vue3/src/openapi/models/BookmarkletImportRequest.ts b/vue3/src/openapi/models/BookmarkletImportRequest.ts new file mode 100644 index 000000000..d5d76538d --- /dev/null +++ b/vue3/src/openapi/models/BookmarkletImportRequest.ts @@ -0,0 +1,69 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest | null): any { + if (value == null) { + return value; + } + return { + + 'url': value['url'], + 'html': value['html'], + }; +} + diff --git a/vue3/src/openapi/models/ConnectorConfigConfig.ts b/vue3/src/openapi/models/ConnectorConfigConfig.ts index 0f9ebe3dc..7bf7541d3 100644 --- a/vue3/src/openapi/models/ConnectorConfigConfig.ts +++ b/vue3/src/openapi/models/ConnectorConfigConfig.ts @@ -24,7 +24,7 @@ export interface ConnectorConfigConfig { * @type {number} * @memberof ConnectorConfigConfig */ - readonly id: number; + id?: number; /** * * @type {string} @@ -37,12 +37,6 @@ export interface ConnectorConfigConfig { * @memberof ConnectorConfigConfig */ url?: string; - /** - * - * @type {string} - * @memberof ConnectorConfigConfig - */ - token?: string; /** * * @type {string} @@ -85,7 +79,6 @@ export interface ConnectorConfigConfig { * Check if a given object implements the ConnectorConfigConfig interface. */ export function instanceOfConnectorConfigConfig(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('createdBy' in value)) return false; return true; @@ -101,10 +94,9 @@ export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminato } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], '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'], @@ -120,9 +112,9 @@ export function ConnectorConfigConfigToJSON(value?: ConnectorConfigConfig | null } return { + 'id': value['id'], 'name': value['name'], 'url': value['url'], - 'token': value['token'], 'todo_entity': value['todoEntity'], 'enabled': value['enabled'], 'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'], diff --git a/vue3/src/openapi/models/ConnectorConfigConfigRequest.ts b/vue3/src/openapi/models/ConnectorConfigConfigRequest.ts new file mode 100644 index 000000000..be72e25b1 --- /dev/null +++ b/vue3/src/openapi/models/ConnectorConfigConfigRequest.ts @@ -0,0 +1,117 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/CookLog.ts b/vue3/src/openapi/models/CookLog.ts index 10297e3db..e40d9c97c 100644 --- a/vue3/src/openapi/models/CookLog.ts +++ b/vue3/src/openapi/models/CookLog.ts @@ -31,7 +31,7 @@ export interface CookLog { * @type {number} * @memberof CookLog */ - readonly id: number; + id?: number; /** * * @type {number} @@ -80,7 +80,6 @@ export interface CookLog { * Check if a given object implements the CookLog interface. */ export function instanceOfCookLog(value: object): boolean { - if (!('id' in value)) return false; if (!('recipe' in value)) return false; if (!('createdBy' in value)) return false; if (!('updatedAt' in value)) return false; @@ -97,7 +96,7 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'recipe': json['recipe'], 'servings': json['servings'] == null ? undefined : json['servings'], 'rating': json['rating'] == null ? undefined : json['rating'], @@ -114,6 +113,7 @@ export function CookLogToJSON(value?: CookLog | null): any { } return { + 'id': value['id'], 'recipe': value['recipe'], 'servings': value['servings'], 'rating': value['rating'], diff --git a/vue3/src/openapi/models/CookLogRequest.ts b/vue3/src/openapi/models/CookLogRequest.ts new file mode 100644 index 000000000..25540853f --- /dev/null +++ b/vue3/src/openapi/models/CookLogRequest.ts @@ -0,0 +1,93 @@ +/* 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; +} + +/** + * 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'])), + }; +} + +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()), + }; +} + diff --git a/vue3/src/openapi/models/CustomFilter.ts b/vue3/src/openapi/models/CustomFilter.ts index 8e565b6c6..22073e78d 100644 --- a/vue3/src/openapi/models/CustomFilter.ts +++ b/vue3/src/openapi/models/CustomFilter.ts @@ -31,7 +31,7 @@ export interface CustomFilter { * @type {number} * @memberof CustomFilter */ - readonly id: number; + id?: number; /** * * @type {string} @@ -62,7 +62,6 @@ export interface CustomFilter { * Check if a given object implements the CustomFilter interface. */ export function instanceOfCustomFilter(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('search' in value)) return false; if (!('createdBy' in value)) return false; @@ -79,7 +78,7 @@ export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'search': json['search'], 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array).map(UserFromJSON)), @@ -93,6 +92,7 @@ export function CustomFilterToJSON(value?: CustomFilter | null): any { } return { + 'id': value['id'], 'name': value['name'], 'search': value['search'], 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array).map(UserToJSON)), diff --git a/vue3/src/openapi/models/CustomFilterRequest.ts b/vue3/src/openapi/models/CustomFilterRequest.ts new file mode 100644 index 000000000..0f2e85cf0 --- /dev/null +++ b/vue3/src/openapi/models/CustomFilterRequest.ts @@ -0,0 +1,85 @@ +/* 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; +} + +/** + * 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)), + }; +} + +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)), + }; +} + diff --git a/vue3/src/openapi/models/ExportLog.ts b/vue3/src/openapi/models/ExportLog.ts index 9e7ece359..672a0ede6 100644 --- a/vue3/src/openapi/models/ExportLog.ts +++ b/vue3/src/openapi/models/ExportLog.ts @@ -24,7 +24,7 @@ export interface ExportLog { * @type {number} * @memberof ExportLog */ - readonly id: number; + id?: number; /** * * @type {string} @@ -85,7 +85,6 @@ export interface ExportLog { * Check if a given object implements the ExportLog interface. */ export function instanceOfExportLog(value: object): boolean { - if (!('id' in value)) return false; if (!('type' in value)) return false; if (!('createdBy' in value)) return false; if (!('createdAt' in value)) return false; @@ -102,7 +101,7 @@ export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'type': json['type'], 'msg': json['msg'] == null ? undefined : json['msg'], 'running': json['running'] == null ? undefined : json['running'], @@ -121,6 +120,7 @@ export function ExportLogToJSON(value?: ExportLog | null): any { } return { + 'id': value['id'], 'type': value['type'], 'msg': value['msg'], 'running': value['running'], diff --git a/vue3/src/openapi/models/ExportLogRequest.ts b/vue3/src/openapi/models/ExportLogRequest.ts new file mode 100644 index 000000000..a1cc9a8a9 --- /dev/null +++ b/vue3/src/openapi/models/ExportLogRequest.ts @@ -0,0 +1,109 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/Food.ts b/vue3/src/openapi/models/Food.ts index f6404b2e7..ec9bba0bf 100644 --- a/vue3/src/openapi/models/Food.ts +++ b/vue3/src/openapi/models/Food.ts @@ -95,7 +95,7 @@ export interface Food { * @type {number} * @memberof Food */ - readonly id: number; + id?: number; /** * * @type {string} @@ -240,7 +240,6 @@ export interface Food { * Check if a given object implements the Food interface. */ export function instanceOfFood(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('shopping' in value)) return false; if (!('parent' in value)) return false; @@ -260,7 +259,7 @@ export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], 'description': json['description'] == null ? undefined : json['description'], @@ -293,6 +292,7 @@ export function FoodToJSON(value?: Food | null): any { } return { + 'id': value['id'], 'name': value['name'], 'plural_name': value['pluralName'], 'description': value['description'], diff --git a/vue3/src/openapi/models/FoodInheritField.ts b/vue3/src/openapi/models/FoodInheritField.ts index fdb876134..f4fd592fc 100644 --- a/vue3/src/openapi/models/FoodInheritField.ts +++ b/vue3/src/openapi/models/FoodInheritField.ts @@ -58,7 +58,7 @@ export interface FoodInheritField { * @type {number} * @memberof FoodInheritField */ - readonly id: number; + id?: number; /** * * @type {string} @@ -77,7 +77,6 @@ export interface FoodInheritField { * Check if a given object implements the FoodInheritField interface. */ export function instanceOfFoodInheritField(value: object): boolean { - if (!('id' in value)) return false; return true; } @@ -91,7 +90,7 @@ export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: bo } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'] == null ? undefined : json['name'], 'field': json['field'] == null ? undefined : json['field'], }; @@ -103,6 +102,7 @@ export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any { } return { + 'id': value['id'], 'name': value['name'], 'field': value['field'], }; diff --git a/vue3/src/openapi/models/FoodInheritFieldRequest.ts b/vue3/src/openapi/models/FoodInheritFieldRequest.ts new file mode 100644 index 000000000..85c579c36 --- /dev/null +++ b/vue3/src/openapi/models/FoodInheritFieldRequest.ts @@ -0,0 +1,102 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'field': value['field'], + }; +} + diff --git a/vue3/src/openapi/models/FoodRequest.ts b/vue3/src/openapi/models/FoodRequest.ts new file mode 100644 index 000000000..d2a19969f --- /dev/null +++ b/vue3/src/openapi/models/FoodRequest.ts @@ -0,0 +1,268 @@ +/* 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 {string} + * @memberof FoodRequest + */ + propertiesFoodAmount?: string; + /** + * + * @type {UnitRequest} + * @memberof FoodRequest + */ + propertiesFoodUnit?: UnitRequest; + /** + * + * @type {number} + * @memberof FoodRequest + */ + fdcId?: number; + /** + * + * @type {string} + * @memberof FoodRequest + */ + foodOnhand?: string; + /** + * + * @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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/FoodShoppingUpdate.ts b/vue3/src/openapi/models/FoodShoppingUpdate.ts index 3a5852fc2..39a0522f7 100644 --- a/vue3/src/openapi/models/FoodShoppingUpdate.ts +++ b/vue3/src/openapi/models/FoodShoppingUpdate.ts @@ -13,13 +13,6 @@ */ import { mapValues } from '../runtime'; -import type { DeleteEnum } from './DeleteEnum'; -import { - DeleteEnumFromJSON, - DeleteEnumFromJSONTyped, - DeleteEnumToJSON, -} from './DeleteEnum'; - /** * * @export @@ -31,35 +24,13 @@ export interface FoodShoppingUpdate { * @type {number} * @memberof FoodShoppingUpdate */ - readonly id: number; - /** - * Amount of food to add to the shopping list - * @type {number} - * @memberof FoodShoppingUpdate - */ - amount?: number; - /** - * ID of unit to use for the shopping list - * @type {number} - * @memberof FoodShoppingUpdate - */ - unit?: number; - /** - * When set to true will delete all food from active shopping lists. - * - * * `true` - true - * @type {DeleteEnum} - * @memberof FoodShoppingUpdate - */ - _delete: DeleteEnum | null; + id?: number; } /** * Check if a given object implements the FoodShoppingUpdate interface. */ export function instanceOfFoodShoppingUpdate(value: object): boolean { - if (!('id' in value)) return false; - if (!('_delete' in value)) return false; return true; } @@ -73,10 +44,7 @@ export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: } return { - 'id': json['id'], - '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'], }; } @@ -86,9 +54,7 @@ export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any } return { - 'amount': value['amount'], - 'unit': value['unit'], - 'delete': DeleteEnumToJSON(value['_delete']), + 'id': value['id'], }; } diff --git a/vue3/src/openapi/models/FoodShoppingUpdateRequest.ts b/vue3/src/openapi/models/FoodShoppingUpdateRequest.ts new file mode 100644 index 000000000..de5eb55b0 --- /dev/null +++ b/vue3/src/openapi/models/FoodShoppingUpdateRequest.ts @@ -0,0 +1,86 @@ +/* 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; +} + +/** + * 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']), + }; +} + +export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateRequest | null): any { + if (value == null) { + return value; + } + return { + + 'amount': value['amount'], + 'unit': value['unit'], + 'delete': DeleteEnumToJSON(value['_delete']), + }; +} + diff --git a/vue3/src/openapi/models/FoodSimple.ts b/vue3/src/openapi/models/FoodSimple.ts index 4829def97..0658dcca8 100644 --- a/vue3/src/openapi/models/FoodSimple.ts +++ b/vue3/src/openapi/models/FoodSimple.ts @@ -24,7 +24,7 @@ export interface FoodSimple { * @type {number} * @memberof FoodSimple */ - readonly id: number; + id?: number; /** * * @type {string} @@ -43,7 +43,6 @@ export interface FoodSimple { * Check if a given object implements the FoodSimple interface. */ export function instanceOfFoodSimple(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; return true; } @@ -58,7 +57,7 @@ export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], }; @@ -70,6 +69,7 @@ export function FoodSimpleToJSON(value?: FoodSimple | null): any { } return { + 'id': value['id'], 'name': value['name'], 'plural_name': value['pluralName'], }; diff --git a/vue3/src/openapi/models/FoodSimpleRequest.ts b/vue3/src/openapi/models/FoodSimpleRequest.ts new file mode 100644 index 000000000..27774b9e6 --- /dev/null +++ b/vue3/src/openapi/models/FoodSimpleRequest.ts @@ -0,0 +1,69 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'plural_name': value['pluralName'], + }; +} + diff --git a/vue3/src/openapi/models/Group.ts b/vue3/src/openapi/models/Group.ts index 6a9154a1c..f5a4ae02f 100644 --- a/vue3/src/openapi/models/Group.ts +++ b/vue3/src/openapi/models/Group.ts @@ -58,7 +58,7 @@ export interface Group { * @type {number} * @memberof Group */ - readonly id: number; + id?: number; /** * * @type {string} @@ -71,7 +71,6 @@ export interface Group { * Check if a given object implements the Group interface. */ export function instanceOfGroup(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; return true; } @@ -86,7 +85,7 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], }; } @@ -97,6 +96,7 @@ export function GroupToJSON(value?: Group | null): any { } return { + 'id': value['id'], 'name': value['name'], }; } diff --git a/vue3/src/openapi/models/GroupRequest.ts b/vue3/src/openapi/models/GroupRequest.ts new file mode 100644 index 000000000..f6b538c64 --- /dev/null +++ b/vue3/src/openapi/models/GroupRequest.ts @@ -0,0 +1,95 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function GroupRequestToJSON(value?: GroupRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + }; +} + diff --git a/vue3/src/openapi/models/ImportLog.ts b/vue3/src/openapi/models/ImportLog.ts index 6857daf50..a8ce45503 100644 --- a/vue3/src/openapi/models/ImportLog.ts +++ b/vue3/src/openapi/models/ImportLog.ts @@ -31,7 +31,7 @@ export interface ImportLog { * @type {number} * @memberof ImportLog */ - readonly id: number; + id?: number; /** * * @type {string} @@ -86,7 +86,6 @@ export interface ImportLog { * Check if a given object implements the ImportLog interface. */ export function instanceOfImportLog(value: object): boolean { - if (!('id' in value)) return false; if (!('type' in value)) return false; if (!('keyword' in value)) return false; if (!('createdBy' in value)) return false; @@ -104,7 +103,7 @@ export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'type': json['type'], 'msg': json['msg'] == null ? undefined : json['msg'], 'running': json['running'] == null ? undefined : json['running'], @@ -122,6 +121,7 @@ export function ImportLogToJSON(value?: ImportLog | null): any { } return { + 'id': value['id'], 'type': value['type'], 'msg': value['msg'], 'running': value['running'], diff --git a/vue3/src/openapi/models/ImportLogRequest.ts b/vue3/src/openapi/models/ImportLogRequest.ts new file mode 100644 index 000000000..717b7e0a7 --- /dev/null +++ b/vue3/src/openapi/models/ImportLogRequest.ts @@ -0,0 +1,93 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/Ingredient.ts b/vue3/src/openapi/models/Ingredient.ts index 64289f4d4..aaa02d31c 100644 --- a/vue3/src/openapi/models/Ingredient.ts +++ b/vue3/src/openapi/models/Ingredient.ts @@ -37,7 +37,7 @@ export interface Ingredient { * @type {number} * @memberof Ingredient */ - readonly id: number; + id?: number; /** * * @type {Food} @@ -116,7 +116,6 @@ export interface Ingredient { * Check if a given object implements the Ingredient interface. */ export function instanceOfIngredient(value: object): boolean { - if (!('id' in value)) return false; if (!('food' in value)) return false; if (!('unit' in value)) return false; if (!('amount' in value)) return false; @@ -135,7 +134,7 @@ export function IngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'food': FoodFromJSON(json['food']), 'unit': UnitFromJSON(json['unit']), 'amount': json['amount'], @@ -157,6 +156,7 @@ export function IngredientToJSON(value?: Ingredient | null): any { } return { + 'id': value['id'], 'food': FoodToJSON(value['food']), 'unit': UnitToJSON(value['unit']), 'amount': value['amount'], diff --git a/vue3/src/openapi/models/IngredientRequest.ts b/vue3/src/openapi/models/IngredientRequest.ts new file mode 100644 index 000000000..892f0cec1 --- /dev/null +++ b/vue3/src/openapi/models/IngredientRequest.ts @@ -0,0 +1,148 @@ +/* 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 {string} + * @memberof IngredientRequest + */ + amount: string; + /** + * + * @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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/InviteLink.ts b/vue3/src/openapi/models/InviteLink.ts index 7a3fdbb8f..211cdf0fd 100644 --- a/vue3/src/openapi/models/InviteLink.ts +++ b/vue3/src/openapi/models/InviteLink.ts @@ -31,7 +31,7 @@ export interface InviteLink { * @type {number} * @memberof InviteLink */ - readonly id: number; + id?: number; /** * * @type {string} @@ -92,7 +92,6 @@ export interface InviteLink { * Check if a given object implements the InviteLink interface. */ export function instanceOfInviteLink(value: object): boolean { - if (!('id' in value)) return false; if (!('uuid' in value)) return false; if (!('group' in value)) return false; if (!('createdBy' in value)) return false; @@ -110,7 +109,7 @@ export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'uuid': json['uuid'], 'email': json['email'] == null ? undefined : json['email'], 'group': GroupFromJSON(json['group']), @@ -129,6 +128,7 @@ export function InviteLinkToJSON(value?: InviteLink | null): any { } return { + 'id': value['id'], 'email': value['email'], 'group': GroupToJSON(value['group']), 'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)), diff --git a/vue3/src/openapi/models/InviteLinkRequest.ts b/vue3/src/openapi/models/InviteLinkRequest.ts new file mode 100644 index 000000000..81ca3ee08 --- /dev/null +++ b/vue3/src/openapi/models/InviteLinkRequest.ts @@ -0,0 +1,108 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/Keyword.ts b/vue3/src/openapi/models/Keyword.ts index 502711663..0f73bfc61 100644 --- a/vue3/src/openapi/models/Keyword.ts +++ b/vue3/src/openapi/models/Keyword.ts @@ -58,7 +58,7 @@ export interface Keyword { * @type {number} * @memberof Keyword */ - readonly id: number; + id?: number; /** * * @type {string} @@ -113,7 +113,6 @@ export interface Keyword { * Check if a given object implements the Keyword interface. */ export function instanceOfKeyword(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('label' in value)) return false; if (!('parent' in value)) return false; @@ -134,7 +133,7 @@ export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): K } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'label': json['label'], 'description': json['description'] == null ? undefined : json['description'], @@ -152,6 +151,7 @@ export function KeywordToJSON(value?: Keyword | null): any { } return { + 'id': value['id'], 'name': value['name'], 'description': value['description'], }; diff --git a/vue3/src/openapi/models/KeywordLabel.ts b/vue3/src/openapi/models/KeywordLabel.ts index 7b60a6cd9..4da6a57d7 100644 --- a/vue3/src/openapi/models/KeywordLabel.ts +++ b/vue3/src/openapi/models/KeywordLabel.ts @@ -24,7 +24,7 @@ export interface KeywordLabel { * @type {number} * @memberof KeywordLabel */ - readonly id: number; + id?: number; /** * * @type {string} @@ -37,7 +37,6 @@ export interface KeywordLabel { * Check if a given object implements the KeywordLabel interface. */ export function instanceOfKeywordLabel(value: object): boolean { - if (!('id' in value)) return false; if (!('label' in value)) return false; return true; } @@ -52,7 +51,7 @@ export function KeywordLabelFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'label': json['label'], }; } @@ -63,6 +62,7 @@ export function KeywordLabelToJSON(value?: KeywordLabel | null): any { } return { + 'id': value['id'], }; } diff --git a/vue3/src/openapi/models/KeywordRequest.ts b/vue3/src/openapi/models/KeywordRequest.ts new file mode 100644 index 000000000..8f6b7da1c --- /dev/null +++ b/vue3/src/openapi/models/KeywordRequest.ts @@ -0,0 +1,103 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function KeywordRequestToJSON(value?: KeywordRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + }; +} + diff --git a/vue3/src/openapi/models/MealPlan.ts b/vue3/src/openapi/models/MealPlan.ts index 0a64d8178..d0ca2c991 100644 --- a/vue3/src/openapi/models/MealPlan.ts +++ b/vue3/src/openapi/models/MealPlan.ts @@ -43,7 +43,7 @@ export interface MealPlan { * @type {number} * @memberof MealPlan */ - readonly id: number; + id?: number; /** * * @type {string} @@ -128,7 +128,6 @@ export interface MealPlan { * Check if a given object implements the MealPlan interface. */ export function instanceOfMealPlan(value: object): boolean { - if (!('id' in value)) return false; if (!('servings' in value)) return false; if (!('noteMarkdown' in value)) return false; if (!('fromDate' in value)) return false; @@ -150,7 +149,7 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'title': json['title'] == null ? undefined : json['title'], 'recipe': json['recipe'] == null ? undefined : RecipeOverviewFromJSON(json['recipe']), 'servings': json['servings'], @@ -173,6 +172,7 @@ export function MealPlanToJSON(value?: MealPlan | null): any { } return { + 'id': value['id'], 'title': value['title'], 'recipe': RecipeOverviewToJSON(value['recipe']), 'servings': value['servings'], diff --git a/vue3/src/openapi/models/MealPlanRequest.ts b/vue3/src/openapi/models/MealPlanRequest.ts new file mode 100644 index 000000000..05fd25231 --- /dev/null +++ b/vue3/src/openapi/models/MealPlanRequest.ts @@ -0,0 +1,138 @@ +/* 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 {string} + * @memberof MealPlanRequest + */ + servings: string; + /** + * + * @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; +} + +/** + * 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)), + }; +} + +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)), + }; +} + diff --git a/vue3/src/openapi/models/MealType.ts b/vue3/src/openapi/models/MealType.ts index 59ed0853a..f8580b778 100644 --- a/vue3/src/openapi/models/MealType.ts +++ b/vue3/src/openapi/models/MealType.ts @@ -24,7 +24,7 @@ export interface MealType { * @type {number} * @memberof MealType */ - readonly id: number; + id?: number; /** * * @type {string} @@ -61,7 +61,6 @@ export interface MealType { * Check if a given object implements the MealType interface. */ export function instanceOfMealType(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('createdBy' in value)) return false; return true; @@ -77,7 +76,7 @@ export function MealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'order': json['order'] == null ? undefined : json['order'], 'color': json['color'] == null ? undefined : json['color'], @@ -92,6 +91,7 @@ export function MealTypeToJSON(value?: MealType | null): any { } return { + 'id': value['id'], 'name': value['name'], 'order': value['order'], 'color': value['color'], diff --git a/vue3/src/openapi/models/MealTypeRequest.ts b/vue3/src/openapi/models/MealTypeRequest.ts new file mode 100644 index 000000000..7fd596192 --- /dev/null +++ b/vue3/src/openapi/models/MealTypeRequest.ts @@ -0,0 +1,85 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/NutritionInformation.ts b/vue3/src/openapi/models/NutritionInformation.ts index ccd7aecdf..d8a36d693 100644 --- a/vue3/src/openapi/models/NutritionInformation.ts +++ b/vue3/src/openapi/models/NutritionInformation.ts @@ -24,7 +24,7 @@ export interface NutritionInformation { * @type {number} * @memberof NutritionInformation */ - readonly id: number; + id?: number; /** * * @type {string} @@ -61,7 +61,6 @@ export interface NutritionInformation { * Check if a given object implements the NutritionInformation interface. */ export function instanceOfNutritionInformation(value: object): boolean { - if (!('id' in value)) return false; if (!('carbohydrates' in value)) return false; if (!('fats' in value)) return false; if (!('proteins' in value)) return false; @@ -79,7 +78,7 @@ export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'carbohydrates': json['carbohydrates'], 'fats': json['fats'], 'proteins': json['proteins'], @@ -94,6 +93,7 @@ export function NutritionInformationToJSON(value?: NutritionInformation | null): } return { + 'id': value['id'], 'carbohydrates': value['carbohydrates'], 'fats': value['fats'], 'proteins': value['proteins'], diff --git a/vue3/src/openapi/models/NutritionInformationRequest.ts b/vue3/src/openapi/models/NutritionInformationRequest.ts new file mode 100644 index 000000000..e479427f1 --- /dev/null +++ b/vue3/src/openapi/models/NutritionInformationRequest.ts @@ -0,0 +1,96 @@ +/* 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 {string} + * @memberof NutritionInformationRequest + */ + carbohydrates: string; + /** + * + * @type {string} + * @memberof NutritionInformationRequest + */ + fats: string; + /** + * + * @type {string} + * @memberof NutritionInformationRequest + */ + proteins: string; + /** + * + * @type {string} + * @memberof NutritionInformationRequest + */ + calories: string; + /** + * + * @type {string} + * @memberof NutritionInformationRequest + */ + source?: string; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataCategory.ts b/vue3/src/openapi/models/OpenDataCategory.ts index a7d895e79..5581f1b4e 100644 --- a/vue3/src/openapi/models/OpenDataCategory.ts +++ b/vue3/src/openapi/models/OpenDataCategory.ts @@ -65,7 +65,7 @@ export interface OpenDataCategory { * @type {number} * @memberof OpenDataCategory */ - readonly id: number; + id?: number; /** * * @type {OpenDataVersion} @@ -108,7 +108,6 @@ export interface OpenDataCategory { * Check if a given object implements the OpenDataCategory interface. */ export function instanceOfOpenDataCategory(value: object): boolean { - if (!('id' in value)) return false; if (!('version' in value)) return false; if (!('slug' in value)) return false; if (!('name' in value)) return false; @@ -126,7 +125,7 @@ export function OpenDataCategoryFromJSONTyped(json: any, ignoreDiscriminator: bo } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'version': OpenDataVersionFromJSON(json['version']), 'slug': json['slug'], 'name': json['name'], @@ -142,6 +141,7 @@ export function OpenDataCategoryToJSON(value?: OpenDataCategory | null): any { } return { + 'id': value['id'], 'version': OpenDataVersionToJSON(value['version']), 'slug': value['slug'], 'name': value['name'], diff --git a/vue3/src/openapi/models/OpenDataCategoryRequest.ts b/vue3/src/openapi/models/OpenDataCategoryRequest.ts new file mode 100644 index 000000000..f9f5d681c --- /dev/null +++ b/vue3/src/openapi/models/OpenDataCategoryRequest.ts @@ -0,0 +1,136 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataConversion.ts b/vue3/src/openapi/models/OpenDataConversion.ts index fd733be1e..a23d05513 100644 --- a/vue3/src/openapi/models/OpenDataConversion.ts +++ b/vue3/src/openapi/models/OpenDataConversion.ts @@ -43,7 +43,7 @@ export interface OpenDataConversion { * @type {number} * @memberof OpenDataConversion */ - readonly id: number; + id?: number; /** * * @type {OpenDataVersion} @@ -110,7 +110,6 @@ export interface OpenDataConversion { * Check if a given object implements the OpenDataConversion interface. */ export function instanceOfOpenDataConversion(value: object): boolean { - if (!('id' in value)) return false; if (!('version' in value)) return false; if (!('slug' in value)) return false; if (!('food' in value)) return false; @@ -133,7 +132,7 @@ export function OpenDataConversionFromJSONTyped(json: any, ignoreDiscriminator: } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'version': OpenDataVersionFromJSON(json['version']), 'slug': json['slug'], 'food': OpenDataFoodFromJSON(json['food']), @@ -153,6 +152,7 @@ export function OpenDataConversionToJSON(value?: OpenDataConversion | null): any } return { + 'id': value['id'], 'version': OpenDataVersionToJSON(value['version']), 'slug': value['slug'], 'food': OpenDataFoodToJSON(value['food']), diff --git a/vue3/src/openapi/models/OpenDataConversionRequest.ts b/vue3/src/openapi/models/OpenDataConversionRequest.ts new file mode 100644 index 000000000..8cd652f18 --- /dev/null +++ b/vue3/src/openapi/models/OpenDataConversionRequest.ts @@ -0,0 +1,151 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataFood.ts b/vue3/src/openapi/models/OpenDataFood.ts index 80839db3e..ee9867559 100644 --- a/vue3/src/openapi/models/OpenDataFood.ts +++ b/vue3/src/openapi/models/OpenDataFood.ts @@ -83,7 +83,7 @@ export interface OpenDataFood { * @type {number} * @memberof OpenDataFood */ - readonly id: number; + id?: number; /** * * @type {OpenDataVersion} @@ -186,7 +186,6 @@ export interface OpenDataFood { * Check if a given object implements the OpenDataFood interface. */ export function instanceOfOpenDataFood(value: object): boolean { - if (!('id' in value)) return false; if (!('version' in value)) return false; if (!('slug' in value)) return false; if (!('name' in value)) return false; @@ -209,7 +208,7 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'version': OpenDataVersionFromJSON(json['version']), 'slug': json['slug'], 'name': json['name'], @@ -235,6 +234,7 @@ export function OpenDataFoodToJSON(value?: OpenDataFood | null): any { } return { + 'id': value['id'], 'version': OpenDataVersionToJSON(value['version']), 'slug': value['slug'], 'name': value['name'], diff --git a/vue3/src/openapi/models/OpenDataFoodProperty.ts b/vue3/src/openapi/models/OpenDataFoodProperty.ts index 17d43321a..0f0fa88b1 100644 --- a/vue3/src/openapi/models/OpenDataFoodProperty.ts +++ b/vue3/src/openapi/models/OpenDataFoodProperty.ts @@ -31,7 +31,7 @@ export interface OpenDataFoodProperty { * @type {number} * @memberof OpenDataFoodProperty */ - readonly id: number; + id?: number; /** * * @type {OpenDataProperty} @@ -50,7 +50,6 @@ export interface OpenDataFoodProperty { * Check if a given object implements the OpenDataFoodProperty interface. */ export function instanceOfOpenDataFoodProperty(value: object): boolean { - if (!('id' in value)) return false; if (!('property' in value)) return false; if (!('propertyAmount' in value)) return false; return true; @@ -66,7 +65,7 @@ export function OpenDataFoodPropertyFromJSONTyped(json: any, ignoreDiscriminator } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'property': OpenDataPropertyFromJSON(json['property']), 'propertyAmount': json['property_amount'], }; @@ -78,6 +77,7 @@ export function OpenDataFoodPropertyToJSON(value?: OpenDataFoodProperty | null): } return { + 'id': value['id'], 'property': OpenDataPropertyToJSON(value['property']), 'property_amount': value['propertyAmount'], }; diff --git a/vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts b/vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts new file mode 100644 index 000000000..fa0abd2eb --- /dev/null +++ b/vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts @@ -0,0 +1,77 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRequest | null): any { + if (value == null) { + return value; + } + return { + + 'property': OpenDataPropertyRequestToJSON(value['property']), + 'property_amount': value['propertyAmount'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataFoodRequest.ts b/vue3/src/openapi/models/OpenDataFoodRequest.ts new file mode 100644 index 000000000..444b0c24d --- /dev/null +++ b/vue3/src/openapi/models/OpenDataFoodRequest.ts @@ -0,0 +1,239 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataProperty.ts b/vue3/src/openapi/models/OpenDataProperty.ts index a21b8a48a..2ca4c430a 100644 --- a/vue3/src/openapi/models/OpenDataProperty.ts +++ b/vue3/src/openapi/models/OpenDataProperty.ts @@ -65,7 +65,7 @@ export interface OpenDataProperty { * @type {number} * @memberof OpenDataProperty */ - readonly id: number; + id?: number; /** * * @type {OpenDataVersion} @@ -114,7 +114,6 @@ export interface OpenDataProperty { * Check if a given object implements the OpenDataProperty interface. */ export function instanceOfOpenDataProperty(value: object): boolean { - if (!('id' in value)) return false; if (!('version' in value)) return false; if (!('slug' in value)) return false; if (!('name' in value)) return false; @@ -132,7 +131,7 @@ export function OpenDataPropertyFromJSONTyped(json: any, ignoreDiscriminator: bo } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'version': OpenDataVersionFromJSON(json['version']), 'slug': json['slug'], 'name': json['name'], @@ -149,6 +148,7 @@ export function OpenDataPropertyToJSON(value?: OpenDataProperty | null): any { } return { + 'id': value['id'], 'version': OpenDataVersionToJSON(value['version']), 'slug': value['slug'], 'name': value['name'], diff --git a/vue3/src/openapi/models/OpenDataPropertyRequest.ts b/vue3/src/openapi/models/OpenDataPropertyRequest.ts new file mode 100644 index 000000000..222e4c544 --- /dev/null +++ b/vue3/src/openapi/models/OpenDataPropertyRequest.ts @@ -0,0 +1,144 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataStore.ts b/vue3/src/openapi/models/OpenDataStore.ts index a6d8012fe..137dde5f5 100644 --- a/vue3/src/openapi/models/OpenDataStore.ts +++ b/vue3/src/openapi/models/OpenDataStore.ts @@ -37,7 +37,7 @@ export interface OpenDataStore { * @type {number} * @memberof OpenDataStore */ - readonly id: number; + id?: number; /** * * @type {OpenDataVersion} @@ -80,7 +80,6 @@ export interface OpenDataStore { * Check if a given object implements the OpenDataStore interface. */ export function instanceOfOpenDataStore(value: object): boolean { - if (!('id' in value)) return false; if (!('version' in value)) return false; if (!('slug' in value)) return false; if (!('name' in value)) return false; @@ -99,7 +98,7 @@ export function OpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator: boole } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'version': OpenDataVersionFromJSON(json['version']), 'slug': json['slug'], 'name': json['name'], @@ -115,6 +114,7 @@ export function OpenDataStoreToJSON(value?: OpenDataStore | null): any { } return { + 'id': value['id'], 'version': OpenDataVersionToJSON(value['version']), 'slug': value['slug'], 'name': value['name'], diff --git a/vue3/src/openapi/models/OpenDataStoreCategory.ts b/vue3/src/openapi/models/OpenDataStoreCategory.ts index 2c8c2b3a3..aa0140a35 100644 --- a/vue3/src/openapi/models/OpenDataStoreCategory.ts +++ b/vue3/src/openapi/models/OpenDataStoreCategory.ts @@ -31,7 +31,7 @@ export interface OpenDataStoreCategory { * @type {number} * @memberof OpenDataStoreCategory */ - readonly id: number; + id?: number; /** * * @type {OpenDataCategory} @@ -56,7 +56,6 @@ export interface OpenDataStoreCategory { * Check if a given object implements the OpenDataStoreCategory interface. */ export function instanceOfOpenDataStoreCategory(value: object): boolean { - if (!('id' in value)) return false; if (!('category' in value)) return false; if (!('store' in value)) return false; return true; @@ -72,7 +71,7 @@ export function OpenDataStoreCategoryFromJSONTyped(json: any, ignoreDiscriminato } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'category': OpenDataCategoryFromJSON(json['category']), 'store': json['store'], 'order': json['order'] == null ? undefined : json['order'], @@ -85,6 +84,7 @@ export function OpenDataStoreCategoryToJSON(value?: OpenDataStoreCategory | null } return { + 'id': value['id'], 'category': OpenDataCategoryToJSON(value['category']), 'store': value['store'], 'order': value['order'], diff --git a/vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts b/vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts new file mode 100644 index 000000000..6f7421471 --- /dev/null +++ b/vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts @@ -0,0 +1,85 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategoryRequest | null): any { + if (value == null) { + return value; + } + return { + + 'category': OpenDataCategoryRequestToJSON(value['category']), + 'store': value['store'], + 'order': value['order'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataStoreRequest.ts b/vue3/src/openapi/models/OpenDataStoreRequest.ts new file mode 100644 index 000000000..b294a0aeb --- /dev/null +++ b/vue3/src/openapi/models/OpenDataStoreRequest.ts @@ -0,0 +1,109 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataUnit.ts b/vue3/src/openapi/models/OpenDataUnit.ts index b401cddb3..0dc70379d 100644 --- a/vue3/src/openapi/models/OpenDataUnit.ts +++ b/vue3/src/openapi/models/OpenDataUnit.ts @@ -77,7 +77,7 @@ export interface OpenDataUnit { * @type {number} * @memberof OpenDataUnit */ - readonly id: number; + id?: number; /** * * @type {OpenDataVersion} @@ -132,7 +132,6 @@ export interface OpenDataUnit { * Check if a given object implements the OpenDataUnit interface. */ export function instanceOfOpenDataUnit(value: object): boolean { - if (!('id' in value)) return false; if (!('version' in value)) return false; if (!('slug' in value)) return false; if (!('name' in value)) return false; @@ -151,7 +150,7 @@ export function OpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'version': OpenDataVersionFromJSON(json['version']), 'slug': json['slug'], 'name': json['name'], @@ -169,6 +168,7 @@ export function OpenDataUnitToJSON(value?: OpenDataUnit | null): any { } return { + 'id': value['id'], 'version': OpenDataVersionToJSON(value['version']), 'slug': value['slug'], 'name': value['name'], diff --git a/vue3/src/openapi/models/OpenDataUnitRequest.ts b/vue3/src/openapi/models/OpenDataUnitRequest.ts new file mode 100644 index 000000000..77328b057 --- /dev/null +++ b/vue3/src/openapi/models/OpenDataUnitRequest.ts @@ -0,0 +1,165 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/OpenDataVersion.ts b/vue3/src/openapi/models/OpenDataVersion.ts index 86939a6f2..ec56a92bf 100644 --- a/vue3/src/openapi/models/OpenDataVersion.ts +++ b/vue3/src/openapi/models/OpenDataVersion.ts @@ -58,7 +58,7 @@ export interface OpenDataVersion { * @type {number} * @memberof OpenDataVersion */ - readonly id: number; + id?: number; /** * * @type {string} @@ -83,7 +83,6 @@ export interface OpenDataVersion { * Check if a given object implements the OpenDataVersion interface. */ export function instanceOfOpenDataVersion(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('code' in value)) return false; return true; @@ -99,7 +98,7 @@ export function OpenDataVersionFromJSONTyped(json: any, ignoreDiscriminator: boo } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'code': json['code'], 'comment': json['comment'] == null ? undefined : json['comment'], @@ -112,6 +111,7 @@ export function OpenDataVersionToJSON(value?: OpenDataVersion | null): any { } return { + 'id': value['id'], '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 new file mode 100644 index 000000000..afa8ce6b0 --- /dev/null +++ b/vue3/src/openapi/models/OpenDataVersionRequest.ts @@ -0,0 +1,112 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function OpenDataVersionRequestToJSON(value?: OpenDataVersionRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'code': value['code'], + 'comment': value['comment'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedAccessTokenRequest.ts b/vue3/src/openapi/models/PatchedAccessTokenRequest.ts new file mode 100644 index 000000000..6a3e0e7d4 --- /dev/null +++ b/vue3/src/openapi/models/PatchedAccessTokenRequest.ts @@ -0,0 +1,68 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedAccessTokenRequestToJSON(value?: PatchedAccessTokenRequest | null): any { + if (value == null) { + return value; + } + return { + + 'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()), + 'scope': value['scope'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedAutomationRequest.ts b/vue3/src/openapi/models/PatchedAutomationRequest.ts new file mode 100644 index 000000000..358bbbb19 --- /dev/null +++ b/vue3/src/openapi/models/PatchedAutomationRequest.ts @@ -0,0 +1,123 @@ +/* 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 { AutomationTypeEnum } from './AutomationTypeEnum'; +import { + AutomationTypeEnumFromJSON, + AutomationTypeEnumFromJSONTyped, + AutomationTypeEnumToJSON, +} from './AutomationTypeEnum'; + +/** + * + * @export + * @interface PatchedAutomationRequest + */ +export interface PatchedAutomationRequest { + /** + * + * @type {AutomationTypeEnum} + * @memberof PatchedAutomationRequest + */ + type?: AutomationTypeEnum; + /** + * + * @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; +} + +/** + * 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 : AutomationTypeEnumFromJSON(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'], + }; +} + +export function PatchedAutomationRequestToJSON(value?: PatchedAutomationRequest | null): any { + if (value == null) { + return value; + } + return { + + 'type': AutomationTypeEnumToJSON(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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts b/vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts new file mode 100644 index 000000000..3bd7e3f0c --- /dev/null +++ b/vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts @@ -0,0 +1,68 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedBookmarkletImportRequestToJSON(value?: PatchedBookmarkletImportRequest | null): any { + if (value == null) { + return value; + } + return { + + 'url': value['url'], + 'html': value['html'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts b/vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts new file mode 100644 index 000000000..637ea168b --- /dev/null +++ b/vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.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'; +/** + * + * @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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedCookLogRequest.ts b/vue3/src/openapi/models/PatchedCookLogRequest.ts new file mode 100644 index 000000000..8e4201e51 --- /dev/null +++ b/vue3/src/openapi/models/PatchedCookLogRequest.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 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; +} + +/** + * 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'])), + }; +} + +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()), + }; +} + diff --git a/vue3/src/openapi/models/PatchedCustomFilterRequest.ts b/vue3/src/openapi/models/PatchedCustomFilterRequest.ts new file mode 100644 index 000000000..e2857d312 --- /dev/null +++ b/vue3/src/openapi/models/PatchedCustomFilterRequest.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 { 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; +} + +/** + * 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)), + }; +} + +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)), + }; +} + diff --git a/vue3/src/openapi/models/PatchedExportLogRequest.ts b/vue3/src/openapi/models/PatchedExportLogRequest.ts new file mode 100644 index 000000000..47c254580 --- /dev/null +++ b/vue3/src/openapi/models/PatchedExportLogRequest.ts @@ -0,0 +1,108 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedFoodRequest.ts b/vue3/src/openapi/models/PatchedFoodRequest.ts new file mode 100644 index 000000000..770f90d19 --- /dev/null +++ b/vue3/src/openapi/models/PatchedFoodRequest.ts @@ -0,0 +1,267 @@ +/* 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 {string} + * @memberof PatchedFoodRequest + */ + propertiesFoodAmount?: string; + /** + * + * @type {UnitRequest} + * @memberof PatchedFoodRequest + */ + propertiesFoodUnit?: UnitRequest; + /** + * + * @type {number} + * @memberof PatchedFoodRequest + */ + fdcId?: number; + /** + * + * @type {string} + * @memberof PatchedFoodRequest + */ + foodOnhand?: string; + /** + * + * @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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedImportLogRequest.ts b/vue3/src/openapi/models/PatchedImportLogRequest.ts new file mode 100644 index 000000000..f6a64aeeb --- /dev/null +++ b/vue3/src/openapi/models/PatchedImportLogRequest.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 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedIngredientRequest.ts b/vue3/src/openapi/models/PatchedIngredientRequest.ts new file mode 100644 index 000000000..762164a3b --- /dev/null +++ b/vue3/src/openapi/models/PatchedIngredientRequest.ts @@ -0,0 +1,145 @@ +/* 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 {string} + * @memberof PatchedIngredientRequest + */ + amount?: string; + /** + * + * @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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedInviteLinkRequest.ts b/vue3/src/openapi/models/PatchedInviteLinkRequest.ts new file mode 100644 index 000000000..a9514c936 --- /dev/null +++ b/vue3/src/openapi/models/PatchedInviteLinkRequest.ts @@ -0,0 +1,107 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedKeywordRequest.ts b/vue3/src/openapi/models/PatchedKeywordRequest.ts new file mode 100644 index 000000000..f6f181caf --- /dev/null +++ b/vue3/src/openapi/models/PatchedKeywordRequest.ts @@ -0,0 +1,102 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedKeywordRequestToJSON(value?: PatchedKeywordRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedMealPlanRequest.ts b/vue3/src/openapi/models/PatchedMealPlanRequest.ts new file mode 100644 index 000000000..dde8c8d28 --- /dev/null +++ b/vue3/src/openapi/models/PatchedMealPlanRequest.ts @@ -0,0 +1,135 @@ +/* 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 {string} + * @memberof PatchedMealPlanRequest + */ + servings?: string; + /** + * + * @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; +} + +/** + * 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)), + }; +} + +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)), + }; +} + diff --git a/vue3/src/openapi/models/PatchedMealTypeRequest.ts b/vue3/src/openapi/models/PatchedMealTypeRequest.ts new file mode 100644 index 000000000..8d0981534 --- /dev/null +++ b/vue3/src/openapi/models/PatchedMealTypeRequest.ts @@ -0,0 +1,84 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts b/vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts new file mode 100644 index 000000000..6a09e958d --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts @@ -0,0 +1,133 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts b/vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts new file mode 100644 index 000000000..a54a62a21 --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts @@ -0,0 +1,143 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts b/vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts new file mode 100644 index 000000000..dade5ba3b --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts @@ -0,0 +1,231 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts b/vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts new file mode 100644 index 000000000..a39800540 --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts @@ -0,0 +1,141 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts b/vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts new file mode 100644 index 000000000..2630bedc9 --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataStoreRequest.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 { 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts b/vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts new file mode 100644 index 000000000..d001bcd8c --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts @@ -0,0 +1,161 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts b/vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts new file mode 100644 index 000000000..d66cdae37 --- /dev/null +++ b/vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts @@ -0,0 +1,110 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedOpenDataVersionRequestToJSON(value?: PatchedOpenDataVersionRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'code': value['code'], + 'comment': value['comment'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedPropertyRequest.ts b/vue3/src/openapi/models/PatchedPropertyRequest.ts new file mode 100644 index 000000000..7fc1da1de --- /dev/null +++ b/vue3/src/openapi/models/PatchedPropertyRequest.ts @@ -0,0 +1,109 @@ +/* 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 {string} + * @memberof PatchedPropertyRequest + */ + propertyAmount?: string; + /** + * + * @type {PropertyTypeRequest} + * @memberof PatchedPropertyRequest + */ + propertyType?: PropertyTypeRequest; +} + +/** + * 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']), + }; +} + +export function PatchedPropertyRequestToJSON(value?: PatchedPropertyRequest | null): any { + if (value == null) { + return value; + } + return { + + 'property_amount': value['propertyAmount'], + 'property_type': PropertyTypeRequestToJSON(value['propertyType']), + }; +} + diff --git a/vue3/src/openapi/models/PatchedPropertyTypeRequest.ts b/vue3/src/openapi/models/PatchedPropertyTypeRequest.ts new file mode 100644 index 000000000..7cc545ffb --- /dev/null +++ b/vue3/src/openapi/models/PatchedPropertyTypeRequest.ts @@ -0,0 +1,108 @@ +/* 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 new file mode 100644 index 000000000..8ef18a9ce --- /dev/null +++ b/vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts @@ -0,0 +1,68 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedRecipeBookEntryRequestToJSON(value?: PatchedRecipeBookEntryRequest | null): any { + if (value == null) { + return value; + } + return { + + 'book': value['book'], + 'recipe': value['recipe'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedRecipeBookRequest.ts b/vue3/src/openapi/models/PatchedRecipeBookRequest.ts new file mode 100644 index 000000000..5afe354b5 --- /dev/null +++ b/vue3/src/openapi/models/PatchedRecipeBookRequest.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 { 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedRecipeRequest.ts b/vue3/src/openapi/models/PatchedRecipeRequest.ts new file mode 100644 index 000000000..8262a632b --- /dev/null +++ b/vue3/src/openapi/models/PatchedRecipeRequest.ts @@ -0,0 +1,211 @@ +/* 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; +} + +/** + * 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)), + }; +} + +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)), + }; +} + diff --git a/vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts b/vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts new file mode 100644 index 000000000..7b18f8009 --- /dev/null +++ b/vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts @@ -0,0 +1,129 @@ +/* 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 {string} + * @memberof PatchedShoppingListEntryRequest + */ + amount?: string; + /** + * + * @type {number} + * @memberof PatchedShoppingListEntryRequest + */ + order?: number; + /** + * + * @type {boolean} + * @memberof PatchedShoppingListEntryRequest + */ + checked?: boolean; + /** + * + * @type {Date} + * @memberof PatchedShoppingListEntryRequest + */ + completedAt?: Date; + /** + * + * @type {Date} + * @memberof PatchedShoppingListEntryRequest + */ + delayUntil?: Date; +} + +/** + * 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'])), + }; +} + +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()), + }; +} + diff --git a/vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts b/vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts new file mode 100644 index 000000000..1add765c5 --- /dev/null +++ b/vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts @@ -0,0 +1,76 @@ +/* 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 {string} + * @memberof PatchedShoppingListRecipeRequest + */ + servings?: string; +} + +/** + * 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'], + }; +} + +export function PatchedShoppingListRecipeRequestToJSON(value?: PatchedShoppingListRecipeRequest | null): any { + if (value == null) { + return value; + } + return { + + 'recipe': value['recipe'], + 'mealplan': value['mealplan'], + 'servings': value['servings'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedSpaceRequest.ts b/vue3/src/openapi/models/PatchedSpaceRequest.ts new file mode 100644 index 000000000..d8f4935c3 --- /dev/null +++ b/vue3/src/openapi/models/PatchedSpaceRequest.ts @@ -0,0 +1,205 @@ +/* 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; +} + +/** + * 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']), + }; +} + +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']), + }; +} + diff --git a/vue3/src/openapi/models/PatchedStepRequest.ts b/vue3/src/openapi/models/PatchedStepRequest.ts new file mode 100644 index 000000000..be4134d5e --- /dev/null +++ b/vue3/src/openapi/models/PatchedStepRequest.ts @@ -0,0 +1,137 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedStorageRequest.ts b/vue3/src/openapi/models/PatchedStorageRequest.ts new file mode 100644 index 000000000..5c8cbf38a --- /dev/null +++ b/vue3/src/openapi/models/PatchedStorageRequest.ts @@ -0,0 +1,99 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedSupermarketCategoryRelationRequest.ts b/vue3/src/openapi/models/PatchedSupermarketCategoryRelationRequest.ts new file mode 100644 index 000000000..58875e139 --- /dev/null +++ b/vue3/src/openapi/models/PatchedSupermarketCategoryRelationRequest.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 { 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; +} + +/** + * 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'], + }; +} + +export function PatchedSupermarketCategoryRelationRequestToJSON(value?: PatchedSupermarketCategoryRelationRequest | null): any { + if (value == null) { + return value; + } + return { + + 'category': SupermarketCategoryRequestToJSON(value['category']), + 'supermarket': value['supermarket'], + 'order': value['order'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts b/vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts new file mode 100644 index 000000000..e86747150 --- /dev/null +++ b/vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts @@ -0,0 +1,102 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedSupermarketCategoryRequestToJSON(value?: PatchedSupermarketCategoryRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedSupermarketRequest.ts b/vue3/src/openapi/models/PatchedSupermarketRequest.ts new file mode 100644 index 000000000..0981c7496 --- /dev/null +++ b/vue3/src/openapi/models/PatchedSupermarketRequest.ts @@ -0,0 +1,110 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedSupermarketRequestToJSON(value?: PatchedSupermarketRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + 'open_data_slug': value['openDataSlug'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedSyncRequest.ts b/vue3/src/openapi/models/PatchedSyncRequest.ts new file mode 100644 index 000000000..e2f1abfc4 --- /dev/null +++ b/vue3/src/openapi/models/PatchedSyncRequest.ts @@ -0,0 +1,84 @@ +/* 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; +} + +/** + * 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'])), + }; +} + +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()), + }; +} + diff --git a/vue3/src/openapi/models/PatchedUnitConversionRequest.ts b/vue3/src/openapi/models/PatchedUnitConversionRequest.ts new file mode 100644 index 000000000..0929c86f0 --- /dev/null +++ b/vue3/src/openapi/models/PatchedUnitConversionRequest.ts @@ -0,0 +1,113 @@ +/* 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 {string} + * @memberof PatchedUnitConversionRequest + */ + baseAmount?: string; + /** + * + * @type {UnitRequest} + * @memberof PatchedUnitConversionRequest + */ + baseUnit?: UnitRequest; + /** + * + * @type {string} + * @memberof PatchedUnitConversionRequest + */ + convertedAmount?: string; + /** + * + * @type {UnitRequest} + * @memberof PatchedUnitConversionRequest + */ + convertedUnit?: UnitRequest; + /** + * + * @type {FoodRequest} + * @memberof PatchedUnitConversionRequest + */ + food?: FoodRequest; + /** + * + * @type {string} + * @memberof PatchedUnitConversionRequest + */ + openDataSlug?: string; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedUnitRequest.ts b/vue3/src/openapi/models/PatchedUnitRequest.ts new file mode 100644 index 000000000..5ed3a7b73 --- /dev/null +++ b/vue3/src/openapi/models/PatchedUnitRequest.ts @@ -0,0 +1,126 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedUserPreferenceRequest.ts b/vue3/src/openapi/models/PatchedUserPreferenceRequest.ts new file mode 100644 index 000000000..27fe76010 --- /dev/null +++ b/vue3/src/openapi/models/PatchedUserPreferenceRequest.ts @@ -0,0 +1,299 @@ +/* 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 new file mode 100644 index 000000000..1b79bca10 --- /dev/null +++ b/vue3/src/openapi/models/PatchedUserRequest.ts @@ -0,0 +1,68 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedUserRequestToJSON(value?: PatchedUserRequest | null): any { + if (value == null) { + return value; + } + return { + + 'first_name': value['firstName'], + 'last_name': value['lastName'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedUserSpaceRequest.ts b/vue3/src/openapi/models/PatchedUserSpaceRequest.ts new file mode 100644 index 000000000..eec982502 --- /dev/null +++ b/vue3/src/openapi/models/PatchedUserSpaceRequest.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 { 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/PatchedViewLogRequest.ts b/vue3/src/openapi/models/PatchedViewLogRequest.ts new file mode 100644 index 000000000..263b034ab --- /dev/null +++ b/vue3/src/openapi/models/PatchedViewLogRequest.ts @@ -0,0 +1,60 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function PatchedViewLogRequestToJSON(value?: PatchedViewLogRequest | null): any { + if (value == null) { + return value; + } + return { + + 'recipe': value['recipe'], + }; +} + diff --git a/vue3/src/openapi/models/Property.ts b/vue3/src/openapi/models/Property.ts index 2dd050128..9a99bb592 100644 --- a/vue3/src/openapi/models/Property.ts +++ b/vue3/src/openapi/models/Property.ts @@ -65,7 +65,7 @@ export interface Property { * @type {number} * @memberof Property */ - readonly id: number; + id?: number; /** * * @type {string} @@ -84,7 +84,6 @@ export interface Property { * Check if a given object implements the Property interface. */ export function instanceOfProperty(value: object): boolean { - if (!('id' in value)) return false; if (!('propertyAmount' in value)) return false; if (!('propertyType' in value)) return false; return true; @@ -100,7 +99,7 @@ export function PropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'propertyAmount': json['property_amount'], 'propertyType': PropertyTypeFromJSON(json['property_type']), }; @@ -112,6 +111,7 @@ export function PropertyToJSON(value?: Property | null): any { } return { + 'id': value['id'], 'property_amount': value['propertyAmount'], 'property_type': PropertyTypeToJSON(value['propertyType']), }; diff --git a/vue3/src/openapi/models/PropertyRequest.ts b/vue3/src/openapi/models/PropertyRequest.ts new file mode 100644 index 000000000..7ac5373b9 --- /dev/null +++ b/vue3/src/openapi/models/PropertyRequest.ts @@ -0,0 +1,111 @@ +/* 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 {string} + * @memberof PropertyRequest + */ + propertyAmount: string | null; + /** + * + * @type {PropertyTypeRequest} + * @memberof PropertyRequest + */ + propertyType: PropertyTypeRequest; +} + +/** + * 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']), + }; +} + +export function PropertyRequestToJSON(value?: PropertyRequest | null): any { + if (value == null) { + return value; + } + return { + + 'property_amount': value['propertyAmount'], + 'property_type': PropertyTypeRequestToJSON(value['propertyType']), + }; +} + diff --git a/vue3/src/openapi/models/PropertyTypeRequest.ts b/vue3/src/openapi/models/PropertyTypeRequest.ts new file mode 100644 index 000000000..c5ec663b3 --- /dev/null +++ b/vue3/src/openapi/models/PropertyTypeRequest.ts @@ -0,0 +1,109 @@ +/* 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/Recipe.ts b/vue3/src/openapi/models/Recipe.ts index 208b60654..f6d22ecea 100644 --- a/vue3/src/openapi/models/Recipe.ts +++ b/vue3/src/openapi/models/Recipe.ts @@ -55,7 +55,7 @@ export interface Recipe { * @type {number} * @memberof Recipe */ - readonly id: number; + id?: number; /** * * @type {string} @@ -200,7 +200,6 @@ export interface Recipe { * Check if a given object implements the Recipe interface. */ export function instanceOfRecipe(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('image' in value)) return false; if (!('steps' in value)) return false; @@ -223,7 +222,7 @@ export function RecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'description': json['description'] == null ? undefined : json['description'], 'image': json['image'], @@ -256,6 +255,7 @@ export function RecipeToJSON(value?: Recipe | null): any { } return { + 'id': value['id'], 'name': value['name'], 'description': value['description'], 'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array).map(KeywordToJSON)), diff --git a/vue3/src/openapi/models/RecipeBook.ts b/vue3/src/openapi/models/RecipeBook.ts index ce33f841a..5475b1df5 100644 --- a/vue3/src/openapi/models/RecipeBook.ts +++ b/vue3/src/openapi/models/RecipeBook.ts @@ -37,7 +37,7 @@ export interface RecipeBook { * @type {number} * @memberof RecipeBook */ - readonly id: number; + id?: number; /** * * @type {string} @@ -80,7 +80,6 @@ export interface RecipeBook { * Check if a given object implements the RecipeBook interface. */ export function instanceOfRecipeBook(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('shared' in value)) return false; if (!('createdBy' in value)) return false; @@ -97,7 +96,7 @@ export function RecipeBookFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'description': json['description'] == null ? undefined : json['description'], 'shared': ((json['shared'] as Array).map(UserFromJSON)), @@ -113,6 +112,7 @@ export function RecipeBookToJSON(value?: RecipeBook | null): any { } return { + 'id': value['id'], 'name': value['name'], 'description': value['description'], 'shared': ((value['shared'] as Array).map(UserToJSON)), diff --git a/vue3/src/openapi/models/RecipeBookEntry.ts b/vue3/src/openapi/models/RecipeBookEntry.ts index adfe16150..c028395fa 100644 --- a/vue3/src/openapi/models/RecipeBookEntry.ts +++ b/vue3/src/openapi/models/RecipeBookEntry.ts @@ -24,7 +24,7 @@ export interface RecipeBookEntry { * @type {number} * @memberof RecipeBookEntry */ - readonly id: number; + id?: number; /** * * @type {number} @@ -55,7 +55,6 @@ export interface RecipeBookEntry { * Check if a given object implements the RecipeBookEntry interface. */ export function instanceOfRecipeBookEntry(value: object): boolean { - if (!('id' in value)) return false; if (!('book' in value)) return false; if (!('bookContent' in value)) return false; if (!('recipe' in value)) return false; @@ -73,7 +72,7 @@ export function RecipeBookEntryFromJSONTyped(json: any, ignoreDiscriminator: boo } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'book': json['book'], 'bookContent': json['book_content'], 'recipe': json['recipe'], @@ -87,6 +86,7 @@ export function RecipeBookEntryToJSON(value?: RecipeBookEntry | null): any { } return { + 'id': value['id'], 'book': value['book'], 'recipe': value['recipe'], }; diff --git a/vue3/src/openapi/models/RecipeBookEntryRequest.ts b/vue3/src/openapi/models/RecipeBookEntryRequest.ts new file mode 100644 index 000000000..966b31b25 --- /dev/null +++ b/vue3/src/openapi/models/RecipeBookEntryRequest.ts @@ -0,0 +1,70 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function RecipeBookEntryRequestToJSON(value?: RecipeBookEntryRequest | null): any { + if (value == null) { + return value; + } + return { + + 'book': value['book'], + 'recipe': value['recipe'], + }; +} + diff --git a/vue3/src/openapi/models/RecipeBookRequest.ts b/vue3/src/openapi/models/RecipeBookRequest.ts new file mode 100644 index 000000000..a01ced54f --- /dev/null +++ b/vue3/src/openapi/models/RecipeBookRequest.ts @@ -0,0 +1,107 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/RecipeFlat.ts b/vue3/src/openapi/models/RecipeFlat.ts index 1350a473a..a83b816b7 100644 --- a/vue3/src/openapi/models/RecipeFlat.ts +++ b/vue3/src/openapi/models/RecipeFlat.ts @@ -24,7 +24,7 @@ export interface RecipeFlat { * @type {number} * @memberof RecipeFlat */ - readonly id: number; + id?: number; /** * * @type {string} @@ -43,7 +43,6 @@ export interface RecipeFlat { * Check if a given object implements the RecipeFlat interface. */ export function instanceOfRecipeFlat(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; return true; } @@ -58,7 +57,7 @@ export function RecipeFlatFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'image': json['image'] == null ? undefined : json['image'], }; @@ -70,6 +69,7 @@ export function RecipeFlatToJSON(value?: RecipeFlat | null): any { } return { + 'id': value['id'], 'name': value['name'], 'image': value['image'], }; diff --git a/vue3/src/openapi/models/RecipeOverview.ts b/vue3/src/openapi/models/RecipeOverview.ts index b9cfcd393..dba4cf9d9 100644 --- a/vue3/src/openapi/models/RecipeOverview.ts +++ b/vue3/src/openapi/models/RecipeOverview.ts @@ -31,19 +31,19 @@ export interface RecipeOverview { * @type {number} * @memberof RecipeOverview */ - readonly id: number; + id?: number; /** * * @type {string} * @memberof RecipeOverview */ - readonly name: string; + name: string; /** * * @type {string} * @memberof RecipeOverview */ - readonly description: string | null; + description?: string; /** * * @type {string} @@ -134,9 +134,7 @@ export interface RecipeOverview { * Check if a given object implements the RecipeOverview interface. */ export function instanceOfRecipeOverview(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; - if (!('description' in value)) return false; if (!('image' in value)) return false; if (!('keywords' in value)) return false; if (!('workingTime' in value)) return false; @@ -164,9 +162,9 @@ export function RecipeOverviewFromJSONTyped(json: any, ignoreDiscriminator: bool } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], - 'description': json['description'], + 'description': json['description'] == null ? undefined : json['description'], 'image': json['image'], 'keywords': ((json['keywords'] as Array).map(KeywordLabelFromJSON)), 'workingTime': json['working_time'], @@ -190,6 +188,9 @@ export function RecipeOverviewToJSON(value?: RecipeOverview | null): any { } return { + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], }; } diff --git a/vue3/src/openapi/models/RecipeOverviewRequest.ts b/vue3/src/openapi/models/RecipeOverviewRequest.ts new file mode 100644 index 000000000..60f5bea77 --- /dev/null +++ b/vue3/src/openapi/models/RecipeOverviewRequest.ts @@ -0,0 +1,69 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function RecipeOverviewRequestToJSON(value?: RecipeOverviewRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + }; +} + diff --git a/vue3/src/openapi/models/RecipeRequest.ts b/vue3/src/openapi/models/RecipeRequest.ts new file mode 100644 index 000000000..dc6536936 --- /dev/null +++ b/vue3/src/openapi/models/RecipeRequest.ts @@ -0,0 +1,213 @@ +/* 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; +} + +/** + * 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)), + }; +} + +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)), + }; +} + diff --git a/vue3/src/openapi/models/RecipeShoppingUpdate.ts b/vue3/src/openapi/models/RecipeShoppingUpdate.ts index 2ac5eda6b..73eb83d86 100644 --- a/vue3/src/openapi/models/RecipeShoppingUpdate.ts +++ b/vue3/src/openapi/models/RecipeShoppingUpdate.ts @@ -24,32 +24,13 @@ export interface RecipeShoppingUpdate { * @type {number} * @memberof RecipeShoppingUpdate */ - readonly id: number; - /** - * Existing shopping list to update - * @type {number} - * @memberof RecipeShoppingUpdate - */ - listRecipe?: number; - /** - * List of ingredient IDs from the recipe to add, if not provided all ingredients will be added. - * @type {number} - * @memberof RecipeShoppingUpdate - */ - ingredients?: number; - /** - * Providing a list_recipe ID and servings of 0 will delete that shopping list. - * @type {number} - * @memberof RecipeShoppingUpdate - */ - servings?: number; + id?: number; } /** * Check if a given object implements the RecipeShoppingUpdate interface. */ export function instanceOfRecipeShoppingUpdate(value: object): boolean { - if (!('id' in value)) return false; return true; } @@ -63,10 +44,7 @@ export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator } return { - 'id': json['id'], - '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'], }; } @@ -76,9 +54,7 @@ export function RecipeShoppingUpdateToJSON(value?: RecipeShoppingUpdate | null): } return { - 'list_recipe': value['listRecipe'], - 'ingredients': value['ingredients'], - 'servings': value['servings'], + 'id': value['id'], }; } diff --git a/vue3/src/openapi/models/RecipeShoppingUpdateRequest.ts b/vue3/src/openapi/models/RecipeShoppingUpdateRequest.ts new file mode 100644 index 000000000..d8192e54c --- /dev/null +++ b/vue3/src/openapi/models/RecipeShoppingUpdateRequest.ts @@ -0,0 +1,76 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function RecipeShoppingUpdateRequestToJSON(value?: RecipeShoppingUpdateRequest | null): any { + if (value == null) { + return value; + } + return { + + 'list_recipe': value['listRecipe'], + 'ingredients': value['ingredients'], + 'servings': value['servings'], + }; +} + diff --git a/vue3/src/openapi/models/RecipeSimple.ts b/vue3/src/openapi/models/RecipeSimple.ts index df04ddf21..85751ab94 100644 --- a/vue3/src/openapi/models/RecipeSimple.ts +++ b/vue3/src/openapi/models/RecipeSimple.ts @@ -24,7 +24,7 @@ export interface RecipeSimple { * @type {number} * @memberof RecipeSimple */ - readonly id: number; + id?: number; /** * * @type {string} @@ -43,7 +43,6 @@ export interface RecipeSimple { * Check if a given object implements the RecipeSimple interface. */ export function instanceOfRecipeSimple(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('url' in value)) return false; return true; @@ -59,7 +58,7 @@ export function RecipeSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'url': json['url'], }; @@ -71,6 +70,7 @@ export function RecipeSimpleToJSON(value?: RecipeSimple | null): any { } return { + 'id': value['id'], 'name': value['name'], }; } diff --git a/vue3/src/openapi/models/RecipeSimpleRequest.ts b/vue3/src/openapi/models/RecipeSimpleRequest.ts new file mode 100644 index 000000000..85c8ae0b5 --- /dev/null +++ b/vue3/src/openapi/models/RecipeSimpleRequest.ts @@ -0,0 +1,61 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function RecipeSimpleRequestToJSON(value?: RecipeSimpleRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + }; +} + diff --git a/vue3/src/openapi/models/ShoppingListEntry.ts b/vue3/src/openapi/models/ShoppingListEntry.ts index 30fd69eca..79f4612eb 100644 --- a/vue3/src/openapi/models/ShoppingListEntry.ts +++ b/vue3/src/openapi/models/ShoppingListEntry.ts @@ -49,7 +49,7 @@ export interface ShoppingListEntry { * @type {number} * @memberof ShoppingListEntry */ - readonly id: number; + id?: number; /** * * @type {number} @@ -128,7 +128,6 @@ export interface ShoppingListEntry { * Check if a given object implements the ShoppingListEntry interface. */ export function instanceOfShoppingListEntry(value: object): boolean { - if (!('id' in value)) return false; if (!('food' in value)) return false; if (!('amount' in value)) return false; if (!('recipeMealplan' in value)) return false; @@ -148,7 +147,7 @@ export function ShoppingListEntryFromJSONTyped(json: any, ignoreDiscriminator: b } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'], 'food': FoodFromJSON(json['food']), 'unit': json['unit'] == null ? undefined : UnitFromJSON(json['unit']), @@ -170,6 +169,7 @@ export function ShoppingListEntryToJSON(value?: ShoppingListEntry | null): any { } return { + 'id': value['id'], 'list_recipe': value['listRecipe'], 'food': FoodToJSON(value['food']), 'unit': UnitToJSON(value['unit']), diff --git a/vue3/src/openapi/models/ShoppingListEntryBulkRequest.ts b/vue3/src/openapi/models/ShoppingListEntryBulkRequest.ts new file mode 100644 index 000000000..35fbc11c2 --- /dev/null +++ b/vue3/src/openapi/models/ShoppingListEntryBulkRequest.ts @@ -0,0 +1,70 @@ +/* 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/ShoppingListEntryRequest.ts b/vue3/src/openapi/models/ShoppingListEntryRequest.ts new file mode 100644 index 000000000..c43412a1c --- /dev/null +++ b/vue3/src/openapi/models/ShoppingListEntryRequest.ts @@ -0,0 +1,131 @@ +/* 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 {string} + * @memberof ShoppingListEntryRequest + */ + amount: string; + /** + * + * @type {number} + * @memberof ShoppingListEntryRequest + */ + order?: number; + /** + * + * @type {boolean} + * @memberof ShoppingListEntryRequest + */ + checked?: boolean; + /** + * + * @type {Date} + * @memberof ShoppingListEntryRequest + */ + completedAt?: Date; + /** + * + * @type {Date} + * @memberof ShoppingListEntryRequest + */ + delayUntil?: Date; +} + +/** + * 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'])), + }; +} + +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()), + }; +} + diff --git a/vue3/src/openapi/models/ShoppingListRecipe.ts b/vue3/src/openapi/models/ShoppingListRecipe.ts index b183421c2..200724f0c 100644 --- a/vue3/src/openapi/models/ShoppingListRecipe.ts +++ b/vue3/src/openapi/models/ShoppingListRecipe.ts @@ -24,7 +24,7 @@ export interface ShoppingListRecipe { * @type {number} * @memberof ShoppingListRecipe */ - readonly id: number; + id?: number; /** * * @type {string} @@ -79,7 +79,6 @@ export interface ShoppingListRecipe { * Check if a given object implements the ShoppingListRecipe interface. */ export function instanceOfShoppingListRecipe(value: object): boolean { - if (!('id' in value)) return false; if (!('recipeName' in value)) return false; if (!('name' in value)) return false; if (!('servings' in value)) return false; @@ -99,7 +98,7 @@ export function ShoppingListRecipeFromJSONTyped(json: any, ignoreDiscriminator: } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'recipeName': json['recipe_name'], 'name': json['name'], 'recipe': json['recipe'] == null ? undefined : json['recipe'], @@ -117,6 +116,7 @@ export function ShoppingListRecipeToJSON(value?: ShoppingListRecipe | null): any } return { + 'id': value['id'], 'recipe': value['recipe'], 'mealplan': value['mealplan'], 'servings': value['servings'], diff --git a/vue3/src/openapi/models/ShoppingListRecipeRequest.ts b/vue3/src/openapi/models/ShoppingListRecipeRequest.ts new file mode 100644 index 000000000..884af9fe6 --- /dev/null +++ b/vue3/src/openapi/models/ShoppingListRecipeRequest.ts @@ -0,0 +1,77 @@ +/* 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 {string} + * @memberof ShoppingListRecipeRequest + */ + servings: string; +} + +/** + * 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'], + }; +} + +export function ShoppingListRecipeRequestToJSON(value?: ShoppingListRecipeRequest | null): any { + if (value == null) { + return value; + } + return { + + 'recipe': value['recipe'], + 'mealplan': value['mealplan'], + 'servings': value['servings'], + }; +} + diff --git a/vue3/src/openapi/models/Space.ts b/vue3/src/openapi/models/Space.ts index 3e3a52934..4da0b8482 100644 --- a/vue3/src/openapi/models/Space.ts +++ b/vue3/src/openapi/models/Space.ts @@ -49,7 +49,7 @@ export interface Space { * @type {number} * @memberof Space */ - readonly id: number; + id?: number; /** * * @type {string} @@ -212,7 +212,6 @@ export interface Space { * Check if a given object implements the Space interface. */ export function instanceOfSpace(value: object): boolean { - if (!('id' in value)) return false; if (!('createdBy' in value)) return false; if (!('createdAt' in value)) return false; if (!('maxRecipes' in value)) return false; @@ -237,7 +236,7 @@ export function SpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Spa } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'] == null ? undefined : json['name'], 'createdBy': json['created_by'], 'createdAt': (new Date(json['created_at'])), @@ -273,6 +272,7 @@ export function SpaceToJSON(value?: Space | null): any { } return { + 'id': value['id'], 'name': value['name'], 'message': value['message'], 'food_inherit': ((value['foodInherit'] as Array).map(FoodInheritFieldToJSON)), diff --git a/vue3/src/openapi/models/Step.ts b/vue3/src/openapi/models/Step.ts index dc220d91b..dcc9867b8 100644 --- a/vue3/src/openapi/models/Step.ts +++ b/vue3/src/openapi/models/Step.ts @@ -37,7 +37,7 @@ export interface Step { * @type {number} * @memberof Step */ - readonly id: number; + id?: number; /** * * @type {string} @@ -116,7 +116,6 @@ export interface Step { * Check if a given object implements the Step interface. */ export function instanceOfStep(value: object): boolean { - if (!('id' in value)) return false; if (!('ingredients' in value)) return false; if (!('instructionsMarkdown' in value)) return false; if (!('stepRecipeData' in value)) return false; @@ -134,7 +133,7 @@ export function StepFromJSONTyped(json: any, ignoreDiscriminator: boolean): Step } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'] == null ? undefined : json['name'], 'instruction': json['instruction'] == null ? undefined : json['instruction'], 'ingredients': ((json['ingredients'] as Array).map(IngredientFromJSON)), @@ -156,6 +155,7 @@ export function StepToJSON(value?: Step | null): any { } return { + 'id': value['id'], 'name': value['name'], 'instruction': value['instruction'], 'ingredients': ((value['ingredients'] as Array).map(IngredientToJSON)), diff --git a/vue3/src/openapi/models/StepRequest.ts b/vue3/src/openapi/models/StepRequest.ts new file mode 100644 index 000000000..57412a356 --- /dev/null +++ b/vue3/src/openapi/models/StepRequest.ts @@ -0,0 +1,138 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/Storage.ts b/vue3/src/openapi/models/Storage.ts index 79cab54ed..f3b66e09b 100644 --- a/vue3/src/openapi/models/Storage.ts +++ b/vue3/src/openapi/models/Storage.ts @@ -31,7 +31,7 @@ export interface Storage { * @type {number} * @memberof Storage */ - readonly id: number; + id?: number; /** * * @type {string} @@ -50,18 +50,6 @@ export interface Storage { * @memberof Storage */ username?: string; - /** - * - * @type {string} - * @memberof Storage - */ - password?: string; - /** - * - * @type {string} - * @memberof Storage - */ - token?: string; /** * * @type {number} @@ -74,7 +62,6 @@ export interface Storage { * Check if a given object implements the Storage interface. */ export function instanceOfStorage(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('createdBy' in value)) return false; return true; @@ -90,12 +77,10 @@ export function StorageFromJSONTyped(json: any, ignoreDiscriminator: boolean): S } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], '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'], 'createdBy': json['created_by'], }; } @@ -106,11 +91,10 @@ export function StorageToJSON(value?: Storage | null): any { } return { + 'id': value['id'], 'name': value['name'], 'method': MethodEnumToJSON(value['method']), 'username': value['username'], - 'password': value['password'], - 'token': value['token'], }; } diff --git a/vue3/src/openapi/models/StorageRequest.ts b/vue3/src/openapi/models/StorageRequest.ts new file mode 100644 index 000000000..c2dbd236d --- /dev/null +++ b/vue3/src/openapi/models/StorageRequest.ts @@ -0,0 +1,100 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/Supermarket.ts b/vue3/src/openapi/models/Supermarket.ts index ffd645b35..37a979828 100644 --- a/vue3/src/openapi/models/Supermarket.ts +++ b/vue3/src/openapi/models/Supermarket.ts @@ -65,7 +65,7 @@ export interface Supermarket { * @type {number} * @memberof Supermarket */ - readonly id: number; + id?: number; /** * * @type {string} @@ -96,7 +96,6 @@ export interface Supermarket { * Check if a given object implements the Supermarket interface. */ export function instanceOfSupermarket(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('categoryToSupermarket' in value)) return false; return true; @@ -112,7 +111,7 @@ export function SupermarketFromJSONTyped(json: any, ignoreDiscriminator: boolean } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'description': json['description'] == null ? undefined : json['description'], 'categoryToSupermarket': ((json['category_to_supermarket'] as Array).map(SupermarketCategoryRelationFromJSON)), @@ -126,6 +125,7 @@ export function SupermarketToJSON(value?: Supermarket | null): any { } return { + 'id': value['id'], 'name': value['name'], 'description': value['description'], 'open_data_slug': value['openDataSlug'], diff --git a/vue3/src/openapi/models/SupermarketCategory.ts b/vue3/src/openapi/models/SupermarketCategory.ts index 4f52afcf4..6593f0e3b 100644 --- a/vue3/src/openapi/models/SupermarketCategory.ts +++ b/vue3/src/openapi/models/SupermarketCategory.ts @@ -58,7 +58,7 @@ export interface SupermarketCategory { * @type {number} * @memberof SupermarketCategory */ - readonly id: number; + id?: number; /** * * @type {string} @@ -77,7 +77,6 @@ export interface SupermarketCategory { * Check if a given object implements the SupermarketCategory interface. */ export function instanceOfSupermarketCategory(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; return true; } @@ -92,7 +91,7 @@ export function SupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'description': json['description'] == null ? undefined : json['description'], }; @@ -104,6 +103,7 @@ export function SupermarketCategoryToJSON(value?: SupermarketCategory | null): a } return { + 'id': value['id'], 'name': value['name'], 'description': value['description'], }; diff --git a/vue3/src/openapi/models/SupermarketCategoryRelation.ts b/vue3/src/openapi/models/SupermarketCategoryRelation.ts index 5d6fa22d3..1a9c23d9b 100644 --- a/vue3/src/openapi/models/SupermarketCategoryRelation.ts +++ b/vue3/src/openapi/models/SupermarketCategoryRelation.ts @@ -31,7 +31,7 @@ export interface SupermarketCategoryRelation { * @type {number} * @memberof SupermarketCategoryRelation */ - readonly id: number; + id?: number; /** * * @type {SupermarketCategory} @@ -56,7 +56,6 @@ export interface SupermarketCategoryRelation { * Check if a given object implements the SupermarketCategoryRelation interface. */ export function instanceOfSupermarketCategoryRelation(value: object): boolean { - if (!('id' in value)) return false; if (!('category' in value)) return false; if (!('supermarket' in value)) return false; return true; @@ -72,7 +71,7 @@ export function SupermarketCategoryRelationFromJSONTyped(json: any, ignoreDiscri } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'category': SupermarketCategoryFromJSON(json['category']), 'supermarket': json['supermarket'], 'order': json['order'] == null ? undefined : json['order'], @@ -85,6 +84,7 @@ export function SupermarketCategoryRelationToJSON(value?: SupermarketCategoryRel } return { + 'id': value['id'], 'category': SupermarketCategoryToJSON(value['category']), 'supermarket': value['supermarket'], 'order': value['order'], diff --git a/vue3/src/openapi/models/SupermarketCategoryRelationRequest.ts b/vue3/src/openapi/models/SupermarketCategoryRelationRequest.ts new file mode 100644 index 000000000..5cfb0275c --- /dev/null +++ b/vue3/src/openapi/models/SupermarketCategoryRelationRequest.ts @@ -0,0 +1,85 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function SupermarketCategoryRelationRequestToJSON(value?: SupermarketCategoryRelationRequest | null): any { + if (value == null) { + return value; + } + return { + + 'category': SupermarketCategoryRequestToJSON(value['category']), + 'supermarket': value['supermarket'], + 'order': value['order'], + }; +} + diff --git a/vue3/src/openapi/models/SupermarketCategoryRequest.ts b/vue3/src/openapi/models/SupermarketCategoryRequest.ts new file mode 100644 index 000000000..26f4be76a --- /dev/null +++ b/vue3/src/openapi/models/SupermarketCategoryRequest.ts @@ -0,0 +1,103 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function SupermarketCategoryRequestToJSON(value?: SupermarketCategoryRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + }; +} + diff --git a/vue3/src/openapi/models/SupermarketRequest.ts b/vue3/src/openapi/models/SupermarketRequest.ts new file mode 100644 index 000000000..ea768374e --- /dev/null +++ b/vue3/src/openapi/models/SupermarketRequest.ts @@ -0,0 +1,111 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function SupermarketRequestToJSON(value?: SupermarketRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'description': value['description'], + 'open_data_slug': value['openDataSlug'], + }; +} + diff --git a/vue3/src/openapi/models/Sync.ts b/vue3/src/openapi/models/Sync.ts index cca9506b1..d6041b827 100644 --- a/vue3/src/openapi/models/Sync.ts +++ b/vue3/src/openapi/models/Sync.ts @@ -24,7 +24,7 @@ export interface Sync { * @type {number} * @memberof Sync */ - readonly id: number; + id?: number; /** * * @type {number} @@ -67,7 +67,6 @@ export interface Sync { * Check if a given object implements the Sync interface. */ export function instanceOfSync(value: object): boolean { - if (!('id' in value)) return false; if (!('storage' in value)) return false; if (!('createdAt' in value)) return false; if (!('updatedAt' in value)) return false; @@ -84,7 +83,7 @@ export function SyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sync } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'storage': json['storage'], 'path': json['path'] == null ? undefined : json['path'], 'active': json['active'] == null ? undefined : json['active'], @@ -100,6 +99,7 @@ export function SyncToJSON(value?: Sync | null): any { } return { + 'id': value['id'], 'storage': value['storage'], 'path': value['path'], 'active': value['active'], diff --git a/vue3/src/openapi/models/SyncLog.ts b/vue3/src/openapi/models/SyncLog.ts index b31a3d5f7..69e31ee5e 100644 --- a/vue3/src/openapi/models/SyncLog.ts +++ b/vue3/src/openapi/models/SyncLog.ts @@ -24,7 +24,7 @@ export interface SyncLog { * @type {number} * @memberof SyncLog */ - readonly id: number; + id?: number; /** * * @type {number} @@ -55,7 +55,6 @@ export interface SyncLog { * Check if a given object implements the SyncLog interface. */ export function instanceOfSyncLog(value: object): boolean { - if (!('id' in value)) return false; if (!('sync' in value)) return false; if (!('status' in value)) return false; if (!('createdAt' in value)) return false; @@ -72,7 +71,7 @@ export function SyncLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): S } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'sync': json['sync'], 'status': json['status'], 'msg': json['msg'] == null ? undefined : json['msg'], @@ -86,6 +85,7 @@ export function SyncLogToJSON(value?: SyncLog | null): any { } return { + 'id': value['id'], 'sync': value['sync'], 'status': value['status'], 'msg': value['msg'], diff --git a/vue3/src/openapi/models/SyncRequest.ts b/vue3/src/openapi/models/SyncRequest.ts new file mode 100644 index 000000000..18d5b73a9 --- /dev/null +++ b/vue3/src/openapi/models/SyncRequest.ts @@ -0,0 +1,85 @@ +/* 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; +} + +/** + * 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'])), + }; +} + +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()), + }; +} + diff --git a/vue3/src/openapi/models/Unit.ts b/vue3/src/openapi/models/Unit.ts index b402af9df..62d800036 100644 --- a/vue3/src/openapi/models/Unit.ts +++ b/vue3/src/openapi/models/Unit.ts @@ -58,7 +58,7 @@ export interface Unit { * @type {number} * @memberof Unit */ - readonly id: number; + id?: number; /** * * @type {string} @@ -95,7 +95,6 @@ export interface Unit { * Check if a given object implements the Unit interface. */ export function instanceOfUnit(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; return true; } @@ -110,7 +109,7 @@ export function UnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): Unit } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], 'description': json['description'] == null ? undefined : json['description'], @@ -125,6 +124,7 @@ export function UnitToJSON(value?: Unit | null): any { } return { + 'id': value['id'], 'name': value['name'], 'plural_name': value['pluralName'], 'description': value['description'], diff --git a/vue3/src/openapi/models/UnitConversion.ts b/vue3/src/openapi/models/UnitConversion.ts index c2e369462..54c7ae1c8 100644 --- a/vue3/src/openapi/models/UnitConversion.ts +++ b/vue3/src/openapi/models/UnitConversion.ts @@ -37,7 +37,7 @@ export interface UnitConversion { * @type {number} * @memberof UnitConversion */ - readonly id: number; + id?: number; /** * * @type {string} @@ -86,7 +86,6 @@ export interface UnitConversion { * Check if a given object implements the UnitConversion interface. */ export function instanceOfUnitConversion(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('baseAmount' in value)) return false; if (!('baseUnit' in value)) return false; @@ -105,7 +104,7 @@ export function UnitConversionFromJSONTyped(json: any, ignoreDiscriminator: bool } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'baseAmount': json['base_amount'], 'baseUnit': UnitFromJSON(json['base_unit']), @@ -122,6 +121,7 @@ export function UnitConversionToJSON(value?: UnitConversion | null): any { } return { + 'id': value['id'], 'base_amount': value['baseAmount'], 'base_unit': UnitToJSON(value['baseUnit']), 'converted_amount': value['convertedAmount'], diff --git a/vue3/src/openapi/models/UnitConversionRequest.ts b/vue3/src/openapi/models/UnitConversionRequest.ts new file mode 100644 index 000000000..6d5b12833 --- /dev/null +++ b/vue3/src/openapi/models/UnitConversionRequest.ts @@ -0,0 +1,117 @@ +/* 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 {string} + * @memberof UnitConversionRequest + */ + baseAmount: string; + /** + * + * @type {UnitRequest} + * @memberof UnitConversionRequest + */ + baseUnit: UnitRequest; + /** + * + * @type {string} + * @memberof UnitConversionRequest + */ + convertedAmount: string; + /** + * + * @type {UnitRequest} + * @memberof UnitConversionRequest + */ + convertedUnit: UnitRequest; + /** + * + * @type {FoodRequest} + * @memberof UnitConversionRequest + */ + food?: FoodRequest; + /** + * + * @type {string} + * @memberof UnitConversionRequest + */ + openDataSlug?: string; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/UnitRequest.ts b/vue3/src/openapi/models/UnitRequest.ts new file mode 100644 index 000000000..f48c0106d --- /dev/null +++ b/vue3/src/openapi/models/UnitRequest.ts @@ -0,0 +1,127 @@ +/* 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; +} + +/** + * 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'], + }; +} + +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'], + }; +} + diff --git a/vue3/src/openapi/models/User.ts b/vue3/src/openapi/models/User.ts index 1929b4e64..d1a2dfd7c 100644 --- a/vue3/src/openapi/models/User.ts +++ b/vue3/src/openapi/models/User.ts @@ -24,7 +24,7 @@ export interface User { * @type {number} * @memberof User */ - readonly id: number; + id?: number; /** * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. * @type {string} @@ -55,7 +55,6 @@ export interface User { * Check if a given object implements the User interface. */ export function instanceOfUser(value: object): boolean { - if (!('id' in value)) return false; if (!('username' in value)) return false; if (!('displayName' in value)) return false; return true; @@ -71,7 +70,7 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'username': json['username'], 'firstName': json['first_name'] == null ? undefined : json['first_name'], 'lastName': json['last_name'] == null ? undefined : json['last_name'], @@ -85,6 +84,7 @@ export function UserToJSON(value?: User | null): any { } return { + 'id': value['id'], 'first_name': value['firstName'], 'last_name': value['lastName'], }; diff --git a/vue3/src/openapi/models/UserFile.ts b/vue3/src/openapi/models/UserFile.ts index 5923fb477..60489549c 100644 --- a/vue3/src/openapi/models/UserFile.ts +++ b/vue3/src/openapi/models/UserFile.ts @@ -24,19 +24,13 @@ export interface UserFile { * @type {number} * @memberof UserFile */ - readonly id: number; + id?: number; /** * * @type {string} * @memberof UserFile */ name: string; - /** - * - * @type {string} - * @memberof UserFile - */ - file: string; /** * * @type {string} @@ -61,9 +55,7 @@ export interface UserFile { * Check if a given object implements the UserFile interface. */ export function instanceOfUserFile(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; - if (!('file' in value)) return false; if (!('fileDownload' in value)) return false; if (!('preview' in value)) return false; if (!('fileSizeKb' in value)) return false; @@ -80,9 +72,8 @@ export function UserFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], - 'file': json['file'], 'fileDownload': json['file_download'], 'preview': json['preview'], 'fileSizeKb': json['file_size_kb'], @@ -95,8 +86,8 @@ export function UserFileToJSON(value?: UserFile | null): any { } return { + 'id': value['id'], 'name': value['name'], - 'file': value['file'], }; } diff --git a/vue3/src/openapi/models/UserFileView.ts b/vue3/src/openapi/models/UserFileView.ts index 530a8e763..620dc4a2c 100644 --- a/vue3/src/openapi/models/UserFileView.ts +++ b/vue3/src/openapi/models/UserFileView.ts @@ -24,7 +24,7 @@ export interface UserFileView { * @type {number} * @memberof UserFileView */ - readonly id: number; + id?: number; /** * * @type {string} @@ -49,7 +49,6 @@ export interface UserFileView { * Check if a given object implements the UserFileView interface. */ export function instanceOfUserFileView(value: object): boolean { - if (!('id' in value)) return false; if (!('name' in value)) return false; if (!('fileDownload' in value)) return false; if (!('preview' in value)) return false; @@ -66,7 +65,7 @@ export function UserFileViewFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'fileDownload': json['file_download'], 'preview': json['preview'], @@ -79,6 +78,7 @@ export function UserFileViewToJSON(value?: UserFileView | null): any { } return { + 'id': value['id'], 'name': value['name'], }; } diff --git a/vue3/src/openapi/models/UserFileViewRequest.ts b/vue3/src/openapi/models/UserFileViewRequest.ts new file mode 100644 index 000000000..375cb966e --- /dev/null +++ b/vue3/src/openapi/models/UserFileViewRequest.ts @@ -0,0 +1,61 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function UserFileViewRequestToJSON(value?: UserFileViewRequest | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + }; +} + diff --git a/vue3/src/openapi/models/UserRequest.ts b/vue3/src/openapi/models/UserRequest.ts new file mode 100644 index 000000000..96f8fadbc --- /dev/null +++ b/vue3/src/openapi/models/UserRequest.ts @@ -0,0 +1,68 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function UserRequestToJSON(value?: UserRequest | null): any { + if (value == null) { + return value; + } + return { + + 'first_name': value['firstName'], + 'last_name': value['lastName'], + }; +} + diff --git a/vue3/src/openapi/models/UserSpace.ts b/vue3/src/openapi/models/UserSpace.ts index b6c627c8d..d2e75b570 100644 --- a/vue3/src/openapi/models/UserSpace.ts +++ b/vue3/src/openapi/models/UserSpace.ts @@ -37,7 +37,7 @@ export interface UserSpace { * @type {number} * @memberof UserSpace */ - readonly id: number; + id?: number; /** * * @type {User} @@ -92,7 +92,6 @@ export interface UserSpace { * Check if a given object implements the UserSpace interface. */ export function instanceOfUserSpace(value: object): boolean { - if (!('id' in value)) return false; if (!('user' in value)) return false; if (!('space' in value)) return false; if (!('groups' in value)) return false; @@ -112,7 +111,7 @@ export function UserSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'user': UserFromJSON(json['user']), 'space': json['space'], 'groups': ((json['groups'] as Array).map(GroupFromJSON)), @@ -130,6 +129,7 @@ export function UserSpaceToJSON(value?: UserSpace | null): any { } return { + 'id': value['id'], 'groups': ((value['groups'] as Array).map(GroupToJSON)), 'active': value['active'], 'internal_note': value['internalNote'], diff --git a/vue3/src/openapi/models/ViewLog.ts b/vue3/src/openapi/models/ViewLog.ts index 480063bda..8f168353c 100644 --- a/vue3/src/openapi/models/ViewLog.ts +++ b/vue3/src/openapi/models/ViewLog.ts @@ -24,7 +24,7 @@ export interface ViewLog { * @type {number} * @memberof ViewLog */ - readonly id: number; + id?: number; /** * * @type {number} @@ -49,7 +49,6 @@ export interface ViewLog { * Check if a given object implements the ViewLog interface. */ export function instanceOfViewLog(value: object): boolean { - if (!('id' in value)) return false; if (!('recipe' in value)) return false; if (!('createdBy' in value)) return false; if (!('createdAt' in value)) return false; @@ -66,7 +65,7 @@ export function ViewLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): V } return { - 'id': json['id'], + 'id': json['id'] == null ? undefined : json['id'], 'recipe': json['recipe'], 'createdBy': json['created_by'], 'createdAt': (new Date(json['created_at'])), @@ -79,6 +78,7 @@ export function ViewLogToJSON(value?: ViewLog | null): any { } return { + 'id': value['id'], 'recipe': value['recipe'], }; } diff --git a/vue3/src/openapi/models/ViewLogRequest.ts b/vue3/src/openapi/models/ViewLogRequest.ts new file mode 100644 index 000000000..6b423d03b --- /dev/null +++ b/vue3/src/openapi/models/ViewLogRequest.ts @@ -0,0 +1,61 @@ +/* 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; +} + +/** + * 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'], + }; +} + +export function ViewLogRequestToJSON(value?: ViewLogRequest | null): any { + if (value == null) { + return value; + } + return { + + 'recipe': value['recipe'], + }; +} + diff --git a/vue3/src/openapi/models/index.ts b/vue3/src/openapi/models/index.ts index d9a6415d3..f6e4f67b4 100644 --- a/vue3/src/openapi/models/index.ts +++ b/vue3/src/openapi/models/index.ts @@ -1,42 +1,71 @@ /* tslint:disable */ /* eslint-disable */ export * from './AccessToken'; +export * from './AccessTokenRequest'; export * from './AuthToken'; +export * from './AuthTokenRequest'; export * from './Automation'; +export * from './AutomationRequest'; export * from './AutomationTypeEnum'; export * from './BaseUnitEnum'; export * from './BookmarkletImport'; export * from './BookmarkletImportList'; +export * from './BookmarkletImportRequest'; export * from './ConnectorConfigConfig'; +export * from './ConnectorConfigConfigRequest'; export * from './CookLog'; +export * from './CookLogRequest'; export * from './CustomFilter'; +export * from './CustomFilterRequest'; export * from './DefaultPageEnum'; export * from './DeleteEnum'; export * from './ExportLog'; +export * from './ExportLogRequest'; export * from './Food'; export * from './FoodInheritField'; +export * from './FoodInheritFieldRequest'; +export * from './FoodRequest'; export * from './FoodShoppingUpdate'; +export * from './FoodShoppingUpdateRequest'; export * from './FoodSimple'; +export * from './FoodSimpleRequest'; export * from './Group'; +export * from './GroupRequest'; export * from './ImportLog'; +export * from './ImportLogRequest'; export * from './Ingredient'; +export * from './IngredientRequest'; export * from './InviteLink'; +export * from './InviteLinkRequest'; export * from './Keyword'; export * from './KeywordLabel'; +export * from './KeywordRequest'; export * from './MealPlan'; +export * from './MealPlanRequest'; export * from './MealType'; +export * from './MealTypeRequest'; export * from './MethodEnum'; export * from './NutritionInformation'; +export * from './NutritionInformationRequest'; export * from './OpenDataCategory'; +export * from './OpenDataCategoryRequest'; export * from './OpenDataConversion'; +export * from './OpenDataConversionRequest'; export * from './OpenDataFood'; export * from './OpenDataFoodProperty'; +export * from './OpenDataFoodPropertyRequest'; +export * from './OpenDataFoodRequest'; export * from './OpenDataProperty'; +export * from './OpenDataPropertyRequest'; export * from './OpenDataStore'; export * from './OpenDataStoreCategory'; +export * from './OpenDataStoreCategoryRequest'; +export * from './OpenDataStoreRequest'; export * from './OpenDataUnit'; +export * from './OpenDataUnitRequest'; export * from './OpenDataUnitTypeEnum'; export * from './OpenDataVersion'; +export * from './OpenDataVersionRequest'; export * from './PaginatedAutomationList'; export * from './PaginatedCookLogList'; export * from './PaginatedCustomFilterList'; @@ -52,77 +81,99 @@ export * from './PaginatedSyncLogList'; export * from './PaginatedUnitList'; export * from './PaginatedUserSpaceList'; export * from './PaginatedViewLogList'; -export * from './PatchedAccessToken'; -export * from './PatchedAutomation'; -export * from './PatchedBookmarkletImport'; -export * from './PatchedConnectorConfigConfig'; -export * from './PatchedCookLog'; -export * from './PatchedCustomFilter'; -export * from './PatchedExportLog'; -export * from './PatchedFood'; -export * from './PatchedImportLog'; -export * from './PatchedIngredient'; -export * from './PatchedInviteLink'; -export * from './PatchedKeyword'; -export * from './PatchedMealPlan'; -export * from './PatchedMealType'; -export * from './PatchedOpenDataCategory'; -export * from './PatchedOpenDataConversion'; -export * from './PatchedOpenDataFood'; -export * from './PatchedOpenDataProperty'; -export * from './PatchedOpenDataStore'; -export * from './PatchedOpenDataUnit'; -export * from './PatchedOpenDataVersion'; -export * from './PatchedProperty'; -export * from './PatchedPropertyType'; -export * from './PatchedRecipe'; -export * from './PatchedRecipeBook'; -export * from './PatchedRecipeBookEntry'; -export * from './PatchedShoppingListEntry'; -export * from './PatchedShoppingListRecipe'; -export * from './PatchedSpace'; -export * from './PatchedStep'; -export * from './PatchedStorage'; -export * from './PatchedSupermarket'; -export * from './PatchedSupermarketCategory'; -export * from './PatchedSupermarketCategoryRelation'; -export * from './PatchedSync'; -export * from './PatchedUnit'; -export * from './PatchedUnitConversion'; -export * from './PatchedUser'; -export * from './PatchedUserPreference'; -export * from './PatchedUserSpace'; -export * from './PatchedViewLog'; +export * from './PatchedAccessTokenRequest'; +export * from './PatchedAutomationRequest'; +export * from './PatchedBookmarkletImportRequest'; +export * from './PatchedConnectorConfigConfigRequest'; +export * from './PatchedCookLogRequest'; +export * from './PatchedCustomFilterRequest'; +export * from './PatchedExportLogRequest'; +export * from './PatchedFoodRequest'; +export * from './PatchedImportLogRequest'; +export * from './PatchedIngredientRequest'; +export * from './PatchedInviteLinkRequest'; +export * from './PatchedKeywordRequest'; +export * from './PatchedMealPlanRequest'; +export * from './PatchedMealTypeRequest'; +export * from './PatchedOpenDataCategoryRequest'; +export * from './PatchedOpenDataConversionRequest'; +export * from './PatchedOpenDataFoodRequest'; +export * from './PatchedOpenDataPropertyRequest'; +export * from './PatchedOpenDataStoreRequest'; +export * from './PatchedOpenDataUnitRequest'; +export * from './PatchedOpenDataVersionRequest'; +export * from './PatchedPropertyRequest'; +export * from './PatchedPropertyTypeRequest'; +export * from './PatchedRecipeBookEntryRequest'; +export * from './PatchedRecipeBookRequest'; +export * from './PatchedRecipeRequest'; +export * from './PatchedShoppingListEntryRequest'; +export * from './PatchedShoppingListRecipeRequest'; +export * from './PatchedSpaceRequest'; +export * from './PatchedStepRequest'; +export * from './PatchedStorageRequest'; +export * from './PatchedSupermarketCategoryRelationRequest'; +export * from './PatchedSupermarketCategoryRequest'; +export * from './PatchedSupermarketRequest'; +export * from './PatchedSyncRequest'; +export * from './PatchedUnitConversionRequest'; +export * from './PatchedUnitRequest'; +export * from './PatchedUserPreferenceRequest'; +export * from './PatchedUserRequest'; +export * from './PatchedUserSpaceRequest'; +export * from './PatchedViewLogRequest'; export * from './Property'; +export * from './PropertyRequest'; export * from './PropertyType'; +export * from './PropertyTypeRequest'; export * from './Recipe'; export * from './RecipeBook'; export * from './RecipeBookEntry'; +export * from './RecipeBookEntryRequest'; +export * from './RecipeBookRequest'; export * from './RecipeFlat'; export * from './RecipeImage'; export * from './RecipeOverview'; +export * from './RecipeOverviewRequest'; +export * from './RecipeRequest'; export * from './RecipeShoppingUpdate'; +export * from './RecipeShoppingUpdateRequest'; export * from './RecipeSimple'; +export * from './RecipeSimpleRequest'; export * from './ShoppingListEntry'; export * from './ShoppingListEntryBulk'; +export * from './ShoppingListEntryBulkRequest'; +export * from './ShoppingListEntryRequest'; export * from './ShoppingListRecipe'; +export * from './ShoppingListRecipeRequest'; export * from './Space'; export * from './SpaceNavTextColorEnum'; export * from './SpaceThemeEnum'; export * from './Step'; +export * from './StepRequest'; export * from './Storage'; +export * from './StorageRequest'; export * from './Supermarket'; export * from './SupermarketCategory'; export * from './SupermarketCategoryRelation'; +export * from './SupermarketCategoryRelationRequest'; +export * from './SupermarketCategoryRequest'; +export * from './SupermarketRequest'; export * from './Sync'; export * from './SyncLog'; +export * from './SyncRequest'; export * from './ThemeEnum'; export * from './Unit'; export * from './UnitConversion'; +export * from './UnitConversionRequest'; +export * from './UnitRequest'; export * from './User'; export * from './UserFile'; export * from './UserFileView'; +export * from './UserFileViewRequest'; export * from './UserPreference'; export * from './UserPreferenceNavTextColorEnum'; +export * from './UserRequest'; export * from './UserSpace'; export * from './ViewLog'; +export * from './ViewLogRequest'; diff --git a/vue3/src/pages/MealPlanPage.vue b/vue3/src/pages/MealPlanPage.vue index 0f1c52187..974497095 100644 --- a/vue3/src/pages/MealPlanPage.vue +++ b/vue3/src/pages/MealPlanPage.vue @@ -30,8 +30,8 @@ export default defineComponent({ testApi: function () { const api = new ApiApi() api.apiMealPlanList().then(r => { - if (r.length > 0) { - api.apiMealPlanUpdate({id: r[0].id, mealPlan: r[0]}) + if (r.length > 0 && r[0].id != undefined) { + api.apiMealPlanUpdate({id: r[0].id, mealPlanRequest: r[0]}) } }) }