created CustomFilter model and api
This commit is contained in:
parent
492febe626
commit
890e9e7242
36
cookbook/migrations/0168_auto_20220121_1427.py
Normal file
36
cookbook/migrations/0168_auto_20220121_1427.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Generated by Django 3.2.11 on 2022-01-21 20:27
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import cookbook.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('cookbook', '0167_userpreference_left_handed'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='CustomFilter',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=128)),
|
||||||
|
('type', models.CharField(choices=[('RECIPE', 'Recipe'), ('FOOD', 'Food'), ('KEYWORD', 'Keyword')], default=('RECIPE', 'Recipe'), max_length=128)),
|
||||||
|
('search', models.TextField()),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
|
('shared', models.ManyToManyField(blank=True, related_name='f_shared_with', to=settings.AUTH_USER_MODEL)),
|
||||||
|
('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.space')),
|
||||||
|
],
|
||||||
|
bases=(models.Model, cookbook.models.PermissionModelMixin),
|
||||||
|
),
|
||||||
|
migrations.AddConstraint(
|
||||||
|
model_name='customfilter',
|
||||||
|
constraint=models.UniqueConstraint(fields=('space', 'name'), name='cf_unique_name_per_space'),
|
||||||
|
),
|
||||||
|
]
|
@ -1100,3 +1100,34 @@ class Automation(ExportModelOperationsMixin('automations'), models.Model, Permis
|
|||||||
|
|
||||||
objects = ScopedManager(space='space')
|
objects = ScopedManager(space='space')
|
||||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||||
|
|
||||||
|
|
||||||
|
class CustomFilter(models.Model, PermissionModelMixin):
|
||||||
|
RECIPE = 'RECIPE'
|
||||||
|
FOOD = 'FOOD'
|
||||||
|
KEYWORD = 'KEYWORD'
|
||||||
|
|
||||||
|
MODELS = (
|
||||||
|
(RECIPE, _('Recipe')),
|
||||||
|
(FOOD, _('Food')),
|
||||||
|
(KEYWORD, _('Keyword')),
|
||||||
|
)
|
||||||
|
|
||||||
|
name = models.CharField(max_length=128, null=False, blank=False)
|
||||||
|
type = models.CharField(max_length=128, choices=(MODELS), default=MODELS[0])
|
||||||
|
# could use JSONField, but requires installing extension on SQLite, don't need to search the objects, so seems unecessary
|
||||||
|
search = models.TextField(blank=False, null=False)
|
||||||
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
|
shared = models.ManyToManyField(User, blank=True, related_name='f_shared_with')
|
||||||
|
|
||||||
|
objects = ScopedManager(space='space')
|
||||||
|
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
constraints = [
|
||||||
|
models.UniqueConstraint(fields=['space', 'name'], name='cf_unique_name_per_space')
|
||||||
|
]
|
||||||
|
@ -14,7 +14,7 @@ from rest_framework.fields import empty
|
|||||||
|
|
||||||
from cookbook.helper.HelperFunctions import str2bool
|
from cookbook.helper.HelperFunctions import str2bool
|
||||||
from cookbook.helper.shopping_helper import RecipeShoppingEditor
|
from cookbook.helper.shopping_helper import RecipeShoppingEditor
|
||||||
from cookbook.models import (Automation, BookmarkletImport, Comment, CookLog, Food,
|
from cookbook.models import (Automation, BookmarkletImport, Comment, CookLog, CustomFilter, Food,
|
||||||
FoodInheritField, ImportLog, Ingredient, Keyword, MealPlan, MealType,
|
FoodInheritField, ImportLog, Ingredient, Keyword, MealPlan, MealType,
|
||||||
NutritionInformation, Recipe, RecipeBook, RecipeBookEntry,
|
NutritionInformation, Recipe, RecipeBook, RecipeBookEntry,
|
||||||
RecipeImport, ShareLink, ShoppingList, ShoppingListEntry,
|
RecipeImport, ShareLink, ShoppingList, ShoppingListEntry,
|
||||||
@ -976,3 +976,16 @@ class FoodShoppingUpdateSerializer(serializers.ModelSerializer):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Recipe
|
model = Recipe
|
||||||
fields = ['id', 'amount', 'unit', 'delete', ]
|
fields = ['id', 'amount', 'unit', 'delete', ]
|
||||||
|
|
||||||
|
|
||||||
|
class CustomFilterSerializer(SpacedModelSerializer, WritableNestedModelSerializer):
|
||||||
|
shared = UserNameSerializer(many=True, required=False)
|
||||||
|
|
||||||
|
def create(self, validated_data):
|
||||||
|
validated_data['created_by'] = self.context['request'].user
|
||||||
|
return super().create(validated_data)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = CustomFilter
|
||||||
|
fields = ('id', 'name', 'search', 'shared', 'created_by')
|
||||||
|
read_only_fields = ('created_by',)
|
||||||
|
File diff suppressed because one or more lines are too long
@ -9,15 +9,17 @@ from cookbook.helper import dal
|
|||||||
from recipes.settings import DEBUG
|
from recipes.settings import DEBUG
|
||||||
from recipes.version import VERSION_NUMBER
|
from recipes.version import VERSION_NUMBER
|
||||||
|
|
||||||
from .models import (Automation, Comment, Food, InviteLink, Keyword, MealPlan, Recipe, RecipeBook,
|
from .models import (Automation, Comment, CustomFilter, Food, InviteLink, Keyword, MealPlan, Recipe,
|
||||||
RecipeBookEntry, RecipeImport, ShoppingList, Step, Storage, Supermarket,
|
RecipeBook, RecipeBookEntry, RecipeImport, ShoppingList, Step, Storage,
|
||||||
SupermarketCategory, Sync, SyncLog, Unit, UserFile, get_model_name)
|
Supermarket, SupermarketCategory, Sync, SyncLog, Unit, UserFile,
|
||||||
|
get_model_name)
|
||||||
from .views import api, data, delete, edit, import_export, lists, new, telegram, views
|
from .views import api, data, delete, edit, import_export, lists, new, telegram, views
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register(r'automation', api.AutomationViewSet)
|
router.register(r'automation', api.AutomationViewSet)
|
||||||
router.register(r'bookmarklet-import', api.BookmarkletImportViewSet)
|
router.register(r'bookmarklet-import', api.BookmarkletImportViewSet)
|
||||||
router.register(r'cook-log', api.CookLogViewSet)
|
router.register(r'cook-log', api.CookLogViewSet)
|
||||||
|
router.register(r'custom-filter', api.CustomFilterViewSet)
|
||||||
router.register(r'food', api.FoodViewSet)
|
router.register(r'food', api.FoodViewSet)
|
||||||
router.register(r'food-inherit-field', api.FoodInheritFieldViewSet)
|
router.register(r'food-inherit-field', api.FoodInheritFieldViewSet)
|
||||||
router.register(r'import-log', api.ImportLogViewSet)
|
router.register(r'import-log', api.ImportLogViewSet)
|
||||||
@ -178,7 +180,7 @@ for m in generic_models:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
vue_models = [Food, Keyword, Unit, Supermarket, SupermarketCategory, Automation, UserFile, Step]
|
vue_models = [Food, Keyword, Unit, Supermarket, SupermarketCategory, Automation, UserFile, Step, CustomFilter]
|
||||||
for m in vue_models:
|
for m in vue_models:
|
||||||
py_name = get_model_name(m)
|
py_name = get_model_name(m)
|
||||||
url_name = py_name.replace('_', '-')
|
url_name = py_name.replace('_', '-')
|
||||||
|
@ -42,18 +42,19 @@ from cookbook.helper.recipe_html_import import get_recipe_from_source
|
|||||||
from cookbook.helper.recipe_search import RecipeFacet, RecipeSearch, old_search
|
from cookbook.helper.recipe_search import RecipeFacet, RecipeSearch, old_search
|
||||||
from cookbook.helper.recipe_url_import import get_from_scraper
|
from cookbook.helper.recipe_url_import import get_from_scraper
|
||||||
from cookbook.helper.shopping_helper import RecipeShoppingEditor, shopping_helper
|
from cookbook.helper.shopping_helper import RecipeShoppingEditor, shopping_helper
|
||||||
from cookbook.models import (Automation, BookmarkletImport, CookLog, Food, FoodInheritField,
|
from cookbook.models import (Automation, BookmarkletImport, CookLog, CustomFilter, Food,
|
||||||
ImportLog, Ingredient, Keyword, MealPlan, MealType, Recipe, RecipeBook,
|
FoodInheritField, ImportLog, Ingredient, Keyword, MealPlan, MealType,
|
||||||
RecipeBookEntry, ShareLink, ShoppingList, ShoppingListEntry,
|
Recipe, RecipeBook, RecipeBookEntry, ShareLink, ShoppingList,
|
||||||
ShoppingListRecipe, Step, Storage, Supermarket, SupermarketCategory,
|
ShoppingListEntry, ShoppingListRecipe, Step, Storage, Supermarket,
|
||||||
SupermarketCategoryRelation, Sync, SyncLog, Unit, UserFile,
|
SupermarketCategory, SupermarketCategoryRelation, Sync, SyncLog, Unit,
|
||||||
UserPreference, ViewLog)
|
UserFile, UserPreference, ViewLog)
|
||||||
from cookbook.provider.dropbox import Dropbox
|
from cookbook.provider.dropbox import Dropbox
|
||||||
from cookbook.provider.local import Local
|
from cookbook.provider.local import Local
|
||||||
from cookbook.provider.nextcloud import Nextcloud
|
from cookbook.provider.nextcloud import Nextcloud
|
||||||
from cookbook.schemas import FilterSchema, QueryParam, QueryParamAutoSchema, TreeSchema
|
from cookbook.schemas import FilterSchema, QueryParam, QueryParamAutoSchema, TreeSchema
|
||||||
from cookbook.serializer import (AutomationSerializer, BookmarkletImportSerializer,
|
from cookbook.serializer import (AutomationSerializer, BookmarkletImportSerializer,
|
||||||
CookLogSerializer, FoodInheritFieldSerializer, FoodSerializer,
|
CookLogSerializer, CustomFilterSerializer,
|
||||||
|
FoodInheritFieldSerializer, FoodSerializer,
|
||||||
FoodShoppingUpdateSerializer, ImportLogSerializer,
|
FoodShoppingUpdateSerializer, ImportLogSerializer,
|
||||||
IngredientSerializer, KeywordSerializer, MealPlanSerializer,
|
IngredientSerializer, KeywordSerializer, MealPlanSerializer,
|
||||||
MealTypeSerializer, RecipeBookEntrySerializer,
|
MealTypeSerializer, RecipeBookEntrySerializer,
|
||||||
@ -900,7 +901,19 @@ class AutomationViewSet(viewsets.ModelViewSet, StandardFilterMixin):
|
|||||||
return super().get_queryset()
|
return super().get_queryset()
|
||||||
|
|
||||||
|
|
||||||
|
class CustomFilterViewSet(viewsets.ModelViewSet, StandardFilterMixin):
|
||||||
|
queryset = CustomFilter.objects
|
||||||
|
serializer_class = CustomFilterSerializer
|
||||||
|
permission_classes = [CustomIsOwner]
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
self.queryset = self.queryset.filter(Q(created_by=self.request.user) | Q(shared=self.request.user)).filter(
|
||||||
|
space=self.request.space).distinct()
|
||||||
|
return super().get_queryset()
|
||||||
|
|
||||||
# -------------- non django rest api views --------------------
|
# -------------- non django rest api views --------------------
|
||||||
|
|
||||||
|
|
||||||
def get_recipe_provider(recipe):
|
def get_recipe_provider(recipe):
|
||||||
if recipe.storage.method == Storage.DROPBOX:
|
if recipe.storage.method == Storage.DROPBOX:
|
||||||
return Dropbox
|
return Dropbox
|
||||||
|
@ -185,6 +185,22 @@ def automation(request):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@group_required('user')
|
||||||
|
def custom_filter(request):
|
||||||
|
# recipe-param is the name of the parameters used when filtering recipes by this attribute
|
||||||
|
# model-name is the models.js name of the model, probably ALL-CAPS
|
||||||
|
return render(
|
||||||
|
request,
|
||||||
|
'generic/model_template.html',
|
||||||
|
{
|
||||||
|
"title": _("Custom Filters"),
|
||||||
|
"config": {
|
||||||
|
'model': "CUSTOM_FILTER", # *REQUIRED* name of the model in models.js
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@group_required('user')
|
@group_required('user')
|
||||||
def user_file(request):
|
def user_file(request):
|
||||||
try:
|
try:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<!-- <span><b-button variant="link" size="sm" class="text-dark shadow-none"><i class="fas fa-chevron-down"></i></b-button></span> -->
|
<!-- <span><b-button variant="link" size="sm" class="text-dark shadow-none"><i class="fas fa-chevron-down"></i></b-button></span> -->
|
||||||
<model-menu />
|
<model-menu />
|
||||||
<span>{{ $t(this.this_model.name) }}</span>
|
<span>{{ $t(this.this_model.name) }}</span>
|
||||||
<span v-if="apiName !== 'Step'">
|
<span v-if="apiName !== 'Step' && apiName !== 'CustomFilter'">
|
||||||
<b-button variant="link" @click="startAction({ action: 'new' })">
|
<b-button variant="link" @click="startAction({ action: 'new' })">
|
||||||
<i class="fas fa-plus-circle fa-2x"></i>
|
<i class="fas fa-plus-circle fa-2x"></i>
|
||||||
</b-button> </span
|
</b-button> </span
|
||||||
|
@ -422,7 +422,7 @@ import "bootstrap-vue/dist/bootstrap-vue.css"
|
|||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import _debounce from "lodash/debounce"
|
import _debounce from "lodash/debounce"
|
||||||
|
|
||||||
import { ApiMixin, ResolveUrlMixin } from "@/utils/utils"
|
import { ApiMixin, ResolveUrlMixin, StandardToasts, ToastMixin } from "@/utils/utils"
|
||||||
import LoadingSpinner from "@/components/LoadingSpinner" // TODO: is this deprecated?
|
import LoadingSpinner from "@/components/LoadingSpinner" // TODO: is this deprecated?
|
||||||
import RecipeCard from "@/components/RecipeCard"
|
import RecipeCard from "@/components/RecipeCard"
|
||||||
import GenericMultiselect from "@/components/GenericMultiselect"
|
import GenericMultiselect from "@/components/GenericMultiselect"
|
||||||
@ -438,7 +438,7 @@ let UI_COOKIE_NAME = "ui_search_settings"
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RecipeSearchView",
|
name: "RecipeSearchView",
|
||||||
mixins: [ResolveUrlMixin, ApiMixin],
|
mixins: [ResolveUrlMixin, ApiMixin, ToastMixin],
|
||||||
components: { GenericMultiselect, RecipeCard, Treeselect, RecipeSwitcher },
|
components: { GenericMultiselect, RecipeCard, Treeselect, RecipeSwitcher },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -503,6 +503,7 @@ export default {
|
|||||||
pagination_count: 0,
|
pagination_count: 0,
|
||||||
random_search: false,
|
random_search: false,
|
||||||
debug: false,
|
debug: false,
|
||||||
|
custom_filters: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -857,7 +858,19 @@ export default {
|
|||||||
},
|
},
|
||||||
saveSearch: function () {
|
saveSearch: function () {
|
||||||
let filtername = window.prompt(this.$t("save_filter"), this.$t("filter_name"))
|
let filtername = window.prompt(this.$t("save_filter"), this.$t("filter_name"))
|
||||||
console.log("you saved: ", filtername, this.buildParams(false))
|
let params = {
|
||||||
|
name: filtername,
|
||||||
|
search: JSON.stringify(this.buildParams(false)),
|
||||||
|
}
|
||||||
|
this.genericAPI(this.Models.CUSTOM_FILTER, this.Actions.CREATE, params)
|
||||||
|
.then((result) => {
|
||||||
|
StandardToasts.makeStandardToast(StandardToasts.SUCCESS_CREATE)
|
||||||
|
console.log("you saved: ", filtername, this.buildParams(false), result)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err, Object.keys(err))
|
||||||
|
StandardToasts.makeStandardToast(StandardToasts.FAIL_CREATE)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
<b-dropdown-item :href="resolveDjangoUrl('list_user_file')"> <i class="fas fa-file fa-fw"></i> {{ $t(Models["USERFILE"].name) }} </b-dropdown-item>
|
<b-dropdown-item :href="resolveDjangoUrl('list_user_file')"> <i class="fas fa-file fa-fw"></i> {{ $t(Models["USERFILE"].name) }} </b-dropdown-item>
|
||||||
|
|
||||||
<b-dropdown-item :href="resolveDjangoUrl('list_step')"> <i class="fas fa-puzzle-piece fa-fw"></i>{{ $t(Models["STEP"].name) }} </b-dropdown-item>
|
<b-dropdown-item :href="resolveDjangoUrl('list_step')"> <i class="fas fa-puzzle-piece fa-fw"></i>{{ Models["STEP"].name }} </b-dropdown-item>
|
||||||
|
|
||||||
|
<b-dropdown-item :href="resolveDjangoUrl('list_custom_filter')"> <i class="fas fa-filter fa-fw"></i>{{ Models["CUSTOM_FILTER"].name }} </b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
:allow_create="form.allow_create"
|
:allow_create="form.allow_create"
|
||||||
:create_placeholder="createPlaceholder"
|
:create_placeholder="createPlaceholder"
|
||||||
:clear="clear"
|
:clear="clear"
|
||||||
|
:label="list_label"
|
||||||
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
|
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
|
||||||
:placeholder="modelName"
|
:placeholder="modelName"
|
||||||
@new="addNew"
|
@new="addNew"
|
||||||
@ -55,6 +56,7 @@ export default {
|
|||||||
new_value: undefined,
|
new_value: undefined,
|
||||||
field: undefined,
|
field: undefined,
|
||||||
label: undefined,
|
label: undefined,
|
||||||
|
list_label: undefined,
|
||||||
sticky_options: undefined,
|
sticky_options: undefined,
|
||||||
first_run: true,
|
first_run: true,
|
||||||
}
|
}
|
||||||
@ -64,6 +66,7 @@ export default {
|
|||||||
this.field = this.form?.field ?? "You Forgot To Set Field Name"
|
this.field = this.form?.field ?? "You Forgot To Set Field Name"
|
||||||
this.label = this.form?.label ?? ""
|
this.label = this.form?.label ?? ""
|
||||||
this.sticky_options = this.form?.sticky_options ?? []
|
this.sticky_options = this.form?.sticky_options ?? []
|
||||||
|
this.list_label = this.form?.list_label ?? undefined
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modelName() {
|
modelName() {
|
||||||
@ -149,9 +152,9 @@ export default {
|
|||||||
unflattenItem: function (itemList) {
|
unflattenItem: function (itemList) {
|
||||||
let unflat_items = []
|
let unflat_items = []
|
||||||
let item = undefined
|
let item = undefined
|
||||||
let this_label = undefined
|
|
||||||
let label = this.form.list_label.split("::")
|
let label = this.form.list_label.split("::")
|
||||||
let order = 0
|
let order = 0
|
||||||
|
let this_label
|
||||||
itemList.forEach((x) => {
|
itemList.forEach((x) => {
|
||||||
item = {}
|
item = {}
|
||||||
item[label[0]] = {}
|
item[label[0]] = {}
|
||||||
|
@ -311,5 +311,9 @@
|
|||||||
"show_filters": "Show Filters",
|
"show_filters": "Show Filters",
|
||||||
"not": "not",
|
"not": "not",
|
||||||
"save_filter": "Save Filter",
|
"save_filter": "Save Filter",
|
||||||
"filter_name": "Filter Name"
|
"filter_name": "Filter Name",
|
||||||
|
"left_handed": "Left-handed mode",
|
||||||
|
"left_handed_help": "Will optimize the UI for use with your left hand.",
|
||||||
|
"Custom Filter": "Custom Filter",
|
||||||
|
"shared_with": "Shared With"
|
||||||
}
|
}
|
||||||
|
@ -470,6 +470,33 @@ export class Models {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CUSTOM_FILTER = {
|
||||||
|
name: i18n.t("Custom Filter"),
|
||||||
|
apiName: "CustomFilter",
|
||||||
|
|
||||||
|
create: {
|
||||||
|
params: [["name", "search", "shared"]],
|
||||||
|
form: {
|
||||||
|
name: {
|
||||||
|
form_field: true,
|
||||||
|
type: "text",
|
||||||
|
field: "name",
|
||||||
|
label: i18n.t("Name"),
|
||||||
|
placeholder: "",
|
||||||
|
},
|
||||||
|
|
||||||
|
shared: {
|
||||||
|
form_field: true,
|
||||||
|
type: "lookup",
|
||||||
|
field: "shared",
|
||||||
|
list: "USER",
|
||||||
|
list_label: "username",
|
||||||
|
label: i18n.t("shared_with"),
|
||||||
|
multiple: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
static USER_NAME = {
|
static USER_NAME = {
|
||||||
name: "User",
|
name: "User",
|
||||||
apiName: "User",
|
apiName: "User",
|
||||||
|
@ -173,6 +173,62 @@ export interface CookLog {
|
|||||||
*/
|
*/
|
||||||
created_at?: string;
|
created_at?: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface CustomFilter
|
||||||
|
*/
|
||||||
|
export interface CustomFilter {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof CustomFilter
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof CustomFilter
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof CustomFilter
|
||||||
|
*/
|
||||||
|
search: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {Array<CustomFilterShared>}
|
||||||
|
* @memberof CustomFilter
|
||||||
|
*/
|
||||||
|
shared: Array<CustomFilterShared>;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof CustomFilter
|
||||||
|
*/
|
||||||
|
created_by?: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface CustomFilterShared
|
||||||
|
*/
|
||||||
|
export interface CustomFilterShared {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof CustomFilterShared
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof CustomFilterShared
|
||||||
|
*/
|
||||||
|
username?: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -1093,10 +1149,10 @@ export interface MealPlan {
|
|||||||
created_by?: string;
|
created_by?: string;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<MealPlanShared>}
|
* @type {Array<CustomFilterShared>}
|
||||||
* @memberof MealPlan
|
* @memberof MealPlan
|
||||||
*/
|
*/
|
||||||
shared?: Array<MealPlanShared> | null;
|
shared?: Array<CustomFilterShared> | null;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
@ -1293,25 +1349,6 @@ export interface MealPlanRecipeKeywords {
|
|||||||
*/
|
*/
|
||||||
label?: string;
|
label?: string;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface MealPlanShared
|
|
||||||
*/
|
|
||||||
export interface MealPlanShared {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof MealPlanShared
|
|
||||||
*/
|
|
||||||
id?: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof MealPlanShared
|
|
||||||
*/
|
|
||||||
username?: string;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -1508,10 +1545,10 @@ export interface RecipeBook {
|
|||||||
icon?: string | null;
|
icon?: string | null;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<MealPlanShared>}
|
* @type {Array<CustomFilterShared>}
|
||||||
* @memberof RecipeBook
|
* @memberof RecipeBook
|
||||||
*/
|
*/
|
||||||
shared: Array<MealPlanShared>;
|
shared: Array<CustomFilterShared>;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
@ -2047,10 +2084,10 @@ export interface ShoppingList {
|
|||||||
entries: Array<ShoppingListEntries> | null;
|
entries: Array<ShoppingListEntries> | null;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<MealPlanShared>}
|
* @type {Array<CustomFilterShared>}
|
||||||
* @memberof ShoppingList
|
* @memberof ShoppingList
|
||||||
*/
|
*/
|
||||||
shared: Array<MealPlanShared>;
|
shared: Array<CustomFilterShared>;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
@ -2966,10 +3003,10 @@ export interface UserPreference {
|
|||||||
show_recent?: boolean;
|
show_recent?: boolean;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<MealPlanShared>}
|
* @type {Array<CustomFilterShared>}
|
||||||
* @memberof UserPreference
|
* @memberof UserPreference
|
||||||
*/
|
*/
|
||||||
plan_share?: Array<MealPlanShared> | null;
|
plan_share?: Array<CustomFilterShared> | null;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@ -3020,10 +3057,10 @@ export interface UserPreference {
|
|||||||
mealplan_autoexclude_onhand?: boolean;
|
mealplan_autoexclude_onhand?: boolean;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<MealPlanShared>}
|
* @type {Array<CustomFilterShared>}
|
||||||
* @memberof UserPreference
|
* @memberof UserPreference
|
||||||
*/
|
*/
|
||||||
shopping_share?: Array<MealPlanShared> | null;
|
shopping_share?: Array<CustomFilterShared> | null;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@ -3055,14 +3092,20 @@ export interface UserPreference {
|
|||||||
*/
|
*/
|
||||||
shopping_add_onhand?: boolean;
|
shopping_add_onhand?: boolean;
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
>>>>>>> created CustomFilter model and api
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
* @memberof UserPreference
|
* @memberof UserPreference
|
||||||
*/
|
*/
|
||||||
left_handed?: boolean;
|
left_handed?: boolean;
|
||||||
|
<<<<<<< HEAD
|
||||||
=======
|
=======
|
||||||
>>>>>>> complex keyword filters
|
>>>>>>> complex keyword filters
|
||||||
|
=======
|
||||||
|
>>>>>>> created CustomFilter model and api
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3246,6 +3289,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
options: localVarRequestOptions,
|
options: localVarRequestOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
createCustomFilter: async (customFilter?: CustomFilter, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/custom-filter/`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
localVarRequestOptions.data = serializeDataIfNeeded(customFilter, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Food} [food]
|
* @param {Food} [food]
|
||||||
@ -4084,6 +4160,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
destroyCustomFilter: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('destroyCustomFilter', 'id', id)
|
||||||
|
const localVarPath = `/api/custom-filter/{id}/`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
@ -4949,6 +5058,35 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
listCustomFilters: async (options: any = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/custom-filter/`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
@ -6254,6 +6392,43 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
options: localVarRequestOptions,
|
options: localVarRequestOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
partialUpdateCustomFilter: async (id: string, customFilter?: CustomFilter, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('partialUpdateCustomFilter', 'id', id)
|
||||||
|
const localVarPath = `/api/custom-filter/{id}/`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
localVarRequestOptions.data = serializeDataIfNeeded(customFilter, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -7213,6 +7388,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
retrieveCustomFilter: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('retrieveCustomFilter', 'id', id)
|
||||||
|
const localVarPath = `/api/custom-filter/{id}/`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
@ -8232,6 +8440,43 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
options: localVarRequestOptions,
|
options: localVarRequestOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
updateCustomFilter: async (id: string, customFilter?: CustomFilter, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('updateCustomFilter', 'id', id)
|
||||||
|
const localVarPath = `/api/custom-filter/{id}/`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
localVarRequestOptions.data = serializeDataIfNeeded(customFilter, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -9108,6 +9353,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createCookLog(cookLog, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createCookLog(cookLog, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async createCustomFilter(customFilter?: CustomFilter, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CustomFilter>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomFilter(customFilter, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Food} [food]
|
* @param {Food} [food]
|
||||||
@ -9361,6 +9616,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.destroyCookLog(id, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.destroyCookLog(id, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async destroyCustomFilter(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.destroyCustomFilter(id, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -9621,6 +9886,15 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listCookLogs(page, pageSize, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listCookLogs(page, pageSize, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async listCustomFilters(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CustomFilter>>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listCustomFilters(options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
@ -9990,6 +10264,17 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateCookLog(id, cookLog, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateCookLog(id, cookLog, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async partialUpdateCustomFilter(id: string, customFilter?: CustomFilter, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CustomFilter>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateCustomFilter(id, customFilter, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -10275,6 +10560,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveCookLog(id, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveCookLog(id, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async retrieveCustomFilter(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CustomFilter>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveCustomFilter(id, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -10580,6 +10875,17 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCookLog(id, cookLog, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCookLog(id, cookLog, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async updateCustomFilter(id: string, customFilter?: CustomFilter, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CustomFilter>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCustomFilter(id, customFilter, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -10862,6 +11168,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
createCookLog(cookLog?: CookLog, options?: any): AxiosPromise<CookLog> {
|
createCookLog(cookLog?: CookLog, options?: any): AxiosPromise<CookLog> {
|
||||||
return localVarFp.createCookLog(cookLog, options).then((request) => request(axios, basePath));
|
return localVarFp.createCookLog(cookLog, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
createCustomFilter(customFilter?: CustomFilter, options?: any): AxiosPromise<CustomFilter> {
|
||||||
|
return localVarFp.createCustomFilter(customFilter, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Food} [food]
|
* @param {Food} [food]
|
||||||
@ -11090,6 +11405,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
destroyCookLog(id: string, options?: any): AxiosPromise<void> {
|
destroyCookLog(id: string, options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.destroyCookLog(id, options).then((request) => request(axios, basePath));
|
return localVarFp.destroyCookLog(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
destroyCustomFilter(id: string, options?: any): AxiosPromise<void> {
|
||||||
|
return localVarFp.destroyCustomFilter(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -11324,6 +11648,14 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
listCookLogs(page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse200> {
|
listCookLogs(page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse200> {
|
||||||
return localVarFp.listCookLogs(page, pageSize, options).then((request) => request(axios, basePath));
|
return localVarFp.listCookLogs(page, pageSize, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
listCustomFilters(options?: any): AxiosPromise<Array<CustomFilter>> {
|
||||||
|
return localVarFp.listCustomFilters(options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
@ -11660,6 +11992,16 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
partialUpdateCookLog(id: string, cookLog?: CookLog, options?: any): AxiosPromise<CookLog> {
|
partialUpdateCookLog(id: string, cookLog?: CookLog, options?: any): AxiosPromise<CookLog> {
|
||||||
return localVarFp.partialUpdateCookLog(id, cookLog, options).then((request) => request(axios, basePath));
|
return localVarFp.partialUpdateCookLog(id, cookLog, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
partialUpdateCustomFilter(id: string, customFilter?: CustomFilter, options?: any): AxiosPromise<CustomFilter> {
|
||||||
|
return localVarFp.partialUpdateCustomFilter(id, customFilter, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -11919,6 +12261,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
retrieveCookLog(id: string, options?: any): AxiosPromise<CookLog> {
|
retrieveCookLog(id: string, options?: any): AxiosPromise<CookLog> {
|
||||||
return localVarFp.retrieveCookLog(id, options).then((request) => request(axios, basePath));
|
return localVarFp.retrieveCookLog(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
retrieveCustomFilter(id: string, options?: any): AxiosPromise<CustomFilter> {
|
||||||
|
return localVarFp.retrieveCustomFilter(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -12194,6 +12545,16 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
updateCookLog(id: string, cookLog?: CookLog, options?: any): AxiosPromise<CookLog> {
|
updateCookLog(id: string, cookLog?: CookLog, options?: any): AxiosPromise<CookLog> {
|
||||||
return localVarFp.updateCookLog(id, cookLog, options).then((request) => request(axios, basePath));
|
return localVarFp.updateCookLog(id, cookLog, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
updateCustomFilter(id: string, customFilter?: CustomFilter, options?: any): AxiosPromise<CustomFilter> {
|
||||||
|
return localVarFp.updateCustomFilter(id, customFilter, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -12460,6 +12821,17 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).createCookLog(cookLog, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).createCookLog(cookLog, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public createCustomFilter(customFilter?: CustomFilter, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).createCustomFilter(customFilter, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Food} [food]
|
* @param {Food} [food]
|
||||||
@ -12738,6 +13110,17 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).destroyCookLog(id, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).destroyCookLog(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public destroyCustomFilter(id: string, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).destroyCustomFilter(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -13024,6 +13407,16 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).listCookLogs(page, pageSize, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).listCookLogs(page, pageSize, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public listCustomFilters(options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).listCustomFilters(options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
@ -13426,6 +13819,18 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).partialUpdateCookLog(id, cookLog, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).partialUpdateCookLog(id, cookLog, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public partialUpdateCustomFilter(id: string, customFilter?: CustomFilter, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).partialUpdateCustomFilter(id, customFilter, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -13737,6 +14142,17 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).retrieveCookLog(id, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).retrieveCookLog(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public retrieveCustomFilter(id: string, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).retrieveCustomFilter(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
@ -14072,6 +14488,18 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).updateCookLog(id, cookLog, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).updateCookLog(id, cookLog, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this custom filter.
|
||||||
|
* @param {CustomFilter} [customFilter]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public updateCustomFilter(id: string, customFilter?: CustomFilter, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).updateCustomFilter(id, customFilter, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food.
|
* @param {string} id A unique integer value identifying this food.
|
||||||
|
Loading…
Reference in New Issue
Block a user