mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
added some cooklog stuff
This commit is contained in:
@@ -13,6 +13,13 @@
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CookLogCreatedBy } from './CookLogCreatedBy';
|
||||
import {
|
||||
CookLogCreatedByFromJSON,
|
||||
CookLogCreatedByFromJSONTyped,
|
||||
CookLogCreatedByToJSON,
|
||||
} from './CookLogCreatedBy';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@@ -36,7 +43,7 @@ export interface CookLog {
|
||||
* @type {number}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
servings?: number;
|
||||
servings?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -48,13 +55,25 @@ export interface CookLog {
|
||||
* @type {string}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
comment?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {CookLogCreatedBy}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
createdBy?: CookLogCreatedBy;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly updatedAt?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,8 +100,10 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
|
||||
'recipe': json['recipe'],
|
||||
'servings': !exists(json, 'servings') ? undefined : json['servings'],
|
||||
'rating': !exists(json, 'rating') ? undefined : json['rating'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : CookLogCreatedByFromJSON(json['created_by']),
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -98,6 +119,8 @@ export function CookLogToJSON(value?: CookLog | null): any {
|
||||
'recipe': value.recipe,
|
||||
'servings': value.servings,
|
||||
'rating': value.rating,
|
||||
'comment': value.comment,
|
||||
'created_by': CookLogCreatedByToJSON(value.createdBy),
|
||||
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
94
vue3/src/openapi/models/CookLogCreatedBy.ts
Normal file
94
vue3/src/openapi/models/CookLogCreatedBy.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CookLogCreatedBy
|
||||
*/
|
||||
export interface CookLogCreatedBy {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly displayName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLogCreatedBy interface.
|
||||
*/
|
||||
export function instanceOfCookLogCreatedBy(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function CookLogCreatedByFromJSON(json: any): CookLogCreatedBy {
|
||||
return CookLogCreatedByFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogCreatedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogCreatedBy {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'username': !exists(json, 'username') ? undefined : json['username'],
|
||||
'firstName': !exists(json, 'first_name') ? undefined : json['first_name'],
|
||||
'lastName': !exists(json, 'last_name') ? undefined : json['last_name'],
|
||||
'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogCreatedByToJSON(value?: CookLogCreatedBy | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value.firstName,
|
||||
'last_name': value.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,13 +61,7 @@ export interface RecipeStepsInner {
|
||||
* @type {string}
|
||||
* @memberof RecipeStepsInner
|
||||
*/
|
||||
readonly ingredientsMarkdown?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RecipeStepsInner
|
||||
*/
|
||||
readonly ingredientsVue?: string;
|
||||
readonly instructionsMarkdown?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -142,8 +136,7 @@ export function RecipeStepsInnerFromJSONTyped(json: any, ignoreDiscriminator: bo
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
'instruction': !exists(json, 'instruction') ? undefined : json['instruction'],
|
||||
'ingredients': ((json['ingredients'] as Array<any>).map(RecipeStepsInnerIngredientsInnerFromJSON)),
|
||||
'ingredientsMarkdown': !exists(json, 'ingredients_markdown') ? undefined : json['ingredients_markdown'],
|
||||
'ingredientsVue': !exists(json, 'ingredients_vue') ? undefined : json['ingredients_vue'],
|
||||
'instructionsMarkdown': !exists(json, 'instructions_markdown') ? undefined : json['instructions_markdown'],
|
||||
'time': !exists(json, 'time') ? undefined : json['time'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'showAsHeader': !exists(json, 'show_as_header') ? undefined : json['show_as_header'],
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CookLogCreatedBy } from './CookLogCreatedBy';
|
||||
import {
|
||||
CookLogCreatedByFromJSON,
|
||||
CookLogCreatedByFromJSONTyped,
|
||||
CookLogCreatedByToJSON,
|
||||
} from './CookLogCreatedBy';
|
||||
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
|
||||
import {
|
||||
FoodPropertiesFoodUnitFromJSON,
|
||||
@@ -25,12 +31,6 @@ import {
|
||||
IngredientFoodFromJSONTyped,
|
||||
IngredientFoodToJSON,
|
||||
} from './IngredientFood';
|
||||
import type { ShoppingListEntriesInnerCreatedBy } from './ShoppingListEntriesInnerCreatedBy';
|
||||
import {
|
||||
ShoppingListEntriesInnerCreatedByFromJSON,
|
||||
ShoppingListEntriesInnerCreatedByFromJSONTyped,
|
||||
ShoppingListEntriesInnerCreatedByToJSON,
|
||||
} from './ShoppingListEntriesInnerCreatedBy';
|
||||
import type { ShoppingListEntriesInnerRecipeMealplan } from './ShoppingListEntriesInnerRecipeMealplan';
|
||||
import {
|
||||
ShoppingListEntriesInnerRecipeMealplanFromJSON,
|
||||
@@ -94,10 +94,10 @@ export interface ShoppingListEntriesInner {
|
||||
recipeMealplan?: ShoppingListEntriesInnerRecipeMealplan;
|
||||
/**
|
||||
*
|
||||
* @type {ShoppingListEntriesInnerCreatedBy}
|
||||
* @type {CookLogCreatedBy}
|
||||
* @memberof ShoppingListEntriesInner
|
||||
*/
|
||||
createdBy?: ShoppingListEntriesInnerCreatedBy;
|
||||
createdBy?: CookLogCreatedBy;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
@@ -153,7 +153,7 @@ export function ShoppingListEntriesInnerFromJSONTyped(json: any, ignoreDiscrimin
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'checked': !exists(json, 'checked') ? undefined : json['checked'],
|
||||
'recipeMealplan': !exists(json, 'recipe_mealplan') ? undefined : ShoppingListEntriesInnerRecipeMealplanFromJSON(json['recipe_mealplan']),
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : ShoppingListEntriesInnerCreatedByFromJSON(json['created_by']),
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : CookLogCreatedByFromJSON(json['created_by']),
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'completedAt': !exists(json, 'completed_at') ? undefined : (json['completed_at'] === null ? null : new Date(json['completed_at'])),
|
||||
@@ -177,7 +177,7 @@ export function ShoppingListEntriesInnerToJSON(value?: ShoppingListEntriesInner
|
||||
'order': value.order,
|
||||
'checked': value.checked,
|
||||
'recipe_mealplan': ShoppingListEntriesInnerRecipeMealplanToJSON(value.recipeMealplan),
|
||||
'created_by': ShoppingListEntriesInnerCreatedByToJSON(value.createdBy),
|
||||
'created_by': CookLogCreatedByToJSON(value.createdBy),
|
||||
'completed_at': value.completedAt === undefined ? undefined : (value.completedAt === null ? null : value.completedAt.toISOString()),
|
||||
'delay_until': value.delayUntil === undefined ? undefined : (value.delayUntil === null ? null : value.delayUntil.toISOString()),
|
||||
};
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CookLogCreatedBy } from './CookLogCreatedBy';
|
||||
import {
|
||||
CookLogCreatedByFromJSON,
|
||||
CookLogCreatedByFromJSONTyped,
|
||||
CookLogCreatedByToJSON,
|
||||
} from './CookLogCreatedBy';
|
||||
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
|
||||
import {
|
||||
FoodPropertiesFoodUnitFromJSON,
|
||||
@@ -25,12 +31,6 @@ import {
|
||||
IngredientFoodFromJSONTyped,
|
||||
IngredientFoodToJSON,
|
||||
} from './IngredientFood';
|
||||
import type { ShoppingListEntriesInnerCreatedBy } from './ShoppingListEntriesInnerCreatedBy';
|
||||
import {
|
||||
ShoppingListEntriesInnerCreatedByFromJSON,
|
||||
ShoppingListEntriesInnerCreatedByFromJSONTyped,
|
||||
ShoppingListEntriesInnerCreatedByToJSON,
|
||||
} from './ShoppingListEntriesInnerCreatedBy';
|
||||
import type { ShoppingListEntriesInnerRecipeMealplan } from './ShoppingListEntriesInnerRecipeMealplan';
|
||||
import {
|
||||
ShoppingListEntriesInnerRecipeMealplanFromJSON,
|
||||
@@ -94,10 +94,10 @@ export interface ShoppingListEntry {
|
||||
recipeMealplan?: ShoppingListEntriesInnerRecipeMealplan;
|
||||
/**
|
||||
*
|
||||
* @type {ShoppingListEntriesInnerCreatedBy}
|
||||
* @type {CookLogCreatedBy}
|
||||
* @memberof ShoppingListEntry
|
||||
*/
|
||||
createdBy?: ShoppingListEntriesInnerCreatedBy;
|
||||
createdBy?: CookLogCreatedBy;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
@@ -153,7 +153,7 @@ export function ShoppingListEntryFromJSONTyped(json: any, ignoreDiscriminator: b
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'checked': !exists(json, 'checked') ? undefined : json['checked'],
|
||||
'recipeMealplan': !exists(json, 'recipe_mealplan') ? undefined : ShoppingListEntriesInnerRecipeMealplanFromJSON(json['recipe_mealplan']),
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : ShoppingListEntriesInnerCreatedByFromJSON(json['created_by']),
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : CookLogCreatedByFromJSON(json['created_by']),
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'completedAt': !exists(json, 'completed_at') ? undefined : (json['completed_at'] === null ? null : new Date(json['completed_at'])),
|
||||
@@ -177,7 +177,7 @@ export function ShoppingListEntryToJSON(value?: ShoppingListEntry | null): any {
|
||||
'order': value.order,
|
||||
'checked': value.checked,
|
||||
'recipe_mealplan': ShoppingListEntriesInnerRecipeMealplanToJSON(value.recipeMealplan),
|
||||
'created_by': ShoppingListEntriesInnerCreatedByToJSON(value.createdBy),
|
||||
'created_by': CookLogCreatedByToJSON(value.createdBy),
|
||||
'completed_at': value.completedAt === undefined ? undefined : (value.completedAt === null ? null : value.completedAt.toISOString()),
|
||||
'delay_until': value.delayUntil === undefined ? undefined : (value.delayUntil === null ? null : value.delayUntil.toISOString()),
|
||||
};
|
||||
|
||||
@@ -61,13 +61,7 @@ export interface Step {
|
||||
* @type {string}
|
||||
* @memberof Step
|
||||
*/
|
||||
readonly ingredientsMarkdown?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Step
|
||||
*/
|
||||
readonly ingredientsVue?: string;
|
||||
readonly instructionsMarkdown?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -142,8 +136,7 @@ export function StepFromJSONTyped(json: any, ignoreDiscriminator: boolean): Step
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
'instruction': !exists(json, 'instruction') ? undefined : json['instruction'],
|
||||
'ingredients': ((json['ingredients'] as Array<any>).map(RecipeStepsInnerIngredientsInnerFromJSON)),
|
||||
'ingredientsMarkdown': !exists(json, 'ingredients_markdown') ? undefined : json['ingredients_markdown'],
|
||||
'ingredientsVue': !exists(json, 'ingredients_vue') ? undefined : json['ingredients_vue'],
|
||||
'instructionsMarkdown': !exists(json, 'instructions_markdown') ? undefined : json['instructions_markdown'],
|
||||
'time': !exists(json, 'time') ? undefined : json['time'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'showAsHeader': !exists(json, 'show_as_header') ? undefined : json['show_as_header'],
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CookLogCreatedBy } from './CookLogCreatedBy';
|
||||
import {
|
||||
CookLogCreatedByFromJSON,
|
||||
CookLogCreatedByFromJSONTyped,
|
||||
CookLogCreatedByToJSON,
|
||||
} from './CookLogCreatedBy';
|
||||
import type { InviteLinkGroup } from './InviteLinkGroup';
|
||||
import {
|
||||
InviteLinkGroupFromJSON,
|
||||
InviteLinkGroupFromJSONTyped,
|
||||
InviteLinkGroupToJSON,
|
||||
} from './InviteLinkGroup';
|
||||
import type { ShoppingListEntriesInnerCreatedBy } from './ShoppingListEntriesInnerCreatedBy';
|
||||
import {
|
||||
ShoppingListEntriesInnerCreatedByFromJSON,
|
||||
ShoppingListEntriesInnerCreatedByFromJSONTyped,
|
||||
ShoppingListEntriesInnerCreatedByToJSON,
|
||||
} from './ShoppingListEntriesInnerCreatedBy';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -40,10 +40,10 @@ export interface UserSpace {
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {ShoppingListEntriesInnerCreatedBy}
|
||||
* @type {CookLogCreatedBy}
|
||||
* @memberof UserSpace
|
||||
*/
|
||||
user?: ShoppingListEntriesInnerCreatedBy;
|
||||
user?: CookLogCreatedBy;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -109,7 +109,7 @@ export function UserSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'user': !exists(json, 'user') ? undefined : ShoppingListEntriesInnerCreatedByFromJSON(json['user']),
|
||||
'user': !exists(json, 'user') ? undefined : CookLogCreatedByFromJSON(json['user']),
|
||||
'space': !exists(json, 'space') ? undefined : json['space'],
|
||||
'groups': ((json['groups'] as Array<any>).map(InviteLinkGroupFromJSON)),
|
||||
'active': !exists(json, 'active') ? undefined : json['active'],
|
||||
@@ -129,7 +129,7 @@ export function UserSpaceToJSON(value?: UserSpace | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'user': ShoppingListEntriesInnerCreatedByToJSON(value.user),
|
||||
'user': CookLogCreatedByToJSON(value.user),
|
||||
'groups': ((value.groups as Array<any>).map(InviteLinkGroupToJSON)),
|
||||
'active': value.active,
|
||||
'internal_note': value.internalNote,
|
||||
|
||||
@@ -6,6 +6,7 @@ export * from './Automation';
|
||||
export * from './BookmarkletImport';
|
||||
export * from './BookmarkletImportList';
|
||||
export * from './CookLog';
|
||||
export * from './CookLogCreatedBy';
|
||||
export * from './CustomFilter';
|
||||
export * from './CustomFilterSharedInner';
|
||||
export * from './ExportLog';
|
||||
@@ -77,7 +78,6 @@ export * from './RecipeStepsInnerFile';
|
||||
export * from './RecipeStepsInnerIngredientsInner';
|
||||
export * from './ShoppingList';
|
||||
export * from './ShoppingListEntriesInner';
|
||||
export * from './ShoppingListEntriesInnerCreatedBy';
|
||||
export * from './ShoppingListEntriesInnerRecipeMealplan';
|
||||
export * from './ShoppingListEntry';
|
||||
export * from './ShoppingListEntryBulk';
|
||||
|
||||
Reference in New Issue
Block a user