mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
wip shopping dialog
This commit is contained in:
99
vue3/src/openapi/models/PaginatedRecipeSimpleList.ts
Normal file
99
vue3/src/openapi/models/PaginatedRecipeSimpleList.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { RecipeSimple } from './RecipeSimple';
|
||||
import {
|
||||
RecipeSimpleFromJSON,
|
||||
RecipeSimpleFromJSONTyped,
|
||||
RecipeSimpleToJSON,
|
||||
RecipeSimpleToJSONTyped,
|
||||
} from './RecipeSimple';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PaginatedRecipeSimpleList
|
||||
*/
|
||||
export interface PaginatedRecipeSimpleList {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PaginatedRecipeSimpleList
|
||||
*/
|
||||
count: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PaginatedRecipeSimpleList
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PaginatedRecipeSimpleList
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<RecipeSimple>}
|
||||
* @memberof PaginatedRecipeSimpleList
|
||||
*/
|
||||
results: Array<RecipeSimple>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PaginatedRecipeSimpleList interface.
|
||||
*/
|
||||
export function instanceOfPaginatedRecipeSimpleList(value: object): value is PaginatedRecipeSimpleList {
|
||||
if (!('count' in value) || value['count'] === undefined) return false;
|
||||
if (!('results' in value) || value['results'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PaginatedRecipeSimpleListFromJSON(json: any): PaginatedRecipeSimpleList {
|
||||
return PaginatedRecipeSimpleListFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PaginatedRecipeSimpleListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRecipeSimpleList {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': json['count'],
|
||||
'next': json['next'] == null ? undefined : json['next'],
|
||||
'previous': json['previous'] == null ? undefined : json['previous'],
|
||||
'results': ((json['results'] as Array<any>).map(RecipeSimpleFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function PaginatedRecipeSimpleListToJSON(json: any): PaginatedRecipeSimpleList {
|
||||
return PaginatedRecipeSimpleListToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PaginatedRecipeSimpleListToJSONTyped(value?: PaginatedRecipeSimpleList | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'count': value['count'],
|
||||
'next': value['next'],
|
||||
'previous': value['previous'],
|
||||
'results': ((value['results'] as Array<any>).map(RecipeSimpleToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface PatchedShoppingListRecipe {
|
||||
* @type {string}
|
||||
* @memberof PatchedShoppingListRecipe
|
||||
*/
|
||||
readonly name?: string;
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -108,7 +108,7 @@ export function PatchedShoppingListRecipeToJSON(json: any): PatchedShoppingListR
|
||||
return PatchedShoppingListRecipeToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppingListRecipe, 'recipe_name'|'name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppingListRecipe, 'recipe_name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
@@ -116,6 +116,7 @@ export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppin
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'recipe': value['recipe'],
|
||||
'mealplan': value['mealplan'],
|
||||
'servings': value['servings'],
|
||||
|
||||
@@ -32,11 +32,11 @@ export interface RecipeShoppingUpdate {
|
||||
*/
|
||||
listRecipe?: number | null;
|
||||
/**
|
||||
* List of ingredient IDs from the recipe to add, if not provided all ingredients will be added.
|
||||
* @type {number}
|
||||
*
|
||||
* @type {Array<number | null>}
|
||||
* @memberof RecipeShoppingUpdate
|
||||
*/
|
||||
ingredients?: number | null;
|
||||
ingredients: Array<number | null>;
|
||||
/**
|
||||
* Providing a list_recipe ID and servings of 0 will delete that shopping list.
|
||||
* @type {number}
|
||||
@@ -49,6 +49,7 @@ export interface RecipeShoppingUpdate {
|
||||
* Check if a given object implements the RecipeShoppingUpdate interface.
|
||||
*/
|
||||
export function instanceOfRecipeShoppingUpdate(value: object): value is RecipeShoppingUpdate {
|
||||
if (!('ingredients' in value) || value['ingredients'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -64,7 +65,7 @@ export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'],
|
||||
'ingredients': json['ingredients'] == null ? undefined : json['ingredients'],
|
||||
'ingredients': json['ingredients'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
};
|
||||
}
|
||||
|
||||
74
vue3/src/openapi/models/ShoppingListEntryBulkCreate.ts
Normal file
74
vue3/src/openapi/models/ShoppingListEntryBulkCreate.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ShoppingListEntrySimpleCreate } from './ShoppingListEntrySimpleCreate';
|
||||
import {
|
||||
ShoppingListEntrySimpleCreateFromJSON,
|
||||
ShoppingListEntrySimpleCreateFromJSONTyped,
|
||||
ShoppingListEntrySimpleCreateToJSON,
|
||||
ShoppingListEntrySimpleCreateToJSONTyped,
|
||||
} from './ShoppingListEntrySimpleCreate';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ShoppingListEntryBulkCreate
|
||||
*/
|
||||
export interface ShoppingListEntryBulkCreate {
|
||||
/**
|
||||
*
|
||||
* @type {Array<ShoppingListEntrySimpleCreate>}
|
||||
* @memberof ShoppingListEntryBulkCreate
|
||||
*/
|
||||
entries: Array<ShoppingListEntrySimpleCreate>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ShoppingListEntryBulkCreate interface.
|
||||
*/
|
||||
export function instanceOfShoppingListEntryBulkCreate(value: object): value is ShoppingListEntryBulkCreate {
|
||||
if (!('entries' in value) || value['entries'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ShoppingListEntryBulkCreateFromJSON(json: any): ShoppingListEntryBulkCreate {
|
||||
return ShoppingListEntryBulkCreateFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ShoppingListEntryBulkCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntryBulkCreate {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'entries': ((json['entries'] as Array<any>).map(ShoppingListEntrySimpleCreateFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ShoppingListEntryBulkCreateToJSON(json: any): ShoppingListEntryBulkCreate {
|
||||
return ShoppingListEntryBulkCreateToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ShoppingListEntryBulkCreateToJSONTyped(value?: ShoppingListEntryBulkCreate | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'entries': ((value['entries'] as Array<any>).map(ShoppingListEntrySimpleCreateToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
84
vue3/src/openapi/models/ShoppingListEntrySimpleCreate.ts
Normal file
84
vue3/src/openapi/models/ShoppingListEntrySimpleCreate.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ShoppingListEntrySimpleCreate
|
||||
*/
|
||||
export interface ShoppingListEntrySimpleCreate {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ShoppingListEntrySimpleCreate
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ShoppingListEntrySimpleCreate
|
||||
*/
|
||||
unitId: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ShoppingListEntrySimpleCreate
|
||||
*/
|
||||
foodId: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ShoppingListEntrySimpleCreate interface.
|
||||
*/
|
||||
export function instanceOfShoppingListEntrySimpleCreate(value: object): value is ShoppingListEntrySimpleCreate {
|
||||
if (!('amount' in value) || value['amount'] === undefined) return false;
|
||||
if (!('unitId' in value) || value['unitId'] === undefined) return false;
|
||||
if (!('foodId' in value) || value['foodId'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ShoppingListEntrySimpleCreateFromJSON(json: any): ShoppingListEntrySimpleCreate {
|
||||
return ShoppingListEntrySimpleCreateFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ShoppingListEntrySimpleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntrySimpleCreate {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': json['amount'],
|
||||
'unitId': json['unit_id'],
|
||||
'foodId': json['food_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ShoppingListEntrySimpleCreateToJSON(json: any): ShoppingListEntrySimpleCreate {
|
||||
return ShoppingListEntrySimpleCreateToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ShoppingListEntrySimpleCreateToJSONTyped(value?: ShoppingListEntrySimpleCreate | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit_id': value['unitId'],
|
||||
'food_id': value['foodId'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface ShoppingListRecipe {
|
||||
* @type {string}
|
||||
* @memberof ShoppingListRecipe
|
||||
*/
|
||||
readonly name: string;
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -80,7 +80,6 @@ export interface ShoppingListRecipe {
|
||||
*/
|
||||
export function instanceOfShoppingListRecipe(value: object): value is ShoppingListRecipe {
|
||||
if (!('recipeName' in value) || value['recipeName'] === undefined) return false;
|
||||
if (!('name' in value) || value['name'] === undefined) return false;
|
||||
if (!('servings' in value) || value['servings'] === undefined) return false;
|
||||
if (!('mealplanNote' in value) || value['mealplanNote'] === undefined) return false;
|
||||
if (!('mealplanFromDate' in value) || value['mealplanFromDate'] === undefined) return false;
|
||||
@@ -100,7 +99,7 @@ export function ShoppingListRecipeFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'recipeName': json['recipe_name'],
|
||||
'name': json['name'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'mealplan': json['mealplan'] == null ? undefined : json['mealplan'],
|
||||
'servings': json['servings'],
|
||||
@@ -114,7 +113,7 @@ export function ShoppingListRecipeToJSON(json: any): ShoppingListRecipe {
|
||||
return ShoppingListRecipeToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ShoppingListRecipeToJSONTyped(value?: Omit<ShoppingListRecipe, 'recipe_name'|'name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
export function ShoppingListRecipeToJSONTyped(value?: Omit<ShoppingListRecipe, 'recipe_name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
@@ -122,6 +121,7 @@ export function ShoppingListRecipeToJSONTyped(value?: Omit<ShoppingListRecipe, '
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'recipe': value['recipe'],
|
||||
'mealplan': value['mealplan'],
|
||||
'servings': value['servings'],
|
||||
|
||||
@@ -130,6 +130,8 @@ export * from './ServerSettings';
|
||||
export * from './ShareLink';
|
||||
export * from './ShoppingListEntry';
|
||||
export * from './ShoppingListEntryBulk';
|
||||
export * from './ShoppingListEntryBulkCreate';
|
||||
export * from './ShoppingListEntrySimpleCreate';
|
||||
export * from './ShoppingListRecipe';
|
||||
export * from './SourceImportDuplicate';
|
||||
export * from './SourceImportFood';
|
||||
|
||||
Reference in New Issue
Block a user