From acf7607106c469e3cc5b5d73ddc4a9aabb91771c Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sun, 20 Aug 2023 17:57:58 -0500 Subject: [PATCH] run code-generator --- .../use-locales/available-locales.ts | 79 +++++++++------- frontend/lib/api/types/recipe.ts | 6 +- frontend/lib/api/types/response.ts | 9 ++ frontend/lib/api/types/user.ts | 7 +- frontend/nuxt.config.js | 3 + frontend/types/components.d.ts | 2 + mealie/schema/group/__init__.py | 22 ++--- mealie/schema/recipe/__init__.py | 90 +++++++++---------- mealie/schema/response/__init__.py | 8 +- mealie/schema/user/__init__.py | 2 + 10 files changed, 132 insertions(+), 96 deletions(-) diff --git a/frontend/composables/use-locales/available-locales.ts b/frontend/composables/use-locales/available-locales.ts index 7615813fc0aa..b1322df04fca 100644 --- a/frontend/composables/use-locales/available-locales.ts +++ b/frontend/composables/use-locales/available-locales.ts @@ -3,12 +3,12 @@ export const LOCALES = [ { name: "繁體中文 (Chinese traditional)", value: "zh-TW", - progress: 50, + progress: 26, }, { name: "简体中文 (Chinese simplified)", value: "zh-CN", - progress: 41, + progress: 34, }, { name: "Tiếng Việt (Vietnamese)", @@ -18,57 +18,57 @@ export const LOCALES = [ { name: "Українська (Ukrainian)", value: "uk-UA", - progress: 88, + progress: 100, }, { name: "Türkçe (Turkish)", value: "tr-TR", - progress: 41, + progress: 47, }, { name: "Svenska (Swedish)", value: "sv-SE", - progress: 66, + progress: 60, }, { name: "српски (Serbian)", value: "sr-SP", - progress: 8, + progress: 2, }, { name: "Slovenian", value: "sl-SI", - progress: 73, + progress: 47, }, { name: "Slovak", value: "sk-SK", - progress: 78, + progress: 99, }, { name: "Pусский (Russian)", value: "ru-RU", - progress: 49, + progress: 31, }, { name: "Română (Romanian)", value: "ro-RO", - progress: 7, + progress: 12, }, { name: "Português (Portuguese)", value: "pt-PT", - progress: 27, + progress: 69, }, { name: "Português do Brasil (Brazilian Portuguese)", value: "pt-BR", - progress: 31, + progress: 97, }, { name: "Polski (Polish)", value: "pl-PL", - progress: 69, + progress: 99, }, { name: "Norsk (Norwegian)", @@ -78,37 +78,52 @@ export const LOCALES = [ { name: "Nederlands (Dutch)", value: "nl-NL", - progress: 81, + progress: 100, + }, + { + name: "Latvian", + value: "lv-LV", + progress: 0, }, { name: "Lithuanian", value: "lt-LT", - progress: 65, + progress: 99, }, { name: "한국어 (Korean)", value: "ko-KR", - progress: 0, + progress: 3, }, { name: "日本語 (Japanese)", value: "ja-JP", - progress: 0, + progress: 9, }, { name: "Italiano (Italian)", value: "it-IT", - progress: 81, + progress: 98, }, { name: "Magyar (Hungarian)", value: "hu-HU", - progress: 60, + progress: 43, + }, + { + name: "Croatian", + value: "hr-HR", + progress: 100, }, { name: "עברית (Hebrew)", value: "he-IL", - progress: 24, + progress: 99, + }, + { + name: "Galician", + value: "gl-ES", + progress: 0, }, { name: "Français (French)", @@ -118,17 +133,17 @@ export const LOCALES = [ { name: "French, Canada", value: "fr-CA", - progress: 61, + progress: 54, }, { name: "Suomi (Finnish)", value: "fi-FI", - progress: 45, + progress: 31, }, { name: "Español (Spanish)", value: "es-ES", - progress: 70, + progress: 59, }, { name: "American English", @@ -138,46 +153,46 @@ export const LOCALES = [ { name: "British English", value: "en-GB", - progress: 23, + progress: 2, }, { name: "Ελληνικά (Greek)", value: "el-GR", - progress: 51, + progress: 33, }, { name: "Deutsch (German)", value: "de-DE", - progress: 99, + progress: 100, }, { name: "Dansk (Danish)", value: "da-DK", - progress: 76, + progress: 90, }, { name: "Čeština (Czech)", value: "cs-CZ", - progress: 75, + progress: 60, }, { name: "Català (Catalan)", value: "ca-ES", - progress: 69, + progress: 54, }, { name: "Bulgarian", value: "bg-BG", - progress: 25, + progress: 13, }, { name: "العربية (Arabic)", value: "ar-SA", - progress: 18, + progress: 7, }, { name: "Afrikaans (Afrikaans)", value: "af-ZA", - progress: 6, + progress: 0, }, ] diff --git a/frontend/lib/api/types/recipe.ts b/frontend/lib/api/types/recipe.ts index 6b73e604a81d..5ed3126b6b29 100644 --- a/frontend/lib/api/types/recipe.ts +++ b/frontend/lib/api/types/recipe.ts @@ -357,7 +357,7 @@ export interface RecipeTimelineEventCreate { subject: string; eventType: TimelineEventType; eventMessage?: string; - image?: TimelineEventImage; + image?: TimelineEventImage & string; timestamp?: string; } export interface RecipeTimelineEventIn { @@ -366,7 +366,7 @@ export interface RecipeTimelineEventIn { subject: string; eventType: TimelineEventType; eventMessage?: string; - image?: TimelineEventImage; + image?: TimelineEventImage & string; timestamp?: string; } export interface RecipeTimelineEventOut { @@ -375,7 +375,7 @@ export interface RecipeTimelineEventOut { subject: string; eventType: TimelineEventType; eventMessage?: string; - image?: TimelineEventImage; + image?: TimelineEventImage & string; timestamp?: string; id: string; createdAt: string; diff --git a/frontend/lib/api/types/response.ts b/frontend/lib/api/types/response.ts index 0f2c7dab8478..1ce11f11d853 100644 --- a/frontend/lib/api/types/response.ts +++ b/frontend/lib/api/types/response.ts @@ -21,6 +21,15 @@ export interface PaginationQuery { orderBy?: string; orderDirection?: OrderDirection & string; queryFilter?: string; + paginationSeed?: string; +} +export interface RecipeSearchQuery { + cookbook?: string; + requireAllCategories?: boolean; + requireAllTags?: boolean; + requireAllTools?: boolean; + requireAllFoods?: boolean; + search?: string; } export interface SuccessResponse { message: string; diff --git a/frontend/lib/api/types/user.ts b/frontend/lib/api/types/user.ts index d7e6d5dfcb96..6871dbb83afe 100644 --- a/frontend/lib/api/types/user.ts +++ b/frontend/lib/api/types/user.ts @@ -119,6 +119,9 @@ export interface PrivateUser { loginAttemps?: number; lockedAt?: string; } +export interface PasswordResetToken { + token: string; +} export interface PrivatePasswordResetToken { userId: string; token: string; @@ -148,6 +151,7 @@ export interface UnlockResults { export interface UpdateGroup { name: string; id: string; + slug: string; categories?: CategoryBase[]; webhooks?: unknown[]; } @@ -234,6 +238,3 @@ export interface UserIn { export interface ValidateResetToken { token: string; } -export interface PasswordResetToken { - token: string; -} diff --git a/frontend/nuxt.config.js b/frontend/nuxt.config.js index 732d3aaf2335..533448fba486 100644 --- a/frontend/nuxt.config.js +++ b/frontend/nuxt.config.js @@ -158,6 +158,7 @@ export default { i18n: { locales: [ // CODE_GEN_ID: MESSAGE_LOCALES + { code: "lv-LV", file: "lv-LV.json" }, { code: "el-GR", file: "el-GR.json" }, { code: "it-IT", file: "it-IT.json" }, { code: "ko-KR", file: "ko-KR.json" }, @@ -177,12 +178,14 @@ export default { { code: "lt-LT", file: "lt-LT.json" }, { code: "fr-CA", file: "fr-CA.json" }, { code: "pl-PL", file: "pl-PL.json" }, + { code: "hr-HR", file: "hr-HR.json" }, { code: "da-DK", file: "da-DK.json" }, { code: "pt-BR", file: "pt-BR.json" }, { code: "de-DE", file: "de-DE.json" }, { code: "ca-ES", file: "ca-ES.json" }, { code: "sr-SP", file: "sr-SP.json" }, { code: "cs-CZ", file: "cs-CZ.json" }, + { code: "gl-ES", file: "gl-ES.json" }, { code: "fr-FR", file: "fr-FR.json" }, { code: "zh-TW", file: "zh-TW.json" }, { code: "af-ZA", file: "af-ZA.json" }, diff --git a/frontend/types/components.d.ts b/frontend/types/components.d.ts index 4faffb666254..85725e4dd3bd 100644 --- a/frontend/types/components.d.ts +++ b/frontend/types/components.d.ts @@ -18,6 +18,7 @@ import ButtonLink from "@/components/global/ButtonLink.vue"; import ContextMenu from "@/components/global/ContextMenu.vue"; import CrudTable from "@/components/global/CrudTable.vue"; import DevDumpJson from "@/components/global/DevDumpJson.vue"; +import DocLink from "@/components/global/DocLink.vue"; import DropZone from "@/components/global/DropZone.vue"; import HelpIcon from "@/components/global/HelpIcon.vue"; import InputColor from "@/components/global/InputColor.vue"; @@ -57,6 +58,7 @@ declare module "vue" { ContextMenu: typeof ContextMenu; CrudTable: typeof CrudTable; DevDumpJson: typeof DevDumpJson; + DocLink: typeof DocLink; DropZone: typeof DropZone; HelpIcon: typeof HelpIcon; InputColor: typeof InputColor; diff --git a/mealie/schema/group/__init__.py b/mealie/schema/group/__init__.py index 18cb0f97226e..3e7d86ae3e46 100644 --- a/mealie/schema/group/__init__.py +++ b/mealie/schema/group/__init__.py @@ -45,7 +45,15 @@ from .invite_token import CreateInviteToken, EmailInitationResponse, EmailInvita from .webhook import CreateWebhook, ReadWebhook, SaveWebhook, WebhookPagination, WebhookType __all__ = [ - "GroupAdminUpdate", + "CreateGroupPreferences", + "ReadGroupPreferences", + "UpdateGroupPreferences", + "GroupDataExport", + "CreateWebhook", + "ReadWebhook", + "SaveWebhook", + "WebhookPagination", + "WebhookType", "GroupEventNotifierCreate", "GroupEventNotifierOptions", "GroupEventNotifierOptionsOut", @@ -55,13 +63,8 @@ __all__ = [ "GroupEventNotifierSave", "GroupEventNotifierUpdate", "GroupEventPagination", - "GroupDataExport", "DataMigrationCreate", "SupportedMigrations", - "SetPermissions", - "CreateGroupPreferences", - "ReadGroupPreferences", - "UpdateGroupPreferences", "SeederConfig", "ShoppingListAddRecipeParams", "ShoppingListCreate", @@ -85,6 +88,8 @@ __all__ = [ "ShoppingListSave", "ShoppingListSummary", "ShoppingListUpdate", + "GroupAdminUpdate", + "SetPermissions", "GroupStatistics", "GroupStorage", "CreateInviteToken", @@ -92,9 +97,4 @@ __all__ = [ "EmailInvitation", "ReadInviteToken", "SaveInviteToken", - "CreateWebhook", - "ReadWebhook", - "SaveWebhook", - "WebhookPagination", - "WebhookType", ] diff --git a/mealie/schema/recipe/__init__.py b/mealie/schema/recipe/__init__.py index b080b81b2ec5..4c4f8c69c0df 100644 --- a/mealie/schema/recipe/__init__.py +++ b/mealie/schema/recipe/__init__.py @@ -84,27 +84,29 @@ from .recipe_tool import RecipeToolCreate, RecipeToolOut, RecipeToolResponse, Re from .request_helpers import RecipeDuplicate, RecipeSlug, RecipeZipTokenResponse, SlugResponse, UpdateImageResponse __all__ = [ - "CreateRecipe", - "CreateRecipeBulk", - "CreateRecipeByUrlBulk", - "Recipe", - "RecipeCategory", - "RecipeCategoryPagination", - "RecipeLastMade", - "RecipePagination", - "RecipeSummary", - "RecipeTag", - "RecipeTagPagination", - "RecipeTool", - "RecipeToolPagination", + "RecipeToolCreate", + "RecipeToolOut", + "RecipeToolResponse", + "RecipeToolSave", + "RecipeTimelineEventCreate", + "RecipeTimelineEventIn", + "RecipeTimelineEventOut", + "RecipeTimelineEventPagination", + "RecipeTimelineEventUpdate", + "TimelineEventImage", + "TimelineEventType", "RecipeAsset", - "AssignCategories", - "AssignSettings", - "AssignTags", - "DeleteRecipes", - "ExportBase", - "ExportRecipes", - "ExportTypes", + "RecipeSettings", + "RecipeShareToken", + "RecipeShareTokenCreate", + "RecipeShareTokenSave", + "RecipeShareTokenSummary", + "RecipeDuplicate", + "RecipeSlug", + "RecipeZipTokenResponse", + "SlugResponse", + "UpdateImageResponse", + "RecipeNote", "CategoryBase", "CategoryIn", "CategoryOut", @@ -121,7 +123,17 @@ __all__ = [ "RecipeCommentSave", "RecipeCommentUpdate", "UserBase", + "AssignCategories", + "AssignSettings", + "AssignTags", + "DeleteRecipes", + "ExportBase", + "ExportRecipes", + "ExportTypes", + "IngredientReferences", + "RecipeStep", "RecipeImageTypes", + "Nutrition", "CreateIngredientFood", "CreateIngredientUnit", "IngredientConfidence", @@ -140,31 +152,19 @@ __all__ = [ "SaveIngredientFood", "SaveIngredientUnit", "UnitFoodBase", - "RecipeNote", - "Nutrition", + "CreateRecipe", + "CreateRecipeBulk", + "CreateRecipeByUrlBulk", + "Recipe", + "RecipeCategory", + "RecipeCategoryPagination", + "RecipeLastMade", + "RecipePagination", + "RecipeSummary", + "RecipeTag", + "RecipeTagPagination", + "RecipeTool", + "RecipeToolPagination", "ScrapeRecipe", "ScrapeRecipeTest", - "RecipeSettings", - "RecipeShareToken", - "RecipeShareTokenCreate", - "RecipeShareTokenSave", - "RecipeShareTokenSummary", - "IngredientReferences", - "RecipeStep", - "RecipeTimelineEventCreate", - "RecipeTimelineEventIn", - "RecipeTimelineEventOut", - "RecipeTimelineEventPagination", - "RecipeTimelineEventUpdate", - "TimelineEventImage", - "TimelineEventType", - "RecipeToolCreate", - "RecipeToolOut", - "RecipeToolResponse", - "RecipeToolSave", - "RecipeDuplicate", - "RecipeSlug", - "RecipeZipTokenResponse", - "SlugResponse", - "UpdateImageResponse", ] diff --git a/mealie/schema/response/__init__.py b/mealie/schema/response/__init__.py index a9a7b36333b9..fc5cab6378eb 100644 --- a/mealie/schema/response/__init__.py +++ b/mealie/schema/response/__init__.py @@ -1,6 +1,7 @@ # This file is auto-generated by gen_schema_exports.py -from .pagination import OrderDirection, PaginationBase, PaginationQuery -from .query_filter import LogicalOperator, QueryFilter, QueryFilterComponent, RelationalOperator +from .pagination import OrderDirection, PaginationBase, PaginationQuery, RecipeSearchQuery +from .query_filter import LogicalOperator, QueryFilter, QueryFilterComponent, RelationalKeyword, RelationalOperator +from .query_search import SearchFilter from .responses import ErrorResponse, FileTokenResponse, SuccessResponse from .validation import ValidationResponse @@ -8,12 +9,15 @@ __all__ = [ "ErrorResponse", "FileTokenResponse", "SuccessResponse", + "SearchFilter", "LogicalOperator", "QueryFilter", "QueryFilterComponent", + "RelationalKeyword", "RelationalOperator", "OrderDirection", "PaginationBase", "PaginationQuery", + "RecipeSearchQuery", "ValidationResponse", ] diff --git a/mealie/schema/user/__init__.py b/mealie/schema/user/__init__.py index d4cabec9f418..9600df2f1a54 100644 --- a/mealie/schema/user/__init__.py +++ b/mealie/schema/user/__init__.py @@ -21,6 +21,7 @@ from .user import ( ) from .user_passwords import ( ForgotPassword, + PasswordResetToken, PrivatePasswordResetToken, ResetPassword, SavePasswordResetToken, @@ -49,6 +50,7 @@ __all__ = [ "UserOut", "UserPagination", "ForgotPassword", + "PasswordResetToken", "PrivatePasswordResetToken", "ResetPassword", "SavePasswordResetToken",