working food property editor
This commit is contained in:
parent
b275c53e5a
commit
3ec02db2f6
@ -753,7 +753,10 @@ class FoodPropertyTypeSerializer(serializers.ModelSerializer):
|
|||||||
class FoodPropertySerializer(UniqueFieldsMixin, WritableNestedModelSerializer):
|
class FoodPropertySerializer(UniqueFieldsMixin, WritableNestedModelSerializer):
|
||||||
property_type = FoodPropertyTypeSerializer()
|
property_type = FoodPropertyTypeSerializer()
|
||||||
food = FoodSimpleSerializer()
|
food = FoodSimpleSerializer()
|
||||||
unit = UnitSerializer()
|
food_unit = UnitSerializer()
|
||||||
|
food_amount = CustomDecimalField()
|
||||||
|
property_amount = CustomDecimalField()
|
||||||
|
|
||||||
# TODO prevent updates
|
# TODO prevent updates
|
||||||
|
|
||||||
def create(self, validated_data):
|
def create(self, validated_data):
|
||||||
|
@ -35,7 +35,8 @@ router.register(r'recipe', api.RecipeViewSet)
|
|||||||
router.register(r'recipe-book', api.RecipeBookViewSet)
|
router.register(r'recipe-book', api.RecipeBookViewSet)
|
||||||
router.register(r'recipe-book-entry', api.RecipeBookEntryViewSet)
|
router.register(r'recipe-book-entry', api.RecipeBookEntryViewSet)
|
||||||
router.register(r'unit-conversion', api.UnitConversionViewSet)
|
router.register(r'unit-conversion', api.UnitConversionViewSet)
|
||||||
router.register(r'nutrition-type', api.NutritionTypeViewSet)
|
router.register(r'food-property-type', api.FoodPropertyTypeViewSet)
|
||||||
|
router.register(r'food-property', api.FoodPropertyViewSet)
|
||||||
router.register(r'shopping-list', api.ShoppingListViewSet)
|
router.register(r'shopping-list', api.ShoppingListViewSet)
|
||||||
router.register(r'shopping-list-entry', api.ShoppingListEntryViewSet)
|
router.register(r'shopping-list-entry', api.ShoppingListEntryViewSet)
|
||||||
router.register(r'shopping-list-recipe', api.ShoppingListRecipeViewSet)
|
router.register(r'shopping-list-recipe', api.ShoppingListRecipeViewSet)
|
||||||
|
@ -68,7 +68,7 @@ from cookbook.models import (Automation, BookmarkletImport, CookLog, CustomFilte
|
|||||||
MealType, Recipe, RecipeBook, RecipeBookEntry, ShareLink, ShoppingList,
|
MealType, Recipe, RecipeBook, RecipeBookEntry, ShareLink, ShoppingList,
|
||||||
ShoppingListEntry, ShoppingListRecipe, Space, Step, Storage,
|
ShoppingListEntry, ShoppingListRecipe, Space, Step, Storage,
|
||||||
Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync,
|
Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync,
|
||||||
SyncLog, Unit, UserFile, UserPreference, UserSpace, ViewLog, UnitConversion, FoodPropertyType)
|
SyncLog, Unit, UserFile, UserPreference, UserSpace, ViewLog, UnitConversion, FoodPropertyType, FoodProperty)
|
||||||
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
|
||||||
@ -92,7 +92,7 @@ from cookbook.serializer import (AutomationSerializer, BookmarkletImportListSeri
|
|||||||
SyncLogSerializer, SyncSerializer, UnitSerializer,
|
SyncLogSerializer, SyncSerializer, UnitSerializer,
|
||||||
UserFileSerializer, UserSerializer, UserPreferenceSerializer,
|
UserFileSerializer, UserSerializer, UserPreferenceSerializer,
|
||||||
UserSpaceSerializer, ViewLogSerializer, AccessTokenSerializer, FoodSimpleSerializer,
|
UserSpaceSerializer, ViewLogSerializer, AccessTokenSerializer, FoodSimpleSerializer,
|
||||||
RecipeExportSerializer, UnitConversionSerializer, FoodPropertyTypeSerializer)
|
RecipeExportSerializer, UnitConversionSerializer, FoodPropertyTypeSerializer, FoodPropertySerializer)
|
||||||
from cookbook.views.import_export import get_integration
|
from cookbook.views.import_export import get_integration
|
||||||
from recipes import settings
|
from recipes import settings
|
||||||
|
|
||||||
@ -969,7 +969,7 @@ class UnitConversionViewSet(viewsets.ModelViewSet):
|
|||||||
return self.queryset.filter(space=self.request.space)
|
return self.queryset.filter(space=self.request.space)
|
||||||
|
|
||||||
|
|
||||||
class NutritionTypeViewSet(viewsets.ModelViewSet):
|
class FoodPropertyTypeViewSet(viewsets.ModelViewSet):
|
||||||
queryset = FoodPropertyType.objects
|
queryset = FoodPropertyType.objects
|
||||||
serializer_class = FoodPropertyTypeSerializer
|
serializer_class = FoodPropertyTypeSerializer
|
||||||
permission_classes = [CustomIsUser & CustomTokenHasReadWriteScope]
|
permission_classes = [CustomIsUser & CustomTokenHasReadWriteScope]
|
||||||
@ -978,6 +978,25 @@ class NutritionTypeViewSet(viewsets.ModelViewSet):
|
|||||||
return self.queryset.filter(space=self.request.space)
|
return self.queryset.filter(space=self.request.space)
|
||||||
|
|
||||||
|
|
||||||
|
class FoodPropertyViewSet(viewsets.ModelViewSet):
|
||||||
|
queryset = FoodProperty.objects
|
||||||
|
serializer_class = FoodPropertySerializer
|
||||||
|
permission_classes = [CustomIsUser & CustomTokenHasReadWriteScope]
|
||||||
|
|
||||||
|
query_params = [
|
||||||
|
QueryParam(name='food',
|
||||||
|
description=_('ID of food to return properties for.'),
|
||||||
|
qtype='int'),
|
||||||
|
]
|
||||||
|
schema = QueryParamAutoSchema()
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
if food := self.request.query_params.get('food', None):
|
||||||
|
self.queryset = self.queryset.filter(food__id=food)
|
||||||
|
|
||||||
|
return self.queryset.filter(space=self.request.space)
|
||||||
|
|
||||||
|
|
||||||
class ShoppingListRecipeViewSet(viewsets.ModelViewSet):
|
class ShoppingListRecipeViewSet(viewsets.ModelViewSet):
|
||||||
queryset = ShoppingListRecipe.objects
|
queryset = ShoppingListRecipe.objects
|
||||||
serializer_class = ShoppingListRecipeSerializer
|
serializer_class = ShoppingListRecipeSerializer
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<generic-multiselect
|
<generic-multiselect
|
||||||
@change="fp.food_unit = $event.val;"
|
@change="fp.food_unit = $event.val;"
|
||||||
:model="Models.UNIT"
|
:model="Models.UNIT"
|
||||||
:initial_selection="fp.food_unit"
|
:initial_single_selection="fp.food_unit"
|
||||||
label="name"
|
label="name"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
:placeholder="$t('Unit')"
|
:placeholder="$t('Unit')"
|
||||||
@ -164,19 +164,43 @@ export default {
|
|||||||
let apiClient = new ApiApiFactory()
|
let apiClient = new ApiApiFactory()
|
||||||
apiClient.retrieveFood('1').then((r) => {
|
apiClient.retrieveFood('1').then((r) => {
|
||||||
this.food = r.data
|
this.food = r.data
|
||||||
|
|
||||||
|
let property_types = []
|
||||||
|
let property_values = []
|
||||||
|
|
||||||
|
let p1 = apiClient.listFoodPropertyTypes().then((r) => {
|
||||||
|
property_types = r.data
|
||||||
})
|
})
|
||||||
|
|
||||||
apiClient.listFoodPropertyTypes().then((r) => {
|
let p2 = apiClient.listFoodPropertys(this.food.id).then((r) => {
|
||||||
r.data.forEach((fp) => {
|
property_values = r.data
|
||||||
this.food_properties.push({
|
})
|
||||||
|
|
||||||
|
Promise.allSettled([p1, p2]).then(r => {
|
||||||
|
property_types.forEach(fpt => {
|
||||||
|
let food_property = {
|
||||||
'food_amount': 0,
|
'food_amount': 0,
|
||||||
'food_unit': null,
|
'food_unit': null,
|
||||||
'food': this.food,
|
'food': this.food,
|
||||||
'property_amount': 0,
|
'property_amount': 0,
|
||||||
'property_type': fp,
|
'property_type': fpt,
|
||||||
|
}
|
||||||
|
|
||||||
|
property_values.forEach(fpv => {
|
||||||
|
if (fpv.property_type.id === fpt.id) {
|
||||||
|
food_property.id = fpv.id
|
||||||
|
food_property.food_amount = fpv.food_amount
|
||||||
|
food_property.food_unit = fpv.food_unit
|
||||||
|
food_property.property_amount = fpv.property_amount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
this.food_properties.push(food_property)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateFood: function () {
|
updateFood: function () {
|
||||||
@ -187,6 +211,23 @@ export default {
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)
|
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.food_properties.forEach(fp => {
|
||||||
|
if (fp.id === undefined) {
|
||||||
|
apiClient.createFoodProperty(fp).then((r) => {
|
||||||
|
fp = r.data
|
||||||
|
}).catch(err => {
|
||||||
|
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
apiClient.updateFoodProperty(fp.id, fp).then((r) => {
|
||||||
|
fp = r.data
|
||||||
|
}).catch(err => {
|
||||||
|
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -586,6 +586,123 @@ export interface FoodInheritFields {
|
|||||||
*/
|
*/
|
||||||
field?: string | null;
|
field?: string | null;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface FoodProperty
|
||||||
|
*/
|
||||||
|
export interface FoodProperty {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof FoodProperty
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodProperty
|
||||||
|
*/
|
||||||
|
food_amount?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {UnitConversionBaseUnit}
|
||||||
|
* @memberof FoodProperty
|
||||||
|
*/
|
||||||
|
food_unit: UnitConversionBaseUnit;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {FoodSubstitute}
|
||||||
|
* @memberof FoodProperty
|
||||||
|
*/
|
||||||
|
food: FoodSubstitute;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodProperty
|
||||||
|
*/
|
||||||
|
property_amount?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {FoodPropertyPropertyType}
|
||||||
|
* @memberof FoodProperty
|
||||||
|
*/
|
||||||
|
property_type: FoodPropertyPropertyType;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface FoodPropertyPropertyType
|
||||||
|
*/
|
||||||
|
export interface FoodPropertyPropertyType {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof FoodPropertyPropertyType
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyPropertyType
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyPropertyType
|
||||||
|
*/
|
||||||
|
icon?: string | null;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyPropertyType
|
||||||
|
*/
|
||||||
|
unit?: string | null;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyPropertyType
|
||||||
|
*/
|
||||||
|
description?: string | null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface FoodPropertyType
|
||||||
|
*/
|
||||||
|
export interface FoodPropertyType {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof FoodPropertyType
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyType
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyType
|
||||||
|
*/
|
||||||
|
icon?: string | null;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyType
|
||||||
|
*/
|
||||||
|
unit?: string | null;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof FoodPropertyType
|
||||||
|
*/
|
||||||
|
description?: string | null;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -1909,43 +2026,6 @@ export interface MealType {
|
|||||||
*/
|
*/
|
||||||
created_by?: string;
|
created_by?: string;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface NutritionType
|
|
||||||
*/
|
|
||||||
export interface NutritionType {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof NutritionType
|
|
||||||
*/
|
|
||||||
id?: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof NutritionType
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof NutritionType
|
|
||||||
*/
|
|
||||||
icon?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof NutritionType
|
|
||||||
*/
|
|
||||||
unit?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof NutritionType
|
|
||||||
*/
|
|
||||||
description?: string | null;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -3728,7 +3808,7 @@ export interface UnitConversion {
|
|||||||
* @type {IngredientFood}
|
* @type {IngredientFood}
|
||||||
* @memberof UnitConversion
|
* @memberof UnitConversion
|
||||||
*/
|
*/
|
||||||
food: IngredientFood | null;
|
food?: IngredientFood | null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -4360,12 +4440,12 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createFoodPropertyType: async (nutritionType?: NutritionType, options: any = {}): Promise<RequestArgs> => {
|
createFoodProperty: async (foodProperty?: FoodProperty, options: any = {}): Promise<RequestArgs> => {
|
||||||
const localVarPath = `/api/nutrition-type/`;
|
const localVarPath = `/api/food-property/`;
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
@ -4384,7 +4464,40 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
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};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(nutritionType, localVarRequestOptions, configuration)
|
localVarRequestOptions.data = serializeDataIfNeeded(foodProperty, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
createFoodPropertyType: async (foodPropertyType?: FoodPropertyType, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/food-property-type/`;
|
||||||
|
// 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(foodPropertyType, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
@ -5439,6 +5552,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 food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
destroyFoodProperty: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('destroyFoodProperty', 'id', id)
|
||||||
|
const localVarPath = `/api/food-property/{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};
|
||||||
@ -5457,7 +5603,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
destroyFoodPropertyType: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
destroyFoodPropertyType: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'id' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('destroyFoodPropertyType', 'id', id)
|
assertParamExists('destroyFoodPropertyType', 'id', id)
|
||||||
const localVarPath = `/api/nutrition-type/{id}/`
|
const localVarPath = `/api/food-property-type/{id}/`
|
||||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
@ -6516,7 +6662,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
listFoodPropertyTypes: async (options: any = {}): Promise<RequestArgs> => {
|
listFoodPropertyTypes: async (options: any = {}): Promise<RequestArgs> => {
|
||||||
const localVarPath = `/api/nutrition-type/`;
|
const localVarPath = `/api/food-property-type/`;
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
@ -6530,6 +6676,40 @@ 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 {number} [food] ID of food to return properties for.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
listFoodPropertys: async (food?: number, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/food-property/`;
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
if (food !== undefined) {
|
||||||
|
localVarQueryParameter['food'] = food;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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};
|
||||||
@ -8175,15 +8355,15 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
partialUpdateFoodPropertyType: async (id: string, nutritionType?: NutritionType, options: any = {}): Promise<RequestArgs> => {
|
partialUpdateFoodProperty: async (id: string, foodProperty?: FoodProperty, options: any = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'id' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('partialUpdateFoodPropertyType', 'id', id)
|
assertParamExists('partialUpdateFoodProperty', 'id', id)
|
||||||
const localVarPath = `/api/nutrition-type/{id}/`
|
const localVarPath = `/api/food-property/{id}/`
|
||||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
@ -8203,7 +8383,44 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
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};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(nutritionType, localVarRequestOptions, configuration)
|
localVarRequestOptions.data = serializeDataIfNeeded(foodProperty, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
partialUpdateFoodPropertyType: async (id: string, foodPropertyType?: FoodPropertyType, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('partialUpdateFoodPropertyType', 'id', id)
|
||||||
|
const localVarPath = `/api/food-property-type/{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(foodPropertyType, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
@ -9494,6 +9711,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 food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
retrieveFoodProperty: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('retrieveFoodProperty', 'id', id)
|
||||||
|
const localVarPath = `/api/food-property/{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};
|
||||||
@ -9512,7 +9762,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
retrieveFoodPropertyType: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
retrieveFoodPropertyType: async (id: string, options: any = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'id' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('retrieveFoodPropertyType', 'id', id)
|
assertParamExists('retrieveFoodPropertyType', 'id', id)
|
||||||
const localVarPath = `/api/nutrition-type/{id}/`
|
const localVarPath = `/api/food-property-type/{id}/`
|
||||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
@ -10894,15 +11144,15 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateFoodPropertyType: async (id: string, nutritionType?: NutritionType, options: any = {}): Promise<RequestArgs> => {
|
updateFoodProperty: async (id: string, foodProperty?: FoodProperty, options: any = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'id' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('updateFoodPropertyType', 'id', id)
|
assertParamExists('updateFoodProperty', 'id', id)
|
||||||
const localVarPath = `/api/nutrition-type/{id}/`
|
const localVarPath = `/api/food-property/{id}/`
|
||||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
@ -10922,7 +11172,44 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
|||||||
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};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(nutritionType, localVarRequestOptions, configuration)
|
localVarRequestOptions.data = serializeDataIfNeeded(foodProperty, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
updateFoodPropertyType: async (id: string, foodPropertyType?: FoodPropertyType, options: any = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('updateFoodPropertyType', 'id', id)
|
||||||
|
const localVarPath = `/api/food-property-type/{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(foodPropertyType, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
@ -11859,12 +12146,22 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async createFoodPropertyType(nutritionType?: NutritionType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NutritionType>> {
|
async createFoodProperty(foodProperty?: FoodProperty, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodProperty>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createFoodPropertyType(nutritionType, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createFoodProperty(foodProperty, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async createFoodPropertyType(foodPropertyType?: FoodPropertyType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodPropertyType>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createFoodPropertyType(foodPropertyType, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -12182,6 +12479,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.destroyFood(id, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.destroyFood(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 food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async destroyFoodProperty(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.destroyFoodProperty(id, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
@ -12506,10 +12813,20 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async listFoodPropertyTypes(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<NutritionType>>> {
|
async listFoodPropertyTypes(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FoodPropertyType>>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listFoodPropertyTypes(options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listFoodPropertyTypes(options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {number} [food] ID of food to return properties for.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async listFoodPropertys(food?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FoodProperty>>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listFoodPropertys(food, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} [query] Query string matched against food name.
|
* @param {string} [query] Query string matched against food name.
|
||||||
@ -12979,13 +13296,24 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async partialUpdateFoodPropertyType(id: string, nutritionType?: NutritionType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NutritionType>> {
|
async partialUpdateFoodProperty(id: string, foodProperty?: FoodProperty, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodProperty>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateFoodPropertyType(id, nutritionType, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateFoodProperty(id, foodProperty, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async partialUpdateFoodPropertyType(id: string, foodPropertyType?: FoodPropertyType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodPropertyType>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateFoodPropertyType(id, foodPropertyType, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -13369,13 +13697,23 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveFoodInheritField(id, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveFoodInheritField(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 food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async retrieveFoodProperty(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodProperty>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveFoodProperty(id, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async retrieveFoodPropertyType(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NutritionType>> {
|
async retrieveFoodPropertyType(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodPropertyType>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveFoodPropertyType(id, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveFoodPropertyType(id, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
@ -13790,13 +14128,24 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async updateFoodPropertyType(id: string, nutritionType?: NutritionType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NutritionType>> {
|
async updateFoodProperty(id: string, foodProperty?: FoodProperty, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodProperty>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFoodPropertyType(id, nutritionType, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFoodProperty(id, foodProperty, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async updateFoodPropertyType(id: string, foodPropertyType?: FoodPropertyType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FoodPropertyType>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFoodPropertyType(id, foodPropertyType, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -14121,12 +14470,21 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createFoodPropertyType(nutritionType?: NutritionType, options?: any): AxiosPromise<NutritionType> {
|
createFoodProperty(foodProperty?: FoodProperty, options?: any): AxiosPromise<FoodProperty> {
|
||||||
return localVarFp.createFoodPropertyType(nutritionType, options).then((request) => request(axios, basePath));
|
return localVarFp.createFoodProperty(foodProperty, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
createFoodPropertyType(foodPropertyType?: FoodPropertyType, options?: any): AxiosPromise<FoodPropertyType> {
|
||||||
|
return localVarFp.createFoodPropertyType(foodPropertyType, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -14412,6 +14770,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
destroyFood(id: string, options?: any): AxiosPromise<void> {
|
destroyFood(id: string, options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.destroyFood(id, options).then((request) => request(axios, basePath));
|
return localVarFp.destroyFood(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
destroyFoodProperty(id: string, options?: any): AxiosPromise<void> {
|
||||||
|
return localVarFp.destroyFoodProperty(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
@ -14704,9 +15071,18 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
listFoodPropertyTypes(options?: any): AxiosPromise<Array<NutritionType>> {
|
listFoodPropertyTypes(options?: any): AxiosPromise<Array<FoodPropertyType>> {
|
||||||
return localVarFp.listFoodPropertyTypes(options).then((request) => request(axios, basePath));
|
return localVarFp.listFoodPropertyTypes(options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {number} [food] ID of food to return properties for.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
listFoodPropertys(food?: number, options?: any): AxiosPromise<Array<FoodProperty>> {
|
||||||
|
return localVarFp.listFoodPropertys(food, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} [query] Query string matched against food name.
|
* @param {string} [query] Query string matched against food name.
|
||||||
@ -15134,13 +15510,23 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
partialUpdateFoodPropertyType(id: string, nutritionType?: NutritionType, options?: any): AxiosPromise<NutritionType> {
|
partialUpdateFoodProperty(id: string, foodProperty?: FoodProperty, options?: any): AxiosPromise<FoodProperty> {
|
||||||
return localVarFp.partialUpdateFoodPropertyType(id, nutritionType, options).then((request) => request(axios, basePath));
|
return localVarFp.partialUpdateFoodProperty(id, foodProperty, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
partialUpdateFoodPropertyType(id: string, foodPropertyType?: FoodPropertyType, options?: any): AxiosPromise<FoodPropertyType> {
|
||||||
|
return localVarFp.partialUpdateFoodPropertyType(id, foodPropertyType, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -15488,13 +15874,22 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
retrieveFoodInheritField(id: string, options?: any): AxiosPromise<FoodInheritField> {
|
retrieveFoodInheritField(id: string, options?: any): AxiosPromise<FoodInheritField> {
|
||||||
return localVarFp.retrieveFoodInheritField(id, options).then((request) => request(axios, basePath));
|
return localVarFp.retrieveFoodInheritField(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
retrieveFoodProperty(id: string, options?: any): AxiosPromise<FoodProperty> {
|
||||||
|
return localVarFp.retrieveFoodProperty(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
retrieveFoodPropertyType(id: string, options?: any): AxiosPromise<NutritionType> {
|
retrieveFoodPropertyType(id: string, options?: any): AxiosPromise<FoodPropertyType> {
|
||||||
return localVarFp.retrieveFoodPropertyType(id, options).then((request) => request(axios, basePath));
|
return localVarFp.retrieveFoodPropertyType(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -15868,13 +16263,23 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateFoodPropertyType(id: string, nutritionType?: NutritionType, options?: any): AxiosPromise<NutritionType> {
|
updateFoodProperty(id: string, foodProperty?: FoodProperty, options?: any): AxiosPromise<FoodProperty> {
|
||||||
return localVarFp.updateFoodPropertyType(id, nutritionType, options).then((request) => request(axios, basePath));
|
return localVarFp.updateFoodProperty(id, foodProperty, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
updateFoodPropertyType(id: string, foodPropertyType?: FoodPropertyType, options?: any): AxiosPromise<FoodPropertyType> {
|
||||||
|
return localVarFp.updateFoodPropertyType(id, foodPropertyType, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -16190,13 +16595,24 @@ export class ApiApi extends BaseAPI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof ApiApi
|
* @memberof ApiApi
|
||||||
*/
|
*/
|
||||||
public createFoodPropertyType(nutritionType?: NutritionType, options?: any) {
|
public createFoodProperty(foodProperty?: FoodProperty, options?: any) {
|
||||||
return ApiApiFp(this.configuration).createFoodPropertyType(nutritionType, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).createFoodProperty(foodProperty, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public createFoodPropertyType(foodPropertyType?: FoodPropertyType, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).createFoodPropertyType(foodPropertyType, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16545,6 +16961,17 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).destroyFood(id, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).destroyFood(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public destroyFoodProperty(id: string, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).destroyFoodProperty(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
@ -16906,6 +17333,17 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).listFoodPropertyTypes(options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).listFoodPropertyTypes(options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {number} [food] ID of food to return properties for.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public listFoodPropertys(food?: number, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).listFoodPropertys(food, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} [query] Query string matched against food name.
|
* @param {string} [query] Query string matched against food name.
|
||||||
@ -17417,14 +17855,26 @@ export class ApiApi extends BaseAPI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof ApiApi
|
* @memberof ApiApi
|
||||||
*/
|
*/
|
||||||
public partialUpdateFoodPropertyType(id: string, nutritionType?: NutritionType, options?: any) {
|
public partialUpdateFoodProperty(id: string, foodProperty?: FoodProperty, options?: any) {
|
||||||
return ApiApiFp(this.configuration).partialUpdateFoodPropertyType(id, nutritionType, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).partialUpdateFoodProperty(id, foodProperty, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public partialUpdateFoodPropertyType(id: string, foodPropertyType?: FoodPropertyType, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).partialUpdateFoodPropertyType(id, foodPropertyType, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17843,6 +18293,17 @@ export class ApiApi extends BaseAPI {
|
|||||||
return ApiApiFp(this.configuration).retrieveFoodInheritField(id, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).retrieveFoodInheritField(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public retrieveFoodProperty(id: string, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).retrieveFoodProperty(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
@ -18305,14 +18766,26 @@ export class ApiApi extends BaseAPI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} id A unique integer value identifying this food property type.
|
* @param {string} id A unique integer value identifying this food property.
|
||||||
* @param {NutritionType} [nutritionType]
|
* @param {FoodProperty} [foodProperty]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof ApiApi
|
* @memberof ApiApi
|
||||||
*/
|
*/
|
||||||
public updateFoodPropertyType(id: string, nutritionType?: NutritionType, options?: any) {
|
public updateFoodProperty(id: string, foodProperty?: FoodProperty, options?: any) {
|
||||||
return ApiApiFp(this.configuration).updateFoodPropertyType(id, nutritionType, options).then((request) => request(this.axios, this.basePath));
|
return ApiApiFp(this.configuration).updateFoodProperty(id, foodProperty, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} id A unique integer value identifying this food property type.
|
||||||
|
* @param {FoodPropertyType} [foodPropertyType]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof ApiApi
|
||||||
|
*/
|
||||||
|
public updateFoodPropertyType(id: string, foodPropertyType?: FoodPropertyType, options?: any) {
|
||||||
|
return ApiApiFp(this.configuration).updateFoodPropertyType(id, foodPropertyType, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user