From 2c12ce3edfd5f481120cda02c50904b6270f7a8c Mon Sep 17 00:00:00 2001 From: smilerz Date: Wed, 27 Mar 2024 15:45:51 -0500 Subject: [PATCH] added permissions to docs/api added swagger api view added authentication method to openapi schema added logo to docs/api fixed tree and merge schemas --- cookbook/helper/permission_helper.py | 9 +- cookbook/models.py | 1 - cookbook/static/django_js_reverse/reverse.js | 2 +- cookbook/templates/api_info.html | 16 - cookbook/templates/base.html | 16 +- cookbook/templatetags/theming_tags.py | 4 +- cookbook/tests/views/test_views_general.py | 10 + cookbook/urls.py | 13 +- cookbook/views/api.py | 6 +- cookbook/views/views.py | 112 +- recipes/settings.py | 119 +- vue3/src/openapi/apis/ApiApi.ts | 1259 +++++++++++------ vue3/src/openapi/apis/ApiImportOpenDataApi.ts | 10 +- vue3/src/openapi/apis/ApiTokenAuthApi.ts | 5 +- 14 files changed, 970 insertions(+), 612 deletions(-) delete mode 100644 cookbook/templates/api_info.html diff --git a/cookbook/helper/permission_helper.py b/cookbook/helper/permission_helper.py index b6e49771f..dbd7a15f9 100644 --- a/cookbook/helper/permission_helper.py +++ b/cookbook/helper/permission_helper.py @@ -160,18 +160,15 @@ class GroupRequiredMixin(object): def dispatch(self, request, *args, **kwargs): if not has_group_permission(request.user, self.groups_required): if not request.user.is_authenticated: - messages.add_message(request, messages.ERROR, - _('You are not logged in and therefore cannot view this page!')) + messages.add_message(request, messages.ERROR, _('You are not logged in and therefore cannot view this page!')) return HttpResponseRedirect(reverse_lazy('account_login') + '?next=' + request.path) else: - messages.add_message(request, messages.ERROR, - _('You do not have the required permissions to view this page!')) + messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!')) return HttpResponseRedirect(reverse_lazy('index')) try: obj = self.get_object() if obj.get_space() != request.space: - messages.add_message(request, messages.ERROR, - _('You do not have the required permissions to view this page!')) + messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!')) return HttpResponseRedirect(reverse_lazy('index')) except AttributeError: pass diff --git a/cookbook/models.py b/cookbook/models.py index d2e160b8d..3c9b69d1d 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -417,7 +417,6 @@ class ConnectorConfig(models.Model, PermissionModelMixin): objects = ScopedManager(space='space') - class UserPreference(models.Model, PermissionModelMixin): # Themes BOOTSTRAP = 'BOOTSTRAP' diff --git a/cookbook/static/django_js_reverse/reverse.js b/cookbook/static/django_js_reverse/reverse.js index 3e4514ef4..7fbdc5dc1 100644 --- a/cookbook/static/django_js_reverse/reverse.js +++ b/cookbook/static/django_js_reverse/reverse.js @@ -1,4 +1,4 @@ -this.Urls=(function(){"use strict";var data={"urls":[["account_change_password",[["accounts/password/change/",[]]]],["account_confirm_email",[["accounts/confirm-email/%(key)s/",["key"]]]],["account_email",[["accounts/email/",[]]]],["account_email_verification_sent",[["accounts/confirm-email/",[]]]],["account_inactive",[["accounts/inactive/",[]]]],["account_login",[["accounts/login/",[]]]],["account_logout",[["accounts/logout/",[]]]],["account_reset_password",[["accounts/password/reset/",[]]]],["account_reset_password_done",[["accounts/password/reset/done/",[]]]],["account_reset_password_from_key",[["accounts/password/reset/key/%(uidb36)s-%(key)s/",["uidb36","key"]]]],["account_reset_password_from_key_done",[["accounts/password/reset/key/done/",[]]]],["account_set_password",[["accounts/password/set/",[]]]],["account_signup",[["accounts/signup/",[]]]],["admin:account_emailaddress_add",[["admin/account/emailaddress/add/",[]]]],["admin:account_emailaddress_change",[["admin/account/emailaddress/%(object_id)s/change/",["object_id"]]]],["admin:account_emailaddress_changelist",[["admin/account/emailaddress/",[]]]],["admin:account_emailaddress_delete",[["admin/account/emailaddress/%(object_id)s/delete/",["object_id"]]]],["admin:account_emailaddress_history",[["admin/account/emailaddress/%(object_id)s/history/",["object_id"]]]],["admin:app_list",[["admin/%(app_label)s/",["app_label"]]]],["admin:auth_user_add",[["admin/auth/user/add/",[]]]],["admin:auth_user_change",[["admin/auth/user/%(object_id)s/change/",["object_id"]]]],["admin:auth_user_changelist",[["admin/auth/user/",[]]]],["admin:auth_user_delete",[["admin/auth/user/%(object_id)s/delete/",["object_id"]]]],["admin:auth_user_history",[["admin/auth/user/%(object_id)s/history/",["object_id"]]]],["admin:auth_user_password_change",[["admin/auth/user/%(id)s/password/",["id"]]]],["admin:authtoken_tokenproxy_add",[["admin/authtoken/tokenproxy/add/",[]]]],["admin:authtoken_tokenproxy_change",[["admin/authtoken/tokenproxy/%(object_id)s/change/",["object_id"]]]],["admin:authtoken_tokenproxy_changelist",[["admin/authtoken/tokenproxy/",[]]]],["admin:authtoken_tokenproxy_delete",[["admin/authtoken/tokenproxy/%(object_id)s/delete/",["object_id"]]]],["admin:authtoken_tokenproxy_history",[["admin/authtoken/tokenproxy/%(object_id)s/history/",["object_id"]]]],["admin:autocomplete",[["admin/autocomplete/",[]]]],["admin:cookbook_bookmarkletimport_add",[["admin/cookbook/bookmarkletimport/add/",[]]]],["admin:cookbook_bookmarkletimport_change",[["admin/cookbook/bookmarkletimport/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_bookmarkletimport_changelist",[["admin/cookbook/bookmarkletimport/",[]]]],["admin:cookbook_bookmarkletimport_delete",[["admin/cookbook/bookmarkletimport/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_bookmarkletimport_history",[["admin/cookbook/bookmarkletimport/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_comment_add",[["admin/cookbook/comment/add/",[]]]],["admin:cookbook_comment_change",[["admin/cookbook/comment/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_comment_changelist",[["admin/cookbook/comment/",[]]]],["admin:cookbook_comment_delete",[["admin/cookbook/comment/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_comment_history",[["admin/cookbook/comment/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_cooklog_add",[["admin/cookbook/cooklog/add/",[]]]],["admin:cookbook_cooklog_change",[["admin/cookbook/cooklog/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_cooklog_changelist",[["admin/cookbook/cooklog/",[]]]],["admin:cookbook_cooklog_delete",[["admin/cookbook/cooklog/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_cooklog_history",[["admin/cookbook/cooklog/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_food_add",[["admin/cookbook/food/add/",[]]]],["admin:cookbook_food_change",[["admin/cookbook/food/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_food_changelist",[["admin/cookbook/food/",[]]]],["admin:cookbook_food_delete",[["admin/cookbook/food/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_food_history",[["admin/cookbook/food/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_importlog_add",[["admin/cookbook/importlog/add/",[]]]],["admin:cookbook_importlog_change",[["admin/cookbook/importlog/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_importlog_changelist",[["admin/cookbook/importlog/",[]]]],["admin:cookbook_importlog_delete",[["admin/cookbook/importlog/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_importlog_history",[["admin/cookbook/importlog/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_ingredient_add",[["admin/cookbook/ingredient/add/",[]]]],["admin:cookbook_ingredient_change",[["admin/cookbook/ingredient/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_ingredient_changelist",[["admin/cookbook/ingredient/",[]]]],["admin:cookbook_ingredient_delete",[["admin/cookbook/ingredient/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_ingredient_history",[["admin/cookbook/ingredient/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_invitelink_add",[["admin/cookbook/invitelink/add/",[]]]],["admin:cookbook_invitelink_change",[["admin/cookbook/invitelink/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_invitelink_changelist",[["admin/cookbook/invitelink/",[]]]],["admin:cookbook_invitelink_delete",[["admin/cookbook/invitelink/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_invitelink_history",[["admin/cookbook/invitelink/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_keyword_add",[["admin/cookbook/keyword/add/",[]]]],["admin:cookbook_keyword_change",[["admin/cookbook/keyword/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_keyword_changelist",[["admin/cookbook/keyword/",[]]]],["admin:cookbook_keyword_delete",[["admin/cookbook/keyword/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_keyword_history",[["admin/cookbook/keyword/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_mealplan_add",[["admin/cookbook/mealplan/add/",[]]]],["admin:cookbook_mealplan_change",[["admin/cookbook/mealplan/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_mealplan_changelist",[["admin/cookbook/mealplan/",[]]]],["admin:cookbook_mealplan_delete",[["admin/cookbook/mealplan/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_mealplan_history",[["admin/cookbook/mealplan/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_mealtype_add",[["admin/cookbook/mealtype/add/",[]]]],["admin:cookbook_mealtype_change",[["admin/cookbook/mealtype/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_mealtype_changelist",[["admin/cookbook/mealtype/",[]]]],["admin:cookbook_mealtype_delete",[["admin/cookbook/mealtype/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_mealtype_history",[["admin/cookbook/mealtype/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_nutritioninformation_add",[["admin/cookbook/nutritioninformation/add/",[]]]],["admin:cookbook_nutritioninformation_change",[["admin/cookbook/nutritioninformation/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_nutritioninformation_changelist",[["admin/cookbook/nutritioninformation/",[]]]],["admin:cookbook_nutritioninformation_delete",[["admin/cookbook/nutritioninformation/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_nutritioninformation_history",[["admin/cookbook/nutritioninformation/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_recipe_add",[["admin/cookbook/recipe/add/",[]]]],["admin:cookbook_recipe_change",[["admin/cookbook/recipe/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_recipe_changelist",[["admin/cookbook/recipe/",[]]]],["admin:cookbook_recipe_delete",[["admin/cookbook/recipe/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_recipe_history",[["admin/cookbook/recipe/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_recipebook_add",[["admin/cookbook/recipebook/add/",[]]]],["admin:cookbook_recipebook_change",[["admin/cookbook/recipebook/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_recipebook_changelist",[["admin/cookbook/recipebook/",[]]]],["admin:cookbook_recipebook_delete",[["admin/cookbook/recipebook/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_recipebook_history",[["admin/cookbook/recipebook/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_recipebookentry_add",[["admin/cookbook/recipebookentry/add/",[]]]],["admin:cookbook_recipebookentry_change",[["admin/cookbook/recipebookentry/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_recipebookentry_changelist",[["admin/cookbook/recipebookentry/",[]]]],["admin:cookbook_recipebookentry_delete",[["admin/cookbook/recipebookentry/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_recipebookentry_history",[["admin/cookbook/recipebookentry/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_recipeimport_add",[["admin/cookbook/recipeimport/add/",[]]]],["admin:cookbook_recipeimport_change",[["admin/cookbook/recipeimport/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_recipeimport_changelist",[["admin/cookbook/recipeimport/",[]]]],["admin:cookbook_recipeimport_delete",[["admin/cookbook/recipeimport/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_recipeimport_history",[["admin/cookbook/recipeimport/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_searchpreference_add",[["admin/cookbook/searchpreference/add/",[]]]],["admin:cookbook_searchpreference_change",[["admin/cookbook/searchpreference/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_searchpreference_changelist",[["admin/cookbook/searchpreference/",[]]]],["admin:cookbook_searchpreference_delete",[["admin/cookbook/searchpreference/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_searchpreference_history",[["admin/cookbook/searchpreference/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_sharelink_add",[["admin/cookbook/sharelink/add/",[]]]],["admin:cookbook_sharelink_change",[["admin/cookbook/sharelink/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_sharelink_changelist",[["admin/cookbook/sharelink/",[]]]],["admin:cookbook_sharelink_delete",[["admin/cookbook/sharelink/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_sharelink_history",[["admin/cookbook/sharelink/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_shoppinglist_add",[["admin/cookbook/shoppinglist/add/",[]]]],["admin:cookbook_shoppinglist_change",[["admin/cookbook/shoppinglist/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_shoppinglist_changelist",[["admin/cookbook/shoppinglist/",[]]]],["admin:cookbook_shoppinglist_delete",[["admin/cookbook/shoppinglist/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_shoppinglist_history",[["admin/cookbook/shoppinglist/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_shoppinglistentry_add",[["admin/cookbook/shoppinglistentry/add/",[]]]],["admin:cookbook_shoppinglistentry_change",[["admin/cookbook/shoppinglistentry/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_shoppinglistentry_changelist",[["admin/cookbook/shoppinglistentry/",[]]]],["admin:cookbook_shoppinglistentry_delete",[["admin/cookbook/shoppinglistentry/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_shoppinglistentry_history",[["admin/cookbook/shoppinglistentry/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_shoppinglistrecipe_add",[["admin/cookbook/shoppinglistrecipe/add/",[]]]],["admin:cookbook_shoppinglistrecipe_change",[["admin/cookbook/shoppinglistrecipe/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_shoppinglistrecipe_changelist",[["admin/cookbook/shoppinglistrecipe/",[]]]],["admin:cookbook_shoppinglistrecipe_delete",[["admin/cookbook/shoppinglistrecipe/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_shoppinglistrecipe_history",[["admin/cookbook/shoppinglistrecipe/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_space_add",[["admin/cookbook/space/add/",[]]]],["admin:cookbook_space_change",[["admin/cookbook/space/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_space_changelist",[["admin/cookbook/space/",[]]]],["admin:cookbook_space_delete",[["admin/cookbook/space/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_space_history",[["admin/cookbook/space/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_step_add",[["admin/cookbook/step/add/",[]]]],["admin:cookbook_step_change",[["admin/cookbook/step/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_step_changelist",[["admin/cookbook/step/",[]]]],["admin:cookbook_step_delete",[["admin/cookbook/step/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_step_history",[["admin/cookbook/step/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_storage_add",[["admin/cookbook/storage/add/",[]]]],["admin:cookbook_storage_change",[["admin/cookbook/storage/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_storage_changelist",[["admin/cookbook/storage/",[]]]],["admin:cookbook_storage_delete",[["admin/cookbook/storage/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_storage_history",[["admin/cookbook/storage/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_supermarket_add",[["admin/cookbook/supermarket/add/",[]]]],["admin:cookbook_supermarket_change",[["admin/cookbook/supermarket/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_supermarket_changelist",[["admin/cookbook/supermarket/",[]]]],["admin:cookbook_supermarket_delete",[["admin/cookbook/supermarket/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_supermarket_history",[["admin/cookbook/supermarket/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_supermarketcategory_add",[["admin/cookbook/supermarketcategory/add/",[]]]],["admin:cookbook_supermarketcategory_change",[["admin/cookbook/supermarketcategory/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_supermarketcategory_changelist",[["admin/cookbook/supermarketcategory/",[]]]],["admin:cookbook_supermarketcategory_delete",[["admin/cookbook/supermarketcategory/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_supermarketcategory_history",[["admin/cookbook/supermarketcategory/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_sync_add",[["admin/cookbook/sync/add/",[]]]],["admin:cookbook_sync_change",[["admin/cookbook/sync/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_sync_changelist",[["admin/cookbook/sync/",[]]]],["admin:cookbook_sync_delete",[["admin/cookbook/sync/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_sync_history",[["admin/cookbook/sync/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_synclog_add",[["admin/cookbook/synclog/add/",[]]]],["admin:cookbook_synclog_change",[["admin/cookbook/synclog/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_synclog_changelist",[["admin/cookbook/synclog/",[]]]],["admin:cookbook_synclog_delete",[["admin/cookbook/synclog/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_synclog_history",[["admin/cookbook/synclog/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_telegrambot_add",[["admin/cookbook/telegrambot/add/",[]]]],["admin:cookbook_telegrambot_change",[["admin/cookbook/telegrambot/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_telegrambot_changelist",[["admin/cookbook/telegrambot/",[]]]],["admin:cookbook_telegrambot_delete",[["admin/cookbook/telegrambot/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_telegrambot_history",[["admin/cookbook/telegrambot/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_unit_add",[["admin/cookbook/unit/add/",[]]]],["admin:cookbook_unit_change",[["admin/cookbook/unit/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_unit_changelist",[["admin/cookbook/unit/",[]]]],["admin:cookbook_unit_delete",[["admin/cookbook/unit/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_unit_history",[["admin/cookbook/unit/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_userfile_add",[["admin/cookbook/userfile/add/",[]]]],["admin:cookbook_userfile_change",[["admin/cookbook/userfile/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_userfile_changelist",[["admin/cookbook/userfile/",[]]]],["admin:cookbook_userfile_delete",[["admin/cookbook/userfile/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_userfile_history",[["admin/cookbook/userfile/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_userpreference_add",[["admin/cookbook/userpreference/add/",[]]]],["admin:cookbook_userpreference_change",[["admin/cookbook/userpreference/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_userpreference_changelist",[["admin/cookbook/userpreference/",[]]]],["admin:cookbook_userpreference_delete",[["admin/cookbook/userpreference/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_userpreference_history",[["admin/cookbook/userpreference/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_userspace_add",[["admin/cookbook/userspace/add/",[]]]],["admin:cookbook_userspace_change",[["admin/cookbook/userspace/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_userspace_changelist",[["admin/cookbook/userspace/",[]]]],["admin:cookbook_userspace_delete",[["admin/cookbook/userspace/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_userspace_history",[["admin/cookbook/userspace/%(object_id)s/history/",["object_id"]]]],["admin:cookbook_viewlog_add",[["admin/cookbook/viewlog/add/",[]]]],["admin:cookbook_viewlog_change",[["admin/cookbook/viewlog/%(object_id)s/change/",["object_id"]]]],["admin:cookbook_viewlog_changelist",[["admin/cookbook/viewlog/",[]]]],["admin:cookbook_viewlog_delete",[["admin/cookbook/viewlog/%(object_id)s/delete/",["object_id"]]]],["admin:cookbook_viewlog_history",[["admin/cookbook/viewlog/%(object_id)s/history/",["object_id"]]]],["admin:index",[["admin/",[]]]],["admin:javascript-catalog",[["admin/cookbook/food/jsi18n/",[]],["admin/cookbook/keyword/jsi18n/",[]]]],["admin:jsi18n",[["admin/jsi18n/",[]]]],["admin:login",[["admin/login/",[]]]],["admin:logout",[["admin/logout/",[]]]],["admin:oauth2_provider_accesstoken_add",[["admin/oauth2_provider/accesstoken/add/",[]]]],["admin:oauth2_provider_accesstoken_change",[["admin/oauth2_provider/accesstoken/%(object_id)s/change/",["object_id"]]]],["admin:oauth2_provider_accesstoken_changelist",[["admin/oauth2_provider/accesstoken/",[]]]],["admin:oauth2_provider_accesstoken_delete",[["admin/oauth2_provider/accesstoken/%(object_id)s/delete/",["object_id"]]]],["admin:oauth2_provider_accesstoken_history",[["admin/oauth2_provider/accesstoken/%(object_id)s/history/",["object_id"]]]],["admin:oauth2_provider_application_add",[["admin/oauth2_provider/application/add/",[]]]],["admin:oauth2_provider_application_change",[["admin/oauth2_provider/application/%(object_id)s/change/",["object_id"]]]],["admin:oauth2_provider_application_changelist",[["admin/oauth2_provider/application/",[]]]],["admin:oauth2_provider_application_delete",[["admin/oauth2_provider/application/%(object_id)s/delete/",["object_id"]]]],["admin:oauth2_provider_application_history",[["admin/oauth2_provider/application/%(object_id)s/history/",["object_id"]]]],["admin:oauth2_provider_grant_add",[["admin/oauth2_provider/grant/add/",[]]]],["admin:oauth2_provider_grant_change",[["admin/oauth2_provider/grant/%(object_id)s/change/",["object_id"]]]],["admin:oauth2_provider_grant_changelist",[["admin/oauth2_provider/grant/",[]]]],["admin:oauth2_provider_grant_delete",[["admin/oauth2_provider/grant/%(object_id)s/delete/",["object_id"]]]],["admin:oauth2_provider_grant_history",[["admin/oauth2_provider/grant/%(object_id)s/history/",["object_id"]]]],["admin:oauth2_provider_idtoken_add",[["admin/oauth2_provider/idtoken/add/",[]]]],["admin:oauth2_provider_idtoken_change",[["admin/oauth2_provider/idtoken/%(object_id)s/change/",["object_id"]]]],["admin:oauth2_provider_idtoken_changelist",[["admin/oauth2_provider/idtoken/",[]]]],["admin:oauth2_provider_idtoken_delete",[["admin/oauth2_provider/idtoken/%(object_id)s/delete/",["object_id"]]]],["admin:oauth2_provider_idtoken_history",[["admin/oauth2_provider/idtoken/%(object_id)s/history/",["object_id"]]]],["admin:oauth2_provider_refreshtoken_add",[["admin/oauth2_provider/refreshtoken/add/",[]]]],["admin:oauth2_provider_refreshtoken_change",[["admin/oauth2_provider/refreshtoken/%(object_id)s/change/",["object_id"]]]],["admin:oauth2_provider_refreshtoken_changelist",[["admin/oauth2_provider/refreshtoken/",[]]]],["admin:oauth2_provider_refreshtoken_delete",[["admin/oauth2_provider/refreshtoken/%(object_id)s/delete/",["object_id"]]]],["admin:oauth2_provider_refreshtoken_history",[["admin/oauth2_provider/refreshtoken/%(object_id)s/history/",["object_id"]]]],["admin:password_change",[["admin/password_change/",[]]]],["admin:password_change_done",[["admin/password_change/done/",[]]]],["admin:sites_site_add",[["admin/sites/site/add/",[]]]],["admin:sites_site_change",[["admin/sites/site/%(object_id)s/change/",["object_id"]]]],["admin:sites_site_changelist",[["admin/sites/site/",[]]]],["admin:sites_site_delete",[["admin/sites/site/%(object_id)s/delete/",["object_id"]]]],["admin:sites_site_history",[["admin/sites/site/%(object_id)s/history/",["object_id"]]]],["admin:socialaccount_socialaccount_add",[["admin/socialaccount/socialaccount/add/",[]]]],["admin:socialaccount_socialaccount_change",[["admin/socialaccount/socialaccount/%(object_id)s/change/",["object_id"]]]],["admin:socialaccount_socialaccount_changelist",[["admin/socialaccount/socialaccount/",[]]]],["admin:socialaccount_socialaccount_delete",[["admin/socialaccount/socialaccount/%(object_id)s/delete/",["object_id"]]]],["admin:socialaccount_socialaccount_history",[["admin/socialaccount/socialaccount/%(object_id)s/history/",["object_id"]]]],["admin:socialaccount_socialapp_add",[["admin/socialaccount/socialapp/add/",[]]]],["admin:socialaccount_socialapp_change",[["admin/socialaccount/socialapp/%(object_id)s/change/",["object_id"]]]],["admin:socialaccount_socialapp_changelist",[["admin/socialaccount/socialapp/",[]]]],["admin:socialaccount_socialapp_delete",[["admin/socialaccount/socialapp/%(object_id)s/delete/",["object_id"]]]],["admin:socialaccount_socialapp_history",[["admin/socialaccount/socialapp/%(object_id)s/history/",["object_id"]]]],["admin:socialaccount_socialtoken_add",[["admin/socialaccount/socialtoken/add/",[]]]],["admin:socialaccount_socialtoken_change",[["admin/socialaccount/socialtoken/%(object_id)s/change/",["object_id"]]]],["admin:socialaccount_socialtoken_changelist",[["admin/socialaccount/socialtoken/",[]]]],["admin:socialaccount_socialtoken_delete",[["admin/socialaccount/socialtoken/%(object_id)s/delete/",["object_id"]]]],["admin:socialaccount_socialtoken_history",[["admin/socialaccount/socialtoken/%(object_id)s/history/",["object_id"]]]],["admin:view_on_site",[["admin/r/%(content_type_id)s/%(object_id)s/",["content_type_id","object_id"]]]],["api:accesstoken-detail",[["api/access-token/%(pk)s.%(format)s",["pk","format"]],["api/access-token/%(pk)s/",["pk"]]]],["api:accesstoken-list",[["api/access-token.%(format)s",["format"]],["api/access-token/",[]]]],["api:api-root",[["api/.%(format)s",["format"]],["api/",[]]]],["api:automation-detail",[["api/automation/%(pk)s.%(format)s",["pk","format"]],["api/automation/%(pk)s/",["pk"]]]],["api:automation-list",[["api/automation.%(format)s",["format"]],["api/automation/",[]]]],["api:bookmarkletimport-detail",[["api/bookmarklet-import/%(pk)s.%(format)s",["pk","format"]],["api/bookmarklet-import/%(pk)s/",["pk"]]]],["api:bookmarkletimport-list",[["api/bookmarklet-import.%(format)s",["format"]],["api/bookmarklet-import/",[]]]],["api:cooklog-detail",[["api/cook-log/%(pk)s.%(format)s",["pk","format"]],["api/cook-log/%(pk)s/",["pk"]]]],["api:cooklog-list",[["api/cook-log.%(format)s",["format"]],["api/cook-log/",[]]]],["api:customfilter-detail",[["api/custom-filter/%(pk)s.%(format)s",["pk","format"]],["api/custom-filter/%(pk)s/",["pk"]]]],["api:customfilter-list",[["api/custom-filter.%(format)s",["format"]],["api/custom-filter/",[]]]],["api:exportlog-detail",[["api/export-log/%(pk)s.%(format)s",["pk","format"]],["api/export-log/%(pk)s/",["pk"]]]],["api:exportlog-list",[["api/export-log.%(format)s",["format"]],["api/export-log/",[]]]],["api:food-detail",[["api/food/%(pk)s.%(format)s",["pk","format"]],["api/food/%(pk)s/",["pk"]]]],["api:food-list",[["api/food.%(format)s",["format"]],["api/food/",[]]]],["api:food-merge",[["api/food/%(pk)s/merge/%(target)s.%(format)s",["pk","target","format"]],["api/food/%(pk)s/merge/%(target)s/",["pk","target"]]]],["api:food-move",[["api/food/%(pk)s/move/%(parent)s.%(format)s",["pk","parent","format"]],["api/food/%(pk)s/move/%(parent)s/",["pk","parent"]]]],["api:food-shopping",[["api/food/%(pk)s/shopping.%(format)s",["pk","format"]],["api/food/%(pk)s/shopping/",["pk"]]]],["api:foodinheritfield-detail",[["api/food-inherit-field/%(pk)s.%(format)s",["pk","format"]],["api/food-inherit-field/%(pk)s/",["pk"]]]],["api:foodinheritfield-list",[["api/food-inherit-field.%(format)s",["format"]],["api/food-inherit-field/",[]]]],["api:group-detail",[["api/group/%(pk)s.%(format)s",["pk","format"]],["api/group/%(pk)s/",["pk"]]]],["api:group-list",[["api/group.%(format)s",["format"]],["api/group/",[]]]],["api:importlog-detail",[["api/import-log/%(pk)s.%(format)s",["pk","format"]],["api/import-log/%(pk)s/",["pk"]]]],["api:importlog-list",[["api/import-log.%(format)s",["format"]],["api/import-log/",[]]]],["api:ingredient-detail",[["api/ingredient/%(pk)s.%(format)s",["pk","format"]],["api/ingredient/%(pk)s/",["pk"]]]],["api:ingredient-list",[["api/ingredient.%(format)s",["format"]],["api/ingredient/",[]]]],["api:invitelink-detail",[["api/invite-link/%(pk)s.%(format)s",["pk","format"]],["api/invite-link/%(pk)s/",["pk"]]]],["api:invitelink-list",[["api/invite-link.%(format)s",["format"]],["api/invite-link/",[]]]],["api:keyword-detail",[["api/keyword/%(pk)s.%(format)s",["pk","format"]],["api/keyword/%(pk)s/",["pk"]]]],["api:keyword-list",[["api/keyword.%(format)s",["format"]],["api/keyword/",[]]]],["api:keyword-merge",[["api/keyword/%(pk)s/merge/%(target)s.%(format)s",["pk","target","format"]],["api/keyword/%(pk)s/merge/%(target)s/",["pk","target"]]]],["api:keyword-move",[["api/keyword/%(pk)s/move/%(parent)s.%(format)s",["pk","parent","format"]],["api/keyword/%(pk)s/move/%(parent)s/",["pk","parent"]]]],["api:mealplan-detail",[["api/meal-plan/%(pk)s.%(format)s",["pk","format"]],["api/meal-plan/%(pk)s/",["pk"]]]],["api:mealplan-list",[["api/meal-plan.%(format)s",["format"]],["api/meal-plan/",[]]]],["api:mealtype-detail",[["api/meal-type/%(pk)s.%(format)s",["pk","format"]],["api/meal-type/%(pk)s/",["pk"]]]],["api:mealtype-list",[["api/meal-type.%(format)s",["format"]],["api/meal-type/",[]]]],["api:recipe-detail",[["api/recipe/%(pk)s.%(format)s",["pk","format"]],["api/recipe/%(pk)s/",["pk"]]]],["api:recipe-image",[["api/recipe/%(pk)s/image.%(format)s",["pk","format"]],["api/recipe/%(pk)s/image/",["pk"]]]],["api:recipe-list",[["api/recipe.%(format)s",["format"]],["api/recipe/",[]]]],["api:recipe-related",[["api/recipe/%(pk)s/related.%(format)s",["pk","format"]],["api/recipe/%(pk)s/related/",["pk"]]]],["api:recipe-shopping",[["api/recipe/%(pk)s/shopping.%(format)s",["pk","format"]],["api/recipe/%(pk)s/shopping/",["pk"]]]],["api:recipebook-detail",[["api/recipe-book/%(pk)s.%(format)s",["pk","format"]],["api/recipe-book/%(pk)s/",["pk"]]]],["api:recipebook-list",[["api/recipe-book.%(format)s",["format"]],["api/recipe-book/",[]]]],["api:recipebookentry-detail",[["api/recipe-book-entry/%(pk)s.%(format)s",["pk","format"]],["api/recipe-book-entry/%(pk)s/",["pk"]]]],["api:recipebookentry-list",[["api/recipe-book-entry.%(format)s",["format"]],["api/recipe-book-entry/",[]]]],["api:shoppinglist-detail",[["api/shopping-list/%(pk)s.%(format)s",["pk","format"]],["api/shopping-list/%(pk)s/",["pk"]]]],["api:shoppinglist-list",[["api/shopping-list.%(format)s",["format"]],["api/shopping-list/",[]]]],["api:shoppinglistentry-detail",[["api/shopping-list-entry/%(pk)s.%(format)s",["pk","format"]],["api/shopping-list-entry/%(pk)s/",["pk"]]]],["api:shoppinglistentry-list",[["api/shopping-list-entry.%(format)s",["format"]],["api/shopping-list-entry/",[]]]],["api:shoppinglistrecipe-detail",[["api/shopping-list-recipe/%(pk)s.%(format)s",["pk","format"]],["api/shopping-list-recipe/%(pk)s/",["pk"]]]],["api:shoppinglistrecipe-list",[["api/shopping-list-recipe.%(format)s",["format"]],["api/shopping-list-recipe/",[]]]],["api:space-detail",[["api/space/%(pk)s.%(format)s",["pk","format"]],["api/space/%(pk)s/",["pk"]]]],["api:space-list",[["api/space.%(format)s",["format"]],["api/space/",[]]]],["api:step-detail",[["api/step/%(pk)s.%(format)s",["pk","format"]],["api/step/%(pk)s/",["pk"]]]],["api:step-list",[["api/step.%(format)s",["format"]],["api/step/",[]]]],["api:storage-detail",[["api/storage/%(pk)s.%(format)s",["pk","format"]],["api/storage/%(pk)s/",["pk"]]]],["api:storage-list",[["api/storage.%(format)s",["format"]],["api/storage/",[]]]],["api:supermarket-detail",[["api/supermarket/%(pk)s.%(format)s",["pk","format"]],["api/supermarket/%(pk)s/",["pk"]]]],["api:supermarket-list",[["api/supermarket.%(format)s",["format"]],["api/supermarket/",[]]]],["api:supermarketcategory-detail",[["api/supermarket-category/%(pk)s.%(format)s",["pk","format"]],["api/supermarket-category/%(pk)s/",["pk"]]]],["api:supermarketcategory-list",[["api/supermarket-category.%(format)s",["format"]],["api/supermarket-category/",[]]]],["api:supermarketcategoryrelation-detail",[["api/supermarket-category-relation/%(pk)s.%(format)s",["pk","format"]],["api/supermarket-category-relation/%(pk)s/",["pk"]]]],["api:supermarketcategoryrelation-list",[["api/supermarket-category-relation.%(format)s",["format"]],["api/supermarket-category-relation/",[]]]],["api:sync-detail",[["api/sync/%(pk)s.%(format)s",["pk","format"]],["api/sync/%(pk)s/",["pk"]]]],["api:sync-list",[["api/sync.%(format)s",["format"]],["api/sync/",[]]]],["api:synclog-detail",[["api/sync-log/%(pk)s.%(format)s",["pk","format"]],["api/sync-log/%(pk)s/",["pk"]]]],["api:synclog-list",[["api/sync-log.%(format)s",["format"]],["api/sync-log/",[]]]],["api:unit-detail",[["api/unit/%(pk)s.%(format)s",["pk","format"]],["api/unit/%(pk)s/",["pk"]]]],["api:unit-list",[["api/unit.%(format)s",["format"]],["api/unit/",[]]]],["api:unit-merge",[["api/unit/%(pk)s/merge/%(target)s.%(format)s",["pk","target","format"]],["api/unit/%(pk)s/merge/%(target)s/",["pk","target"]]]],["api:user-detail",[["api/user/%(pk)s.%(format)s",["pk","format"]],["api/user/%(pk)s/",["pk"]]]],["api:user-list",[["api/user.%(format)s",["format"]],["api/user/",[]]]],["api:userfile-detail",[["api/user-file/%(pk)s.%(format)s",["pk","format"]],["api/user-file/%(pk)s/",["pk"]]]],["api:userfile-list",[["api/user-file.%(format)s",["format"]],["api/user-file/",[]]]],["api:userpreference-detail",[["api/user-preference/%(pk)s.%(format)s",["pk","format"]],["api/user-preference/%(pk)s/",["pk"]]]],["api:userpreference-list",[["api/user-preference.%(format)s",["format"]],["api/user-preference/",[]]]],["api:userspace-detail",[["api/user-space/%(pk)s.%(format)s",["pk","format"]],["api/user-space/%(pk)s/",["pk"]]]],["api:userspace-list",[["api/user-space.%(format)s",["format"]],["api/user-space/",[]]]],["api:viewlog-detail",[["api/view-log/%(pk)s.%(format)s",["pk","format"]],["api/view-log/%(pk)s/",["pk"]]]],["api:viewlog-list",[["api/view-log.%(format)s",["format"]],["api/view-log/",[]]]],["api_backup",[["api/backup/",[]]]],["api_download_file",[["api/download-file/%(file_id)s/",["file_id"]]]],["api_get_external_file_link",[["api/get_external_file_link/%(recipe_id)s/",["recipe_id"]]]],["api_get_facets",[["api/get_facets/",[]]]],["api_get_plan_ical",[["api/plan-ical/%(from_date)s/%(to_date)s/",["from_date","to_date"]]]],["api_get_recipe_file",[["api/get_recipe_file/%(recipe_id)s/",["recipe_id"]]]],["api_ingredient_from_string",[["api/ingredient-from-string/",[]]]],["api_log_cooking",[["api/log_cooking/%(recipe_id)s/",["recipe_id"]]]],["api_recipe_from_source",[["api/recipe-from-source/",[]]]],["api_reset_food_inheritance",[["api/reset-food-inheritance/",[]]]],["api_share_link",[["api/share-link/%(pk)s",["pk"]]]],["api_switch_active_space",[["api/switch-active-space/%(space_id)s/",["space_id"]]]],["api_sync",[["api/sync_all/",[]]]],["dal_food",[["dal/food/",[]]]],["dal_keyword",[["dal/keyword/",[]]]],["dal_unit",[["dal/unit/",[]]]],["data_batch_edit",[["data/batch/edit",[]]]],["data_batch_import",[["data/batch/import",[]]]],["data_import_url",[["data/import/url",[]]]],["data_sync",[["data/sync",[]]]],["data_sync_wait",[["data/sync/wait",[]]]],["delete_comment",[["delete/comment/%(pk)s/",["pk"]]]],["delete_invite_link",[["delete/invite-link/%(pk)s/",["pk"]]]],["delete_meal_plan",[["delete/meal-plan/%(pk)s/",["pk"]]]],["delete_recipe",[["delete/recipe/%(pk)s/",["pk"]]]],["delete_recipe_book",[["delete/recipe-book/%(pk)s/",["pk"]]]],["delete_recipe_book_entry",[["delete/recipe-book-entry/%(pk)s/",["pk"]]]],["delete_recipe_import",[["delete/recipe-import/%(pk)s/",["pk"]]]],["delete_recipe_source",[["delete/recipe-source/%(pk)s/",["pk"]]]],["delete_space",[["delete/space/%(pk)s/",["pk"]]]],["delete_storage",[["delete/storage/%(pk)s/",["pk"]]]],["delete_sync",[["delete/sync/%(pk)s/",["pk"]]]],["delete_user_space",[["delete/user-space/%(pk)s/",["pk"]]]],["docs_api",[["docs/api/",[]]]],["docs_markdown",[["docs/markdown/",[]]]],["docs_search",[["docs/search/",[]]]],["edit_comment",[["edit/comment/%(pk)s/",["pk"]]]],["edit_convert_recipe",[["edit/recipe/convert/%(pk)s/",["pk"]]]],["edit_external_recipe",[["edit/recipe/external/%(pk)s/",["pk"]]]],["edit_internal_recipe",[["edit/recipe/internal/%(pk)s/",["pk"]]]],["edit_meal_plan",[["edit/meal-plan/%(pk)s/",["pk"]]]],["edit_recipe",[["edit/recipe/%(pk)s/",["pk"]]]],["edit_storage",[["edit/storage/%(pk)s/",["pk"]]]],["edit_sync",[["edit/sync/%(pk)s/",["pk"]]]],["index",[["",[]]]],["javascript-catalog",[["jsi18n/",[]]]],["js_reverse",[["jsreverse.json",[]]]],["list_automation",[["list/automation/",[]]]],["list_custom_filter",[["list/custom-filter/",[]]]],["list_food",[["list/food/",[]]]],["list_invite_link",[["list/invite-link/",[]]]],["list_keyword",[["list/keyword/",[]]]],["list_recipe_import",[["list/recipe-import/",[]]]],["list_shopping_list",[["list/shopping-list/",[]]]],["list_step",[["list/step/",[]]]],["list_storage",[["list/storage/",[]]]],["list_supermarket",[["list/supermarket/",[]]]],["list_supermarket_category",[["list/supermarket-category/",[]]]],["list_sync_log",[["list/sync-log/",[]]]],["list_unit",[["list/unit/",[]]]],["list_user_file",[["list/user-file/",[]]]],["new_meal_plan",[["new/meal-plan/",[]]]],["new_recipe",[["new/recipe/",[]]]],["new_recipe_import",[["new/recipe-import/%(import_id)s/",["import_id"]]]],["new_share_link",[["new/share-link/%(pk)s/",["pk"]]]],["new_storage",[["new/storage/",[]]]],["openapi-schema",[["openapi/",[]]]],["rest_framework:login",[["api-auth/login/",[]]]],["rest_framework:logout",[["api-auth/logout/",[]]]],["service_worker",[["service-worker.js",[]]]],["set_language",[["i18n/setlang/",[]]]],["socialaccount_connections",[["accounts/social/connections/",[]]]],["socialaccount_login_cancelled",[["accounts/social/login/cancelled/",[]]]],["socialaccount_login_error",[["accounts/social/login/error/",[]]]],["socialaccount_signup",[["accounts/social/signup/",[]]]],["telegram_hook",[["telegram/hook/%(token)s/",["token"]]]],["telegram_remove",[["telegram/remove/%(pk)s",["pk"]]]],["telegram_setup",[["telegram/setup/%(pk)s",["pk"]]]],["view_books",[["books/",[]]]],["view_export",[["export/",[]]]],["view_export_file",[["export-file/%(pk)s/",["pk"]]]],["view_export_response",[["export-response/%(pk)s/",["pk"]]]],["view_history",[["history/",[]]]],["view_import",[["api/import/",[]]]],["view_import_response",[["import-response/%(pk)s/",["pk"]]]],["view_ingredient_editor",[["ingredient-editor/",[]]]],["view_invite",[["invite/%(token)s",["token"]]]],["view_no_group",[["no-group",[]]]],["view_no_perm",[["no-perm",[]]]],["view_offline",[["offline/",[]]]],["view_plan",[["plan/",[]]]],["view_profile",[["profile/%(user_id)s",["user_id"]]]],["view_recipe",[["view/recipe/%(pk)s/%(share)s",["pk","share"]],["view/recipe/%(pk)s",["pk"]]]],["view_report_share_abuse",[["abuse/%(token)s",["token"]]]],["view_search",[["search/",[]]]],["view_settings",[["settings/",[]]]],["view_setup",[["setup/",[]]]],["view_shopping",[["shopping/",[]]]],["view_shopping_settings",[["settings-shopping/",[]]]],["view_space_manage",[["space-manage/%(space_id)s",["space_id"]]]],["view_space_overview",[["space-overview",[]]]],["view_supermarket",[["supermarket/",[]]]],["view_switch_space",[["switch-space/%(space_id)s",["space_id"]]]],["view_system",[["system/",[]]]],["view_test",[["test/",[]]]],["view_test2",[["test2/",[]]]],["web_manifest",[["manifest.json",[]]]]],"prefix":"/"};function factory(d){var url_patterns=d.urls;var url_prefix=d.prefix;var Urls={};var self_url_patterns={};var _get_url=function(url_pattern){return function(){var _arguments,index,url,url_arg,url_args,_i,_len,_ref,_ref_list,match_ref,provided_keys,build_kwargs;_arguments=arguments;_ref_list=self_url_patterns[url_pattern];if(arguments.length==1&&typeof(arguments[0])=="object"){var provided_keys_list=Object.keys(arguments[0]);provided_keys={};for(_i=0;_i - - -{% endblock %} \ No newline at end of file diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index 5a7e1650a..494dea02e 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -370,17 +370,13 @@ {% trans 'Markdown Guide' %} - {% trans 'GitHub' %} - {% trans 'Translate Tandoor' %} - {% trans 'API Documentation' %} - {% trans 'API Browser' %} + {% trans 'GitHub' %} + {% trans 'Translate Tandoor' %} + {% trans 'API ReDoc Documentation' %} + {% trans 'API Swagger Documentation' %} + {% trans 'API Browser' %} - {% trans 'Log out' %} + {% trans 'Log out' %} {% else %} diff --git a/cookbook/templatetags/theming_tags.py b/cookbook/templatetags/theming_tags.py index f2984b975..af2baf65e 100644 --- a/cookbook/templatetags/theming_tags.py +++ b/cookbook/templatetags/theming_tags.py @@ -2,8 +2,8 @@ from django import template from django.templatetags.static import static from django_scopes import scopes_disabled -from cookbook.models import UserPreference, UserFile, Space -from recipes.settings import STICKY_NAV_PREF_DEFAULT, UNAUTHENTICATED_THEME_FROM_SPACE, FORCE_THEME_FROM_SPACE +from cookbook.models import UserPreference, Space +from recipes.settings import UNAUTHENTICATED_THEME_FROM_SPACE, FORCE_THEME_FROM_SPACE register = template.Library() diff --git a/cookbook/tests/views/test_views_general.py b/cookbook/tests/views/test_views_general.py index ab1be6742..c178b422f 100644 --- a/cookbook/tests/views/test_views_general.py +++ b/cookbook/tests/views/test_views_general.py @@ -119,3 +119,13 @@ def test_markdown_doc(arg, request, ext_recipe_1_s1): def test_api_info(arg, request, ext_recipe_1_s1): c = request.getfixturevalue(arg[0]) assert c.get(reverse('docs_api')).status_code == arg[1] + +@pytest.mark.parametrize("arg", [ + ['a_u', 302], + ['g1_s1', 200], + ['u1_s1', 200], + ['a1_s1', 200], +]) +def test_api_swagger(arg, request, ext_recipe_1_s1): + c = request.getfixturevalue(arg[0]) + assert c.get(reverse('docs_api')).status_code == arg[1] diff --git a/cookbook/urls.py b/cookbook/urls.py index 2068f3754..b625c6804 100644 --- a/cookbook/urls.py +++ b/cookbook/urls.py @@ -2,9 +2,8 @@ from pydoc import locate from django.urls import include, path from django.views.generic import TemplateView -from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView -from rest_framework import permissions, routers -from rest_framework.schemas import get_schema_view +from drf_spectacular.views import SpectacularAPIView +from rest_framework import routers from cookbook.version_info import TANDOOR_VERSION from recipes.settings import DEBUG, PLUGINS @@ -16,7 +15,7 @@ from .models import (Automation, Comment, CustomFilter, Food, InviteLink, Keywor from .views import api, data, delete, edit, import_export, lists, new, telegram, views from .views.api import CustomAuthToken, ImportOpenData -import datetime + # extend DRF default router class to allow including additional routers class DefaultRouter(routers.DefaultRouter): @@ -137,15 +136,15 @@ urlpatterns = [ path('telegram/hook//', telegram.hook, name='telegram_hook'), path('docs/markdown/', views.markdown_info, name='docs_markdown'), path('docs/search/', views.search_info, name='docs_search'), - path('docs/api/', SpectacularRedocView.as_view(url_name='openapi-schema'), name='docs_api'), + path('docs/api/', views.Redoc.as_view(url_name='openapi-schema'), name='docs_api'), + path('docs/swagger/', views.Swagger.as_view(url_name='openapi-schema'), name='docs_swagger'), path('openapi/', SpectacularAPIView.as_view(api_version=TANDOOR_VERSION), name='openapi-schema'), path('api/', include((router.urls, 'api'))), path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), path('api-token-auth/', CustomAuthToken.as_view()), path('api-import-open-data/', ImportOpenData.as_view(), name='api_import_open_data'), path('offline/', views.offline, name='view_offline'), - path('service-worker.js', (TemplateView.as_view(template_name="sw.js", content_type='application/javascript', - )), name='service_worker'), + path('service-worker.js', (TemplateView.as_view(template_name="sw.js", content_type='application/javascript', )), name='service_worker'), path('manifest.json', views.web_manifest, name='web_manifest'), ] diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 83c7cd278..f72c65af4 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -183,8 +183,10 @@ class FuzzyFilterMixin(viewsets.ModelViewSet, ExtendedRecipeMixin): if query is not None and query not in ["''", '']: if fuzzy and (settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql'): - if self.request.user.is_authenticated and any( - [self.model.__name__.lower() in x for x in self.request.user.searchpreference.unaccent.values_list('field', flat=True)]): + if ( + self.request.user.is_authenticated + and any([self.model.__name__.lower() in x for x in self.request.user.searchpreference.unaccent.values_list('field', flat=True)]) + ): self.queryset = self.queryset.annotate(trigram=TrigramSimilarity('name__unaccent', query)) else: self.queryset = self.queryset.annotate(trigram=TrigramSimilarity('name', query)) diff --git a/cookbook/views/views.py b/cookbook/views/views.py index 2559fa227..fbe6a0c3c 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -19,10 +19,11 @@ from django.urls import reverse, reverse_lazy from django.utils import timezone from django.utils.translation import gettext as _ from django_scopes import scopes_disabled +from drf_spectacular.views import SpectacularRedocView, SpectacularSwaggerView from cookbook.forms import CommentForm, Recipe, SearchPreferenceForm, SpaceCreateForm, SpaceJoinForm, User, UserCreateForm, UserPreference from cookbook.helper.HelperFunctions import str2bool -from cookbook.helper.permission_helper import group_required, has_group_permission, share_link_valid, switch_user_active_space +from cookbook.helper.permission_helper import CustomIsGuest, GroupRequiredMixin, group_required, has_group_permission, share_link_valid, switch_user_active_space from cookbook.models import Comment, CookLog, InviteLink, SearchFields, SearchPreference, ShareLink, Space, UserSpace, ViewLog from cookbook.tables import CookLogTable, ViewLogTable from cookbook.templatetags.theming_tags import get_theming_values @@ -38,16 +39,20 @@ def index(request): return HttpResponseRedirect(reverse_lazy('view_search')) try: - page_map = {UserPreference.SEARCH: reverse_lazy('view_search'), UserPreference.PLAN: reverse_lazy('view_plan'), UserPreference.BOOKS: reverse_lazy('view_books'), UserPreference.SHOPPING: reverse_lazy('view_shopping'),} + page_map = { + UserPreference.SEARCH: reverse_lazy('view_search'), + UserPreference.PLAN: reverse_lazy('view_plan'), + UserPreference.BOOKS: reverse_lazy('view_books'), + UserPreference.SHOPPING: reverse_lazy('view_shopping'), + } return HttpResponseRedirect(page_map.get(request.user.userpreference.default_page)) except UserPreference.DoesNotExist: return HttpResponseRedirect(reverse('view_search')) -# TODO need to deprecate def search(request): - if has_group_permission(request.user, ('guest',)): + if has_group_permission(request.user, ('guest', )): return render(request, 'search.html', {}) else: if request.user.is_authenticated: @@ -127,7 +132,7 @@ def recipe_view(request, pk, share=None): messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!')) return HttpResponseRedirect(reverse('account_login') + '?next=' + request.path) - if not (has_group_permission(request.user, ('guest',)) and recipe.space == request.space) and not share_link_valid(recipe, share): + if not (has_group_permission(request.user, ('guest', )) and recipe.space == request.space) and not share_link_valid(recipe, share): messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!')) return HttpResponseRedirect(reverse('index')) @@ -160,7 +165,6 @@ def recipe_view(request, pk, share=None): return render(request, 'recipe_view.html', {'recipe': recipe, 'comments': comments, 'comment_form': comment_form, 'share': share, 'servings': servings}) - @group_required('user') def books(request): return render(request, 'books.html', {}) @@ -346,8 +350,17 @@ def system(request): return render( request, 'system.html', { - 'gunicorn_media': settings.GUNICORN_MEDIA, 'debug': settings.DEBUG, 'postgres': postgres, 'postgres_version': postgres_ver, 'postgres_status': database_status, - 'postgres_message': database_message, 'version_info': VERSION_INFO, 'plugins': PLUGINS, 'secret_key': secret_key, 'orphans': orphans, 'migration_info': migration_info, + 'gunicorn_media': settings.GUNICORN_MEDIA, + 'debug': settings.DEBUG, + 'postgres': postgres, + 'postgres_version': postgres_ver, + 'postgres_status': database_status, + 'postgres_message': database_message, + 'version_info': VERSION_INFO, + 'plugins': PLUGINS, + 'secret_key': secret_key, + 'orphans': orphans, + 'migration_info': migration_info, 'missing_migration': missing_migration, }) @@ -358,8 +371,7 @@ def setup(request): messages.add_message( request, messages.ERROR, _('The setup page can only be used to create the first user! \ - If you have forgotten your superuser credentials please consult the django documentation on how to reset passwords.' - )) + If you have forgotten your superuser credentials please consult the django documentation on how to reset passwords.')) return HttpResponseRedirect(reverse('account_login')) if request.method == 'POST': @@ -441,24 +453,63 @@ def report_share_abuse(request, token): def web_manifest(request): theme_values = get_theming_values(request) - icons = [{"src": theme_values['logo_color_svg'], "sizes": "any"}, {"src": theme_values['logo_color_144'], "type": "image/png", "sizes": "144x144"}, - {"src": theme_values['logo_color_512'], "type": "image/png", "sizes": "512x512"}] + icons = [{ + "src": theme_values['logo_color_svg'], + "sizes": "any" + }, { + "src": theme_values['logo_color_144'], + "type": "image/png", + "sizes": "144x144" + }, { + "src": theme_values['logo_color_512'], + "type": "image/png", + "sizes": "512x512" + }] manifest_info = { "name": - theme_values['app_name'], "short_name": - theme_values['app_name'], "description": - _("Manage recipes, shopping list, meal plans and more."), "icons": - icons, "start_url": - "./", "background_color": - theme_values['nav_bg_color'], "display": - "standalone", "scope": - ".", "theme_color": - theme_values['nav_bg_color'], "shortcuts": - [{"name": _("Plan"), "short_name": _("Plan"), "description": _("View your meal Plan"), "url": - "./plan"}, {"name": _("Books"), "short_name": _("Books"), "description": _("View your cookbooks"), "url": "./books"}, - {"name": _("Shopping"), "short_name": _("Shopping"), "description": _("View your shopping lists"), "url": - "./shopping/"}], "share_target": {"action": "/data/import/url", "method": "GET", "params": {"title": "title", "url": "url", "text": "text"}} + theme_values['app_name'], + "short_name": + theme_values['app_name'], + "description": + _("Manage recipes, shopping list, meal plans and more."), + "icons": + icons, + "start_url": + "./", + "background_color": + theme_values['nav_bg_color'], + "display": + "standalone", + "scope": + ".", + "theme_color": + theme_values['nav_bg_color'], + "shortcuts": [{ + "name": _("Plan"), + "short_name": _("Plan"), + "description": _("View your meal Plan"), + "url": "./plan" + }, { + "name": _("Books"), + "short_name": _("Books"), + "description": _("View your cookbooks"), + "url": "./books" + }, { + "name": _("Shopping"), + "short_name": _("Shopping"), + "description": _("View your shopping lists"), + "url": "./shopping/" + }], + "share_target": { + "action": "/data/import/url", + "method": "GET", + "params": { + "title": "title", + "url": "url", + "text": "text" + } + } } return JsonResponse(manifest_info, json_dumps_params={'indent': 4}) @@ -472,9 +523,14 @@ def search_info(request): return render(request, 'search_info.html', {}) -@group_required('guest') -def api_info(request): - return render(request, 'api_info.html', {}) +class Redoc(GroupRequiredMixin, SpectacularRedocView): + permission_classes = [CustomIsGuest] + groups_required = ['guest'] + + +class Swagger(GroupRequiredMixin, SpectacularSwaggerView): + permission_classes = [CustomIsGuest] + groups_required = ['guest'] def offline(request): diff --git a/recipes/settings.py b/recipes/settings.py index 198f891dc..4b7f9cb07 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -14,9 +14,9 @@ import json import mimetypes import os import re +import socket import sys import traceback -import socket from django.contrib import messages from django.utils.translation import gettext_lazy as _ @@ -24,6 +24,13 @@ from dotenv import load_dotenv load_dotenv() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +SCRIPT_NAME = os.getenv('SCRIPT_NAME', '') +# path for django_js_reverse to generate the javascript file containing all urls. Only done because the default command (collectstatic_js_reverse) fails to update the manifest +JS_REVERSE_OUTPUT_PATH = os.path.join(BASE_DIR, "cookbook/static/django_js_reverse") +JS_REVERSE_SCRIPT_PREFIX = os.getenv('JS_REVERSE_SCRIPT_PREFIX', SCRIPT_NAME) + +STATIC_URL = os.getenv('STATIC_URL', '/static/') +STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles") # Get vars from .env files SECRET_KEY = os.getenv('SECRET_KEY') if os.getenv('SECRET_KEY') else 'INSECURE_STANDARD_KEY_SET_IN_ENV' @@ -105,34 +112,10 @@ MESSAGE_TAGS = {messages.ERROR: 'danger'} # Application definition INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.sites', - 'django.contrib.staticfiles', - 'django.contrib.postgres', - 'oauth2_provider', - 'django_prometheus', - 'django_tables2', - 'corsheaders', - 'crispy_forms', - 'crispy_bootstrap4', - 'rest_framework', - 'rest_framework.authtoken', - 'drf_spectacular', - 'drf_spectacular_sidecar', - 'django_cleanup.apps.CleanupConfig', - 'webpack_loader', - 'django_vite', - 'django_js_reverse', - 'hcaptcha', - 'allauth', - 'allauth.account', - 'allauth.socialaccount', - 'cookbook.apps.CookbookConfig', - 'treebeard', + 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.sites', + 'django.contrib.staticfiles', 'django.contrib.postgres', 'oauth2_provider', 'django_prometheus', 'django_tables2', 'corsheaders', 'crispy_forms', 'crispy_bootstrap4', + 'rest_framework', 'rest_framework.authtoken', 'drf_spectacular', 'drf_spectacular_sidecar', 'django_cleanup.apps.CleanupConfig', 'webpack_loader', 'django_vite', + 'django_js_reverse', 'hcaptcha', 'allauth', 'allauth.account', 'allauth.socialaccount', 'cookbook.apps.CookbookConfig', 'treebeard', ] PLUGINS_DIRECTORY = os.path.join(BASE_DIR, 'recipes', 'plugins') @@ -209,14 +192,14 @@ MIDDLEWARE = [ ] if DEBUG_TOOLBAR: - MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',) - INSTALLED_APPS += ('debug_toolbar',) + MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) + INSTALLED_APPS += ('debug_toolbar', ) SORT_TREE_BY_NAME = bool(int(os.getenv('SORT_TREE_BY_NAME', False))) DISABLE_TREE_FIX_STARTUP = bool(int(os.getenv('DISABLE_TREE_FIX_STARTUP', False))) if bool(int(os.getenv('SQL_DEBUG', False))): - MIDDLEWARE += ('recipes.middleware.SqlPrintingMiddleware',) + MIDDLEWARE += ('recipes.middleware.SqlPrintingMiddleware', ) if ENABLE_METRICS: MIDDLEWARE += 'django_prometheus.middleware.PrometheusAfterMiddleware', @@ -295,11 +278,13 @@ WRITE_SCOPE = 'write' REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': - ('rest_framework.authentication.SessionAuthentication', 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', 'rest_framework.authentication.BasicAuthentication', - ), + ('rest_framework.authentication.SessionAuthentication', 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', 'rest_framework.authentication.BasicAuthentication', + ), 'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.IsAuthenticated', ], - 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', - 'COERCE_DECIMAL_TO_STRING': False, + 'DEFAULT_SCHEMA_CLASS': + 'drf_spectacular.openapi.AutoSchema', + 'COERCE_DECIMAL_TO_STRING': + False, } SPECTACULAR_SETTINGS = { @@ -307,6 +292,38 @@ SPECTACULAR_SETTINGS = { 'DESCRIPTION': 'Tandoor API Docs', 'SERVE_INCLUDE_SCHEMA': False, 'ENUM_ADD_EXPLICIT_BLANK_NULL_CHOICE': False, + "AUTHENTICATION_WHITELIST": [], + "APPEND_COMPONENTS": { + "securitySchemes": { + "ApiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + } + } + }, + "SECURITY": [{ + "ApiKeyAuth": [] + }], + 'SWAGGER_UI_DIST': 'SIDECAR', + 'SWAGGER_UI_FAVICON_HREF': 'SIDECAR', + 'REDOC_DIST': 'SIDECAR', + 'EXTENSIONS_INFO': { + "x-logo": { + "url": f"{STATIC_URL}assets/brand_logo.svg", + "backgroundColor": "#FFFFFF", + "altText": "Tandoor logo", + 'href': '/' + } + }, + 'CAMELIZE_NAMES': True, + "SWAGGER_UI_SETTINGS": { + "deepLinking": True, + "persistAuthorization": True, + "hideDownloadButton": False, + 'schemaExpansionLevel': 'all', + 'showExtensions': True + }, } ROOT_URLCONF = 'recipes.urls' @@ -419,14 +436,7 @@ for p in PLUGINS: 'IGNORE': [r'.+\.hot-update.js', r'.+\.map'], } -DJANGO_VITE = { - "default": { - "dev_mode": False, - "static_url_prefix": 'vue3', - "dev_server_port": 5173, - "dev_server_host": os.getenv('DJANGO_VITE_DEV_SERVER_HOST', 'localhost'), - }, -} +DJANGO_VITE = {"default": {"dev_mode": False, "static_url_prefix": 'vue3', "dev_server_port": 5173, "dev_server_host": os.getenv('DJANGO_VITE_DEV_SERVER_HOST', 'localhost'), }, } with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.settimeout(0.001) @@ -462,14 +472,6 @@ LANGUAGES = [('hy', _('Armenian ')), ('bg', _('Bulgarian')), ('ca', _('Catalan') # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ -SCRIPT_NAME = os.getenv('SCRIPT_NAME', '') -# path for django_js_reverse to generate the javascript file containing all urls. Only done because the default command (collectstatic_js_reverse) fails to update the manifest -JS_REVERSE_OUTPUT_PATH = os.path.join(BASE_DIR, "cookbook/static/django_js_reverse") -JS_REVERSE_SCRIPT_PREFIX = os.getenv('JS_REVERSE_SCRIPT_PREFIX', SCRIPT_NAME) - -STATIC_URL = os.getenv('STATIC_URL', '/static/') -STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles") - AWS_ENABLED = True if os.getenv('S3_ACCESS_KEY', False) else False if os.getenv('S3_ACCESS_KEY', ''): @@ -529,18 +531,9 @@ DISABLE_EXTERNAL_CONNECTORS = bool(int(os.getenv('DISABLE_EXTERNAL_CONNECTORS', EXTERNAL_CONNECTORS_QUEUE_SIZE = int(os.getenv('EXTERNAL_CONNECTORS_QUEUE_SIZE', 100)) # ACCOUNT_SIGNUP_FORM_CLASS = 'cookbook.forms.AllAuthSignupForm' -ACCOUNT_FORMS = { - 'signup': 'cookbook.forms.AllAuthSignupForm', - 'reset_password': 'cookbook.forms.CustomPasswordResetForm' -} +ACCOUNT_FORMS = {'signup': 'cookbook.forms.AllAuthSignupForm', 'reset_password': 'cookbook.forms.CustomPasswordResetForm'} ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS = False -ACCOUNT_RATE_LIMITS = { - "change_password": "1/m/user", - "reset_password": "1/m/ip,1/m/key", - "reset_password_from_key": "1/m/ip", - "signup": "5/m/ip", - "login": "5/m/ip", -} +ACCOUNT_RATE_LIMITS = {"change_password": "1/m/user", "reset_password": "1/m/ip,1/m/key", "reset_password_from_key": "1/m/ip", "signup": "5/m/ip", "login": "5/m/ip", } mimetypes.add_type("text/javascript", ".js", True) diff --git a/vue3/src/openapi/apis/ApiApi.ts b/vue3/src/openapi/apis/ApiApi.ts index 0eba4b211..485258aff 100644 --- a/vue3/src/openapi/apis/ApiApi.ts +++ b/vue3/src/openapi/apis/ApiApi.ts @@ -493,9 +493,9 @@ export interface ApiFoodDestroyRequest { id: number; } -export interface ApiFoodFdcUpdateRequest { +export interface ApiFoodFdcCreateRequest { id: number; - foodShoppingUpdate: FoodShoppingUpdate; + food: Food; } export interface ApiFoodInheritFieldRetrieveRequest { @@ -508,6 +508,8 @@ export interface ApiFoodListRequest { pageSize?: number; query?: string; random?: string; + root?: number; + tree?: number; updatedAt?: string; } @@ -576,6 +578,11 @@ export interface ApiFoodRetrieveRequest { id: number; } +export interface ApiFoodShoppingUpdateRequest { + id: number; + foodShoppingUpdate: FoodShoppingUpdate; +} + export interface ApiFoodUpdateRequest { id: number; food: Food; @@ -682,6 +689,8 @@ export interface ApiKeywordListRequest { pageSize?: number; query?: string; random?: string; + root?: number; + tree?: number; updatedAt?: string; } @@ -1018,6 +1027,13 @@ export interface ApiSupermarketCategoryDestroyRequest { id: number; } +export interface ApiSupermarketCategoryListRequest { + limit?: string; + query?: string; + random?: string; + updatedAt?: string; +} + export interface ApiSupermarketCategoryMergeUpdateRequest { id: number; target: string; @@ -1324,9 +1340,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/access-token/`, method: 'POST', @@ -1359,9 +1376,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1385,9 +1403,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/access-token/`, method: 'GET', @@ -1421,9 +1440,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -1456,9 +1476,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1499,9 +1520,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -1527,9 +1549,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/auto-plan/`, method: 'POST', @@ -1563,9 +1586,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/automation/`, method: 'POST', @@ -1600,9 +1624,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1640,9 +1665,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/automation/`, method: 'GET', @@ -1678,9 +1704,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -1715,9 +1742,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1760,9 +1788,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -1798,9 +1827,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/bookmarklet-import/`, method: 'POST', @@ -1833,9 +1863,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1859,9 +1890,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/bookmarklet-import/`, method: 'GET', @@ -1895,9 +1927,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -1930,9 +1963,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1973,9 +2007,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -2010,9 +2045,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/connector-config/`, method: 'POST', @@ -2045,9 +2081,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -2071,9 +2108,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/connector-config/`, method: 'GET', @@ -2107,9 +2145,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -2142,9 +2181,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2185,9 +2225,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -2222,9 +2263,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/cook-log/`, method: 'POST', @@ -2257,9 +2299,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -2295,9 +2338,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/cook-log/`, method: 'GET', @@ -2331,9 +2375,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -2366,9 +2411,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2409,9 +2455,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -2446,9 +2493,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/custom-filter/`, method: 'POST', @@ -2481,9 +2529,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -2531,9 +2580,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/custom-filter/`, method: 'GET', @@ -2567,9 +2617,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -2602,9 +2653,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2645,9 +2697,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -2681,11 +2734,12 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ - path: `/api/download-file/{file_id}/`.replace(`{${"file_id"}}`, encodeURIComponent(String(requestParameters['fileId']))), + path: `/api/download-file/{fileId}/`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -2717,9 +2771,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/export-log/`, method: 'POST', @@ -2752,9 +2807,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -2786,9 +2842,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/export-log/`, method: 'GET', @@ -2822,9 +2879,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -2857,9 +2915,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2900,9 +2959,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -2937,9 +2997,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/`, method: 'POST', @@ -2972,9 +3033,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -2994,18 +3056,18 @@ export class ApiApi extends runtime.BaseAPI { /** * updates the food with all possible data from the FDC Api if properties with a fdc_id already exist they will be overridden, if existing properties don\'t have a fdc_id they won\'t be changed */ - async apiFoodFdcUpdateRaw(requestParameters: ApiFoodFdcUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async apiFoodFdcCreateRaw(requestParameters: ApiFoodFdcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['id'] == null) { throw new runtime.RequiredError( 'id', - 'Required parameter "id" was null or undefined when calling apiFoodFdcUpdate().' + 'Required parameter "id" was null or undefined when calling apiFoodFdcCreate().' ); } - if (requestParameters['foodShoppingUpdate'] == null) { + if (requestParameters['food'] == null) { throw new runtime.RequiredError( - 'foodShoppingUpdate', - 'Required parameter "foodShoppingUpdate" was null or undefined when calling apiFoodFdcUpdate().' + 'food', + 'Required parameter "food" was null or undefined when calling apiFoodFdcCreate().' ); } @@ -3015,25 +3077,26 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/fdc/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PUT', + method: 'POST', headers: headerParameters, query: queryParameters, - body: FoodShoppingUpdateToJSON(requestParameters['foodShoppingUpdate']), + body: FoodToJSON(requestParameters['food']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => FoodShoppingUpdateFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue)); } /** * updates the food with all possible data from the FDC Api if properties with a fdc_id already exist they will be overridden, if existing properties don\'t have a fdc_id they won\'t be changed */ - async apiFoodFdcUpdate(requestParameters: ApiFoodFdcUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiFoodFdcUpdateRaw(requestParameters, initOverrides); + async apiFoodFdcCreate(requestParameters: ApiFoodFdcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiFoodFdcCreateRaw(requestParameters, initOverrides); return await response.value(); } @@ -3044,9 +3107,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-inherit-field/`, method: 'GET', @@ -3078,9 +3142,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-inherit-field/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3123,15 +3188,24 @@ export class ApiApi extends runtime.BaseAPI { queryParameters['random'] = requestParameters['random']; } + if (requestParameters['root'] != null) { + queryParameters['root'] = requestParameters['root']; + } + + if (requestParameters['tree'] != null) { + queryParameters['tree'] = requestParameters['tree']; + } + if (requestParameters['updatedAt'] != null) { queryParameters['updated_at'] = requestParameters['updatedAt']; } const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/`, method: 'GET', @@ -3179,9 +3253,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))), method: 'PUT', @@ -3230,9 +3305,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/move/{parent}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"parent"}}`, encodeURIComponent(String(requestParameters['parent']))), method: 'PUT', @@ -3267,9 +3343,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -3304,9 +3381,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property/`, method: 'POST', @@ -3339,9 +3417,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -3365,9 +3444,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property/`, method: 'GET', @@ -3401,9 +3481,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -3436,9 +3517,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3472,9 +3554,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property-type/`, method: 'POST', @@ -3507,9 +3590,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -3533,9 +3617,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property-type/`, method: 'GET', @@ -3569,9 +3654,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -3604,9 +3690,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3647,9 +3734,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3691,9 +3779,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3726,9 +3815,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3746,6 +3836,51 @@ export class ApiApi extends runtime.BaseAPI { return await response.value(); } + /** + */ + async apiFoodShoppingUpdateRaw(requestParameters: ApiFoodShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling apiFoodShoppingUpdate().' + ); + } + + if (requestParameters['foodShoppingUpdate'] == null) { + throw new runtime.RequiredError( + 'foodShoppingUpdate', + 'Required parameter "foodShoppingUpdate" was null or undefined when calling apiFoodShoppingUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/api/food/{id}/shopping/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: FoodShoppingUpdateToJSON(requestParameters['foodShoppingUpdate']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FoodShoppingUpdateFromJSON(jsonValue)); + } + + /** + */ + async apiFoodShoppingUpdate(requestParameters: ApiFoodShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiFoodShoppingUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + /** */ async apiFoodUpdateRaw(requestParameters: ApiFoodUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -3769,9 +3904,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3797,9 +3933,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/group/`, method: 'GET', @@ -3831,9 +3968,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/group/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3859,9 +3997,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import/`, method: 'POST', @@ -3895,9 +4034,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import-log/`, method: 'POST', @@ -3930,9 +4070,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -3964,9 +4105,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import-log/`, method: 'GET', @@ -4000,9 +4142,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -4035,9 +4178,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -4078,9 +4222,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4115,9 +4260,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/ingredient/`, method: 'POST', @@ -4150,9 +4296,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -4184,9 +4331,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/ingredient/`, method: 'GET', @@ -4220,9 +4368,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -4255,9 +4404,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -4298,9 +4448,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4335,9 +4486,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/invite-link/`, method: 'POST', @@ -4370,9 +4522,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -4412,9 +4565,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/invite-link/`, method: 'GET', @@ -4448,9 +4602,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -4483,9 +4638,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -4526,9 +4682,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4563,9 +4720,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/`, method: 'POST', @@ -4598,9 +4756,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -4642,15 +4801,24 @@ export class ApiApi extends runtime.BaseAPI { queryParameters['random'] = requestParameters['random']; } + if (requestParameters['root'] != null) { + queryParameters['root'] = requestParameters['root']; + } + + if (requestParameters['tree'] != null) { + queryParameters['tree'] = requestParameters['tree']; + } + if (requestParameters['updatedAt'] != null) { queryParameters['updated_at'] = requestParameters['updatedAt']; } const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/`, method: 'GET', @@ -4698,9 +4866,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))), method: 'PUT', @@ -4749,9 +4918,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/{id}/move/{parent}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"parent"}}`, encodeURIComponent(String(requestParameters['parent']))), method: 'PUT', @@ -4786,9 +4956,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -4821,9 +4992,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -4864,9 +5036,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4902,9 +5075,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/`, method: 'POST', @@ -4939,9 +5113,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -4979,9 +5154,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/ical/`, method: 'GET', @@ -5024,9 +5200,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/`, method: 'GET', @@ -5062,9 +5239,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -5099,9 +5277,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -5144,9 +5323,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -5183,9 +5363,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-type/`, method: 'POST', @@ -5220,9 +5401,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -5248,9 +5430,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-type/`, method: 'GET', @@ -5286,9 +5469,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -5323,9 +5507,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -5368,9 +5553,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -5411,11 +5597,12 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ - path: `/api/plan-ical/{from_date}/{to_date}/`.replace(`{${"from_date"}}`, encodeURIComponent(String(requestParameters['fromDate']))).replace(`{${"to_date"}}`, encodeURIComponent(String(requestParameters['toDate']))), + path: `/api/plan-ical/{fromDate}/{toDate}/`.replace(`{${"fromDate"}}`, encodeURIComponent(String(requestParameters['fromDate']))).replace(`{${"toDate"}}`, encodeURIComponent(String(requestParameters['toDate']))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -5446,9 +5633,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book/`, method: 'POST', @@ -5481,9 +5669,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -5517,9 +5706,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book-entry/`, method: 'POST', @@ -5554,9 +5744,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -5582,9 +5773,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book-entry/`, method: 'GET', @@ -5620,9 +5812,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -5657,9 +5850,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -5702,9 +5896,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -5747,9 +5942,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book/`, method: 'GET', @@ -5783,9 +5979,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -5818,9 +6015,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -5861,9 +6059,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -5898,9 +6097,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/`, method: 'POST', @@ -5933,9 +6133,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -5959,9 +6160,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/flat/`, method: 'GET', @@ -5987,9 +6189,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe-from-source/`, method: 'POST', @@ -6021,9 +6224,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const consumes: runtime.Consume[] = [ { contentType: 'multipart/form-data' }, ]; @@ -6187,9 +6391,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/`, method: 'GET', @@ -6223,9 +6428,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -6258,9 +6464,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/{id}/related/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -6292,9 +6499,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -6328,9 +6536,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/{id}/shopping/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -6372,9 +6581,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -6401,9 +6611,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/reset-food-inheritance/`, method: 'GET', @@ -6435,9 +6646,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/share-link/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -6470,9 +6682,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/bulk/`, method: 'POST', @@ -6507,9 +6720,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/`, method: 'POST', @@ -6542,9 +6756,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -6580,9 +6795,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/`, method: 'GET', @@ -6616,9 +6832,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -6651,9 +6868,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -6694,9 +6912,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -6731,9 +6950,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-recipe/`, method: 'POST', @@ -6766,9 +6986,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -6792,9 +7013,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-recipe/`, method: 'GET', @@ -6828,9 +7050,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -6863,9 +7086,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -6906,9 +7130,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -6934,9 +7159,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/space/`, method: 'GET', @@ -6970,9 +7196,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -7005,9 +7232,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -7041,9 +7269,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/step/`, method: 'POST', @@ -7076,9 +7305,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -7118,9 +7348,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/step/`, method: 'GET', @@ -7154,9 +7385,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -7189,9 +7421,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -7232,9 +7465,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -7269,9 +7503,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/storage/`, method: 'POST', @@ -7304,9 +7539,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -7330,9 +7566,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/storage/`, method: 'GET', @@ -7366,9 +7603,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -7401,9 +7639,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -7444,9 +7683,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -7481,9 +7721,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/`, method: 'POST', @@ -7516,9 +7757,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -7537,14 +7779,31 @@ export class ApiApi extends runtime.BaseAPI { /** */ - async apiSupermarketCategoryListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async apiSupermarketCategoryListRaw(requestParameters: ApiSupermarketCategoryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + if (requestParameters['random'] != null) { + queryParameters['random'] = requestParameters['random']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/`, method: 'GET', @@ -7557,8 +7816,8 @@ export class ApiApi extends runtime.BaseAPI { /** */ - async apiSupermarketCategoryList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.apiSupermarketCategoryListRaw(initOverrides); + async apiSupermarketCategoryList(requestParameters: ApiSupermarketCategoryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.apiSupermarketCategoryListRaw(requestParameters, initOverrides); return await response.value(); } @@ -7592,9 +7851,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))), method: 'PUT', @@ -7629,9 +7889,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -7666,9 +7927,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category-relation/`, method: 'POST', @@ -7701,9 +7963,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -7751,9 +8014,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category-relation/`, method: 'GET', @@ -7787,9 +8051,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -7822,9 +8087,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -7865,9 +8131,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -7900,9 +8167,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -7943,9 +8211,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -7980,9 +8249,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket/`, method: 'POST', @@ -8015,9 +8285,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -8057,9 +8328,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket/`, method: 'GET', @@ -8093,9 +8365,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -8128,9 +8401,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -8171,9 +8445,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -8207,11 +8482,12 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ - path: `/api/switch-active-space/{space_id}/`.replace(`{${"space_id"}}`, encodeURIComponent(String(requestParameters['spaceId']))), + path: `/api/switch-active-space/{spaceId}/`.replace(`{${"spaceId"}}`, encodeURIComponent(String(requestParameters['spaceId']))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -8243,9 +8519,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync/`, method: 'POST', @@ -8278,9 +8555,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -8304,9 +8582,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync/`, method: 'GET', @@ -8339,9 +8618,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync-log/`, method: 'GET', @@ -8373,9 +8653,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -8409,9 +8690,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -8444,9 +8726,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -8487,9 +8770,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -8524,9 +8808,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit-conversion/`, method: 'POST', @@ -8559,9 +8844,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -8589,9 +8875,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit-conversion/`, method: 'GET', @@ -8625,9 +8912,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -8660,9 +8948,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -8703,9 +8992,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -8740,9 +9030,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/`, method: 'POST', @@ -8775,9 +9066,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -8825,9 +9117,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/`, method: 'GET', @@ -8875,9 +9168,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))), method: 'PUT', @@ -8912,9 +9206,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -8947,9 +9242,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -8990,9 +9286,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -9060,9 +9357,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const consumes: runtime.Consume[] = [ { contentType: 'multipart/form-data' }, ]; @@ -9133,9 +9431,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -9175,9 +9474,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-file/`, method: 'GET', @@ -9209,9 +9509,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const consumes: runtime.Consume[] = [ { contentType: 'multipart/form-data' }, ]; @@ -9282,9 +9583,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -9358,9 +9660,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const consumes: runtime.Consume[] = [ { contentType: 'multipart/form-data' }, ]; @@ -9425,9 +9728,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user/`, method: 'GET', @@ -9463,9 +9767,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -9492,9 +9797,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-preference/`, method: 'GET', @@ -9528,9 +9834,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-preference/{user}/`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))), method: 'PATCH', @@ -9563,9 +9870,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-preference/{user}/`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))), method: 'GET', @@ -9598,9 +9906,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -9633,9 +9942,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -9667,9 +9977,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-space/`, method: 'GET', @@ -9703,9 +10014,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -9738,9 +10050,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -9774,9 +10087,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/view-log/`, method: 'POST', @@ -9809,9 +10123,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -9843,9 +10158,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/view-log/`, method: 'GET', @@ -9879,9 +10195,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PATCH', @@ -9914,9 +10231,10 @@ export class ApiApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -9957,9 +10275,10 @@ export class ApiApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', diff --git a/vue3/src/openapi/apis/ApiImportOpenDataApi.ts b/vue3/src/openapi/apis/ApiImportOpenDataApi.ts index 43ee38c81..ae4e47044 100644 --- a/vue3/src/openapi/apis/ApiImportOpenDataApi.ts +++ b/vue3/src/openapi/apis/ApiImportOpenDataApi.ts @@ -27,9 +27,10 @@ export class ApiImportOpenDataApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api-import-open-data/`, method: 'POST', @@ -53,9 +54,10 @@ export class ApiImportOpenDataApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ path: `/api-import-open-data/`, method: 'GET', diff --git a/vue3/src/openapi/apis/ApiTokenAuthApi.ts b/vue3/src/openapi/apis/ApiTokenAuthApi.ts index 44e13c62c..066ad9400 100644 --- a/vue3/src/openapi/apis/ApiTokenAuthApi.ts +++ b/vue3/src/openapi/apis/ApiTokenAuthApi.ts @@ -61,9 +61,10 @@ export class ApiTokenAuthApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const consumes: runtime.Consume[] = [ { contentType: 'application/x-www-form-urlencoded' }, { contentType: 'multipart/form-data' },