mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
Merge remote-tracking branch 'upstream/feature/vue3' into feature/vue3
This commit is contained in:
@@ -11,15 +11,19 @@
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.2.96",
|
||||
"@types/luxon": "^3.4.2",
|
||||
"@vueform/multiselect": "^2.6.7",
|
||||
"@vueform/vueform": "^1.9.2",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"luxon": "^3.4.4",
|
||||
"mavon-editor": "^3.0.1",
|
||||
"pinia": "^2.1.7",
|
||||
"vue": "^3.4.15",
|
||||
"vue-i18n": "9",
|
||||
"vue-multiselect": "^3.0.0-beta.3",
|
||||
"vue-router": "4",
|
||||
"vue-simple-calendar": "^7.1.0",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuetify": "^3.5.10"
|
||||
"vuetify": "^3.5.16"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.5.1",
|
||||
|
||||
@@ -1,41 +1,49 @@
|
||||
<template>
|
||||
<v-app >
|
||||
<v-app>
|
||||
|
||||
<v-app-bar color="tandoor" flat density="comfortable">
|
||||
<router-link :to="{name: 'view_search', params: {}}">
|
||||
<router-link :to="{name: 'view_home', params: {}}">
|
||||
<v-img src="../../assets/brand_logo.svg" width="140px" class="ms-2"></v-img>
|
||||
</router-link>
|
||||
<global-search-dialog></global-search-dialog>
|
||||
<v-spacer></v-spacer>
|
||||
<!-- <v-btn density="compact" icon="fas fa-ellipsis-v"></v-btn>-->
|
||||
<global-search-dialog></global-search-dialog>
|
||||
<v-avatar color="cyan" class="me-2">V</v-avatar>
|
||||
</v-app-bar>
|
||||
|
||||
|
||||
<v-main>
|
||||
<router-view></router-view>
|
||||
</v-main>
|
||||
|
||||
<v-bottom-navigation grow>
|
||||
<v-btn value="recent" to="/search">
|
||||
<v-icon icon="fas fa-book"/>
|
||||
<v-navigation-drawer v-if="lgAndUp">
|
||||
<v-list-item title="My Application" subtitle="Vuetify"></v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<v-list-item prepend-icon="fas fa-book" title="Home" :to="{name: 'view_home', params: {}}"></v-list-item>
|
||||
<v-list-item prepend-icon="fas fa-calendar-alt" title="Mealplan" :to="{name: 'view_mealplan', params: {}}"></v-list-item>
|
||||
<v-list-item prepend-icon="fas fa-shopping-cart" title="Shopping" :to="{name: 'view_shopping', params: {}}"></v-list-item>
|
||||
<v-list-item prepend-icon="fas fa-bars" title="More" :to="{name: 'view_books', params: {}}"></v-list-item> <!-- TODO link -->
|
||||
</v-navigation-drawer>
|
||||
|
||||
<v-bottom-navigation grow v-if="!lgAndUp">
|
||||
<v-btn value="recent" :to="{name: 'view_home', params: {}}">
|
||||
<v-icon icon="fa-fw fas fa-book "/>
|
||||
<span>Recipes</span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn value="favorites" to="/mealplan">
|
||||
<v-icon icon="fas fa-calendar-alt"></v-icon>
|
||||
<v-icon icon="fa-fw fas fa-calendar-alt"></v-icon>
|
||||
|
||||
<span>MealPlan</span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn value="nearby" to="/shopping">
|
||||
<v-icon icon="fas fa-shopping-cart"></v-icon>
|
||||
<v-icon icon="fa-fw fas fa-shopping-cart"></v-icon>
|
||||
|
||||
<span>Shopping</span>
|
||||
</v-btn>
|
||||
<v-btn value="nearby" to="/books">
|
||||
<v-icon icon="fas fa-book-open"></v-icon>
|
||||
<v-btn value="nearby" to="/books"> <!-- TODO link -->
|
||||
<v-icon icon="fa-fw fas fa-bars"></v-icon>
|
||||
|
||||
<span>Books</span>
|
||||
<span>More</span>
|
||||
</v-btn>
|
||||
</v-bottom-navigation>
|
||||
|
||||
@@ -43,26 +51,18 @@
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script lang="ts" setup>
|
||||
|
||||
import {defineComponent} from 'vue'
|
||||
import GlobalSearchDialog from "@/components/inputs/GlobalSearchDialog.vue";
|
||||
import {ref} from "vue";
|
||||
import {useDisplay} from "vuetify";
|
||||
|
||||
export default defineComponent({
|
||||
components: {GlobalSearchDialog},
|
||||
mixins: [],
|
||||
data() {
|
||||
return {
|
||||
drawer: true,
|
||||
rail: true,
|
||||
overlay: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const {lgAndUp} = useDisplay()
|
||||
|
||||
const drawer = ref(true)
|
||||
const rail = ref(true)
|
||||
const overlay = ref(false)
|
||||
|
||||
},
|
||||
methods: {},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,15 +8,18 @@ import mavonEditor from 'mavon-editor'
|
||||
import 'vite/modulepreload-polyfill';
|
||||
import vuetify from "@/vuetify";
|
||||
import ShoppingListPage from "@/pages/ShoppingListPage.vue";
|
||||
import RecipeSearchPage from "@/pages/RecipeSearchPage.vue";
|
||||
import StartPage from "@/pages/StartPage.vue";
|
||||
import RecipeViewPage from "@/pages/RecipeViewPage.vue";
|
||||
import luxonPlugin from "@/plugins/luxonPlugin";
|
||||
import RecipeEditPage from "@/pages/RecipeEditPage.vue";
|
||||
import MealPlanPage from "@/pages/MealPlanPage.vue";
|
||||
import Vueform from '@vueform/vueform'
|
||||
import vueform from '@/vueform'
|
||||
import SearchPage from "@/pages/SearchPage.vue";
|
||||
|
||||
const routes = [
|
||||
{path: '/', redirect: '/search', name: 'index'},
|
||||
{path: '/search', component: RecipeSearchPage, name: 'view_search'},
|
||||
{path: '/', component: StartPage, name: 'view_home'},
|
||||
{path: '/search', component: SearchPage, name: 'view_search'},
|
||||
{path: '/shopping', component: ShoppingListPage, name: 'view_shopping'},
|
||||
{path: '/mealplan', component: MealPlanPage, name: 'view_mealplan'},
|
||||
{path: '/books', component: ShoppingListPage, name: 'view_books'},
|
||||
@@ -25,8 +28,7 @@ const routes = [
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
// 4. Provide the history implementation to use. We
|
||||
// are using the hash history for simplicity here.
|
||||
// TODO configure proper history mode
|
||||
history: createWebHashHistory(),
|
||||
routes,
|
||||
})
|
||||
@@ -37,6 +39,7 @@ app.use(createPinia())
|
||||
app.use(vuetify)
|
||||
app.use(router)
|
||||
app.use(luxonPlugin)
|
||||
app.use(Vueform, vueform)
|
||||
app.use(mavonEditor) // TODO only use on pages that need it
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
299
vue3/src/assets/vueform.css
Normal file
299
vue3/src/assets/vueform.css
Normal file
@@ -0,0 +1,299 @@
|
||||
:root, :before, :after, * {
|
||||
--vf-primary: #b98766;
|
||||
--vf-primary-darker: #b55e4f;
|
||||
--vf-danger: #a7240e;
|
||||
--vf-danger-lighter: #eaaa21;
|
||||
--vf-success: #82aa8b;
|
||||
--vf-success-lighter: #385f84;
|
||||
|
||||
--vf-ring-width: 0;
|
||||
--vf-ring-color: #673AB766;
|
||||
|
||||
--vf-gray-50: #FAFAFA;
|
||||
--vf-gray-100: #F5F5F5;
|
||||
--vf-gray-200: #EEEEEE;
|
||||
--vf-gray-300: #E0E0E0;
|
||||
--vf-gray-400: #BDBDBD;
|
||||
--vf-gray-500: #9E9E9E;
|
||||
--vf-gray-600: #757575;
|
||||
--vf-gray-700: #616161;
|
||||
--vf-gray-800: #424242;
|
||||
--vf-gray-900: #212121;
|
||||
|
||||
--vf-font-size: 1rem;
|
||||
--vf-font-size-sm: 0.875rem;
|
||||
--vf-font-size-lg: 1rem;
|
||||
|
||||
--vf-font-size-small: 0.875rem;
|
||||
--vf-font-size-small-sm: 0.75rem;
|
||||
--vf-font-size-small-lg: 0.875rem;
|
||||
|
||||
--vf-line-height: 1.5rem;
|
||||
--vf-line-height-sm: 1.25rem;
|
||||
--vf-line-height-lg: 1.5rem;
|
||||
|
||||
--vf-line-height-small: 1.25rem;
|
||||
--vf-line-height-small-sm: 1.125rem;
|
||||
--vf-line-height-small-lg: 1.25rem;
|
||||
|
||||
--vf-letter-spacing: 0;
|
||||
--vf-letter-spacing-sm: 0;
|
||||
--vf-letter-spacing-lg: 0;
|
||||
|
||||
--vf-letter-spacing-small: 0;
|
||||
--vf-letter-spacing-small-sm: 0;
|
||||
--vf-letter-spacing-small-lg: 0;
|
||||
|
||||
--vf-gutter: 1rem;
|
||||
--vf-gutter-sm: 0.5rem;
|
||||
--vf-gutter-lg: 1rem;
|
||||
|
||||
--vf-min-height-input: 3rem;
|
||||
--vf-min-height-input-sm: 2.125rem;
|
||||
--vf-min-height-input-lg: 3.5rem;
|
||||
|
||||
--vf-py-input: 0.75rem;
|
||||
--vf-py-input-sm: 0.375rem;
|
||||
--vf-py-input-lg: 1rem;
|
||||
|
||||
--vf-px-input: 1rem;
|
||||
--vf-px-input-sm: 0.625rem;
|
||||
--vf-px-input-lg: 1rem;
|
||||
|
||||
--vf-py-btn: 0.375rem;
|
||||
--vf-py-btn-sm: 0.5rem;
|
||||
--vf-py-btn-lg: 0.5rem;
|
||||
|
||||
--vf-px-btn: 1rem;
|
||||
--vf-px-btn-sm: 1rem;
|
||||
--vf-px-btn-lg: 1rem;
|
||||
|
||||
--vf-py-btn-small: calc(var(--vf-py-btn) * 0.75);
|
||||
--vf-py-btn-small-sm: calc(var(--vf-py-btn-sm) * 0.75);
|
||||
--vf-py-btn-small-lg: calc(var(--vf-py-btn-lg) * 0.75);
|
||||
|
||||
--vf-px-btn-small: calc(var(--vf-px-btn) * 0.75);
|
||||
--vf-px-btn-small-sm: calc(var(--vf-px-btn-sm) * 0.75);
|
||||
--vf-px-btn-small-lg: calc(var(--vf-px-btn-lg) * 0.75);
|
||||
|
||||
--vf-py-group-tabs: var(--vf-py-input);
|
||||
--vf-py-group-tabs-sm: var(--vf-py-input-sm);
|
||||
--vf-py-group-tabs-lg: var(--vf-py-input-lg);
|
||||
|
||||
--vf-px-group-tabs: var(--vf-px-input);
|
||||
--vf-px-group-tabs-sm: var(--vf-px-input-sm);
|
||||
--vf-px-group-tabs-lg: var(--vf-px-input-lg);
|
||||
|
||||
--vf-py-group-blocks: 1rem;
|
||||
--vf-py-group-blocks-sm: 0.75rem;
|
||||
--vf-py-group-blocks-lg: 1.25rem;
|
||||
|
||||
--vf-px-group-blocks: 1.25rem;
|
||||
--vf-px-group-blocks-sm: 1rem;
|
||||
--vf-px-group-blocks-lg: 1.5rem;
|
||||
|
||||
--vf-py-tag: 0.1875rem;
|
||||
--vf-py-tag-sm: 0.125rem;
|
||||
--vf-py-tag-lg: 0.1875rem;
|
||||
|
||||
--vf-px-tag: 0.675rem;
|
||||
--vf-px-tag-sm: 0.5rem;
|
||||
--vf-px-tag-lg: 0.75rem;
|
||||
|
||||
--vf-py-slider-tooltip: 0.25rem;
|
||||
--vf-py-slider-tooltip-sm: 0.1875rem;
|
||||
--vf-py-slider-tooltip-lg: 0.3125rem;
|
||||
|
||||
--vf-px-slider-tooltip: 0.5rem;
|
||||
--vf-px-slider-tooltip-sm: 0.375rem;
|
||||
--vf-px-slider-tooltip-lg: 0.625rem;
|
||||
|
||||
// Space between addon and text input
|
||||
--vf-space-addon: 0;
|
||||
--vf-space-addon-sm: var(--vf-space-addon);
|
||||
--vf-space-addon-lg: var(--vf-space-addon);
|
||||
|
||||
// Space between checkboxes & radios and their labels
|
||||
--vf-space-checkbox: 0.5rem;
|
||||
--vf-space-checkbox-sm: 0.5rem;
|
||||
--vf-space-checkbox-lg: 0.625rem;
|
||||
|
||||
// Space between tags in `TagsElement`
|
||||
--vf-space-tags: 0.1875rem;
|
||||
--vf-space-tags-sm: var(--vf-space-tags);
|
||||
--vf-space-tags-lg: 0.3125rem;
|
||||
|
||||
// Space between the field's top and floating label
|
||||
--vf-floating-top: 0.75rem;
|
||||
--vf-floating-top-sm: 0rem;
|
||||
--vf-floating-top-lg: 0.875rem;
|
||||
|
||||
--vf-bg-input: var(--vf-gray-100);
|
||||
--vf-bg-input-hover: #ececec;
|
||||
--vf-bg-input-focus: #dcdcdc;
|
||||
--vf-bg-input-danger: var(--vf-bg-input);
|
||||
--vf-bg-input-success: var(--vf-bg-input);
|
||||
--vf-bg-checkbox: var(--vf-bg-input);
|
||||
--vf-bg-checkbox-hover: var(--vf-bg-input-hover);
|
||||
--vf-bg-checkbox-focus: var(--vf-bg-input-focus);
|
||||
--vf-bg-checkbox-danger: var(--vf-bg-input-danger);
|
||||
--vf-bg-checkbox-success: var(--vf-bg-input-success);
|
||||
--vf-bg-disabled: var(--vf-gray-50);
|
||||
--vf-bg-selected: rgba(17,24,39,0.05); // Used eg. when select option is hovered or a checkbox is selected in `blocks` view
|
||||
--vf-bg-passive: var(--vf-gray-300); // Used as a background color for eg. slider, toggle
|
||||
--vf-bg-icon: var(--vf-gray-700);
|
||||
--vf-bg-danger: var(--vf-danger-lighter);
|
||||
--vf-bg-success: var(--vf-success-lighter);
|
||||
--vf-bg-tag: var(--vf-primary);
|
||||
--vf-bg-slider-handle: var(--vf-primary);
|
||||
--vf-bg-toggle-handle: #ffffff;
|
||||
--vf-bg-date-head: var(--vf-gray-100);
|
||||
--vf-bg-addon: transparent;
|
||||
--vf-bg-btn: var(--vf-primary);
|
||||
--vf-bg-btn-danger: var(--vf-danger);
|
||||
--vf-bg-btn-secondary: var(--vf-gray-200);
|
||||
|
||||
--vf-color-input: var(--vf-gray-900);
|
||||
--vf-color-input-focus: var(--vf-color-input);
|
||||
--vf-color-input-hover: var(--vf-color-input);
|
||||
--vf-color-input-danger: var(--vf-color-input);
|
||||
--vf-color-input-success: var(--vf-color-input);
|
||||
--vf-color-disabled: #AFAFAF;
|
||||
--vf-color-placeholder: rgba(0,0,0,.6);
|
||||
--vf-color-passive: var(--vf-gray-700); // Used when text is displayed on passive background eg. `off` toggle
|
||||
--vf-color-muted: rgba(0,0,0,.6); // Used for helper texts eg. element description, floating label
|
||||
--vf-color-floating: var(--vf-color-muted);
|
||||
--vf-color-floating-focus: var(--vf-primary); // Used when the input is focused
|
||||
--vf-color-floating-success: var(--vf-success); // Used when the input is filled with success
|
||||
--vf-color-floating-danger: var(--vf-danger); // Used when the input has error
|
||||
--vf-color-on-primary: #ffffff; // Used when text is displayed on primary color
|
||||
--vf-color-danger: var(--vf-danger);
|
||||
--vf-color-success: var(--vf-success);
|
||||
--vf-color-tag: var(--vf-color-on-primary);
|
||||
--vf-color-addon: var(--vf-color-input);
|
||||
--vf-color-date-head: var(--vf-gray-700);
|
||||
--vf-color-btn: var(--vf-color-on-primary);
|
||||
--vf-color-btn-danger: #ffffff;
|
||||
--vf-color-btn-secondary: var(--vf-gray-700);
|
||||
|
||||
--vf-border-color-input: var(--vf-gray-600);
|
||||
--vf-border-color-input-focus: var(--vf-primary);
|
||||
--vf-border-color-input-hover: var(--vf-border-color-input);
|
||||
--vf-border-color-input-danger: var(--vf-danger);
|
||||
--vf-border-color-input-success: var(--vf-border-color-input);
|
||||
--vf-border-color-checkbox: var(--vf-border-color-input);
|
||||
--vf-border-color-checkbox-focus: var(--vf-border-color-input-hover);
|
||||
--vf-border-color-checkbox-hover: var(--vf-border-color-input-focus);
|
||||
--vf-border-color-checkbox-danger: var(--vf-border-color-input-danger);
|
||||
--vf-border-color-checkbox-success: var(--vf-border-color-input-success);
|
||||
--vf-border-color-checked: var(--vf-primary);
|
||||
--vf-border-color-passive: var(--vf-gray-300); // Used as a border for passive states eg. `off` toggle
|
||||
--vf-border-color-slider-tooltip: var(--vf-primary);
|
||||
--vf-border-color-tag: var(--vf-primary);
|
||||
--vf-border-color-btn: var(--vf-primary);
|
||||
--vf-border-color-btn-danger: var(--vf-danger);
|
||||
--vf-border-color-btn-secondary: var(--vf-gray-200);
|
||||
|
||||
--vf-border-width-input-t: 0px;
|
||||
--vf-border-width-input-r: 0px;
|
||||
--vf-border-width-input-b: 1px;
|
||||
--vf-border-width-input-l: 0px;
|
||||
|
||||
--vf-border-width-radio-t: 2px;
|
||||
--vf-border-width-radio-r: 2px;
|
||||
--vf-border-width-radio-b: 2px;
|
||||
--vf-border-width-radio-l: 2px;
|
||||
|
||||
--vf-border-width-checkbox-t: 2px;
|
||||
--vf-border-width-checkbox-r: 2px;
|
||||
--vf-border-width-checkbox-b: 2px;
|
||||
--vf-border-width-checkbox-l: 2px;
|
||||
|
||||
--vf-border-width-dropdown: 0px;
|
||||
--vf-border-width-toggle: 0.25rem;
|
||||
--vf-border-width-btn: 1px;
|
||||
--vf-border-width-tag: 1px;
|
||||
|
||||
--vf-shadow-input: 0px 0px 0px 0px rgba(0,0,0,0);
|
||||
--vf-shadow-input-hover: 0px 0px 0px 0px rgba(0,0,0,0);
|
||||
--vf-shadow-input-focus: 0px 0px 0px 0px rgba(0,0,0,0);
|
||||
--vf-shadow-handles: 0px 0px 0px 0px rgba(0,0,0,0);
|
||||
--vf-shadow-handles-hover: 0px 0px 0px 9px rgba(0,0,0,0.15);
|
||||
--vf-shadow-handles-focus: 0px 0px 0px 9px rgba(0,0,0,0.15);
|
||||
--vf-shadow-btn: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%);
|
||||
--vf-shadow-dropdown: 0 4px 6px 0 rgb(32 33 36 / 28%);
|
||||
|
||||
--vf-radius-input: 0.25rem 0.25rem 0 0;
|
||||
--vf-radius-input-sm: var(--vf-radius-input);
|
||||
--vf-radius-input-lg: var(--vf-radius-input);
|
||||
|
||||
--vf-radius-btn: 0.25rem;
|
||||
--vf-radius-btn-sm: 0.25rem;
|
||||
--vf-radius-btn-lg: 0.25rem;
|
||||
|
||||
// Used for eg. list button, slider tooltip, info tooltip
|
||||
--vf-radius-small: 0.125rem;
|
||||
--vf-radius-small-sm: 0.125rem;
|
||||
--vf-radius-small-lg: 0.125rem;
|
||||
|
||||
// Used for larger inputs eg. textarea, editor, drag and drop, checkbox/radio blocks
|
||||
--vf-radius-large: 0.5rem 0.5rem 0 0;
|
||||
--vf-radius-large-sm: 0.5rem 0.5rem 0 0;
|
||||
--vf-radius-large-lg: 0.5rem 0.5rem 0 0;
|
||||
|
||||
--vf-radius-tag: 999px;
|
||||
--vf-radius-tag-sm: 999px;
|
||||
--vf-radius-tag-lg: 999px;
|
||||
|
||||
--vf-radius-checkbox: 0.25rem;
|
||||
--vf-radius-checkbox-sm: 0.25rem;
|
||||
--vf-radius-checkbox-lg: 0.25rem;
|
||||
|
||||
--vf-radius-slider: 1rem;
|
||||
--vf-radius-slider-sm: 1rem;
|
||||
--vf-radius-slider-lg: 1rem;
|
||||
|
||||
--vf-radius-image: 0.25rem 0.25rem 0 0;
|
||||
--vf-radius-image-sm: 0.25rem 0.25rem 0 0;
|
||||
--vf-radius-image-lg: 0.25rem 0.25rem 0 0;
|
||||
|
||||
--vf-radius-gallery: 0.25rem 0.25rem 0 0;
|
||||
--vf-radius-gallery-sm: 0.25rem 0.25rem 0 0;
|
||||
--vf-radius-gallery-lg: 0.25rem 0.25rem 0 0;
|
||||
|
||||
--vf-checkbox-size: 1rem;
|
||||
--vf-checkbox-size-sm: 0.9375rem;
|
||||
--vf-checkbox-size-lg: 1.125rem;
|
||||
|
||||
--vf-gallery-size: 6rem;
|
||||
--vf-gallery-size-sm: 5rem;
|
||||
--vf-gallery-size-lg: 7rem;
|
||||
|
||||
--vf-toggle-width: 3rem;
|
||||
--vf-toggle-width-sm: 2.75rem;
|
||||
--vf-toggle-width-lg: 3rem;
|
||||
|
||||
--vf-toggle-height: 1rem;
|
||||
--vf-toggle-height-sm: 1.125rem;
|
||||
--vf-toggle-height-lg: 1.25rem;
|
||||
|
||||
--vf-slider-height: 0.375rem;
|
||||
--vf-slider-height-sm: 0.3125rem;
|
||||
--vf-slider-height-lg: 0.4375rem;
|
||||
|
||||
--vf-slider-height-vertical: 20rem;
|
||||
--vf-slider-height-vertical-sm: var(--vf-slider-height-vertical);
|
||||
--vf-slider-height-vertical-lg: var(--vf-slider-height-vertical);
|
||||
|
||||
--vf-slider-handle-size: 1.25rem;
|
||||
--vf-slider-handle-size-sm: var(--vf-slider-handle-size);
|
||||
--vf-slider-handle-size-lg: 1.4375rem;
|
||||
|
||||
--vf-slider-tooltip-distance: 0.625rem;
|
||||
--vf-slider-tooltip-distance-sm: var(--vf-slider-tooltip-distance);
|
||||
--vf-slider-tooltip-distance-lg: var(--vf-slider-tooltip-distance);
|
||||
|
||||
--vf-slider-tooltip-arrow-size: 0.375rem;
|
||||
--vf-slider-tooltip-arrow-size-sm: var(--vf-slider-tooltip-arrow-size);
|
||||
--vf-slider-tooltip-arrow-size-lg: var(--vf-slider-tooltip-arrow-size);
|
||||
}
|
||||
127
vue3/src/components/dialogs/MealPlanDialog.vue
Normal file
127
vue3/src/components/dialogs/MealPlanDialog.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<v-dialog activator="parent" v-model="dialog">
|
||||
<template v-slot:default="{ isActive }">
|
||||
<v-card style="overflow: auto">
|
||||
<v-card-title>Meal Plan Edit <i class="mt-2 float-right fas fa-times" @click="isActive.value = false"></i></v-card-title>
|
||||
<v-divider></v-divider>
|
||||
<v-card-text>
|
||||
<v-form>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field label="Title"></v-text-field>
|
||||
<v-text-field label="From Date" type="date"></v-text-field>
|
||||
<v-text-field label="Meal Type"></v-text-field>
|
||||
<v-number-input control-variant="split" :min="0"></v-number-input>
|
||||
<v-text-field label="Share"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<Multiselect
|
||||
name="recipe"
|
||||
:columns="{ sm: 12, md : 6}"
|
||||
label="Recipe"
|
||||
label-prop="name"
|
||||
value-prop="id"
|
||||
:object="true"
|
||||
:strict="false"
|
||||
:search="true"
|
||||
:items="recipeSearch"
|
||||
:delay="300"
|
||||
rules="required"
|
||||
></Multiselect>
|
||||
<v-text-field label="To Date" type="date"></v-text-field>
|
||||
<recipe-card :recipe="mutableMealPlan.recipe" v-if="mutableMealPlan && mutableMealPlan.recipe"></recipe-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-textarea label="Note"></v-textarea>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-btn color="error">
|
||||
Delete
|
||||
</v-btn>
|
||||
<v-btn color="success" class="ml-auto" @click="saveMealPlan">
|
||||
Save
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {onMounted, PropType, ref, watchEffect} from "vue";
|
||||
import {ApiApi, MealPlan, RecipeOverview} from "@/openapi";
|
||||
import {DateTime} from "luxon";
|
||||
import RecipeCard from "@/components/display/RecipeCard.vue";
|
||||
import {useMealPlanStore} from "@/stores/MealPlanStore";
|
||||
import {VNumberInput} from 'vuetify/labs/VNumberInput' //TODO remove once component is out of labs
|
||||
import Multiselect from '@vueform/multiselect'
|
||||
|
||||
const props = defineProps(
|
||||
{
|
||||
mealPlan: {type: Object as PropType<MealPlan>, required: false},
|
||||
}
|
||||
)
|
||||
|
||||
const dialog = ref(false)
|
||||
let mutableMealPlan = ref(props.mealPlan)
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.mealPlan != undefined) {
|
||||
mutableMealPlan.value = props.mealPlan
|
||||
|
||||
} else {
|
||||
mutableMealPlan.value = newMealPlan()
|
||||
}
|
||||
});
|
||||
|
||||
function saveMealPlan() {
|
||||
|
||||
if (mutableMealPlan.value != undefined) {
|
||||
mutableMealPlan.value.recipe = mutableMealPlan.value.recipe as RecipeOverview
|
||||
console.log('calling save method')
|
||||
useMealPlanStore().createOrUpdate(mutableMealPlan.value).catch(err => {
|
||||
// TODO handle error
|
||||
}).finally(() => {
|
||||
dialog.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function newMealPlan() {
|
||||
return {
|
||||
fromDate: DateTime.now().toJSDate(),
|
||||
toDate: DateTime.now().toJSDate(),
|
||||
} as MealPlan
|
||||
}
|
||||
|
||||
async function mealTypeSearch(searchQuery: string) {
|
||||
console.log('called search')
|
||||
const api = new ApiApi()
|
||||
return await api.apiMealTypeList()
|
||||
}
|
||||
|
||||
async function shareUserSearch(searchQuery: string) {
|
||||
console.log('called su search')
|
||||
const api = new ApiApi()
|
||||
return await api.apiUserList()
|
||||
}
|
||||
|
||||
async function recipeSearch(searchQuery: string) {
|
||||
console.log('called recipe search')
|
||||
const api = new ApiApi()
|
||||
return (await api.apiRecipeList({query: searchQuery})).results
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style src="@vueform/multiselect/themes/default.css"></style>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -19,7 +19,10 @@
|
||||
{{ mealPlanGridItem.date_label }}
|
||||
</div>
|
||||
<div class="align-self-center">
|
||||
<v-btn variant="flat" icon="fas fa-plus" size="small"></v-btn>
|
||||
<v-btn variant="flat" icon="">
|
||||
<i class="fas fa-plus"></i>
|
||||
<meal-plan-dialog></meal-plan-dialog>
|
||||
</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +40,7 @@
|
||||
<v-list-item-subtitle>
|
||||
{{ p.mealType.name }}
|
||||
</v-list-item-subtitle>
|
||||
<meal-plan-dialog :meal-plan="p"></meal-plan-dialog>
|
||||
</v-list-item>
|
||||
|
||||
</v-list>
|
||||
@@ -57,12 +61,15 @@ import {useDisplay} from "vuetify";
|
||||
import {MealPlan, Recipe, RecipeOverview} from "@/openapi";
|
||||
import {useMealPlanStore} from "@/stores/MealPlanStore";
|
||||
import {DateTime} from "luxon";
|
||||
import MealPlanDialog from "@/components/dialogs/MealPlanDialog.vue";
|
||||
import {homePageCols} from "@/utils/breakpoint_utils";
|
||||
|
||||
|
||||
const {mdAndUp} = useDisplay()
|
||||
const loading = ref(false)
|
||||
|
||||
let numberOfCols = computed(() => {
|
||||
return mdAndUp.value ? 5 : 2
|
||||
const {name} = useDisplay()
|
||||
return homePageCols(name.value)
|
||||
})
|
||||
|
||||
type MealPlanGridItem = {
|
||||
@@ -75,19 +82,17 @@ type MealPlanGridItem = {
|
||||
const meal_plan_grid = computed(() => {
|
||||
let grid = [] as MealPlanGridItem[]
|
||||
|
||||
if (useMealPlanStore().plan_list.length > 0) {
|
||||
console.log('found plans')
|
||||
for (const x of Array(4).keys()) {
|
||||
let grid_day_date = DateTime.now().plus({days: x})
|
||||
console.log('going trough days ', x, grid_day_date)
|
||||
grid.push({
|
||||
date: grid_day_date,
|
||||
create_default_date: grid_day_date.toISODate(), // improve meal plan edit modal to do formatting itself and accept dates
|
||||
date_label: grid_day_date.toLocaleString(DateTime.DATE_MED),
|
||||
plan_entries: useMealPlanStore().plan_list.filter((m: MealPlan) => ((DateTime.fromJSDate(m.fromDate).startOf('day') <= grid_day_date.startOf('day')) && (DateTime.fromJSDate((m.toDate != undefined) ? m.toDate : m.fromDate).startOf('day') >= grid_day_date.startOf('day')))),
|
||||
} as MealPlanGridItem)
|
||||
}
|
||||
for (const x of Array(4).keys()) {
|
||||
let grid_day_date = DateTime.now().plus({days: x})
|
||||
console.log('going trough days ', x, grid_day_date)
|
||||
grid.push({
|
||||
date: grid_day_date,
|
||||
create_default_date: grid_day_date.toISODate(), // improve meal plan edit modal to do formatting itself and accept dates
|
||||
date_label: grid_day_date.toLocaleString(DateTime.DATE_MED),
|
||||
plan_entries: useMealPlanStore().plan_list.filter((m: MealPlan) => ((DateTime.fromJSDate(m.fromDate).startOf('day') <= grid_day_date.startOf('day')) && (DateTime.fromJSDate((m.toDate != undefined) ? m.toDate : m.fromDate).startOf('day') >= grid_day_date.startOf('day')))),
|
||||
} as MealPlanGridItem)
|
||||
}
|
||||
|
||||
return grid
|
||||
})
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-row justify="space-between">
|
||||
<v-col>
|
||||
<h2><i v-if="icon != 'undefined'" :class="icon + ' fa-fw'"></i> {{ title }}</h2>
|
||||
<h2><i v-if="icon != 'undefined'" :class="icon + ' fa-fw'"></i> {{ title }}</h2>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</v-row>
|
||||
<v-row v-if="recipeWindows.length == 0 && skeletons > 0">
|
||||
<v-col>
|
||||
<v-window >
|
||||
<v-window>
|
||||
<v-window-item>
|
||||
<v-row>
|
||||
<v-col v-for="n in skeletons">
|
||||
@@ -38,14 +38,14 @@
|
||||
<script lang="ts" setup>
|
||||
import {computed, PropType, toRefs} from 'vue'
|
||||
import RecipeCard from "@/components/display/RecipeCard.vue";
|
||||
import {useDisplay} from "vuetify";
|
||||
import {DisplayBreakpoint, useDisplay} from "vuetify";
|
||||
import {Recipe, RecipeOverview} from "@/openapi";
|
||||
import {homePageCols} from "@/utils/breakpoint_utils";
|
||||
|
||||
const {mdAndUp} = useDisplay()
|
||||
|
||||
const props = defineProps(
|
||||
{
|
||||
title: {type: String as PropType<undefined|String>, required: true},
|
||||
title: {type: String as PropType<undefined | String>, required: true},
|
||||
icon: {type: String, required: false},
|
||||
skeletons: {type: Number, default: 0},
|
||||
recipes: {
|
||||
@@ -57,7 +57,8 @@ const props = defineProps(
|
||||
const {title, recipes} = toRefs(props)
|
||||
|
||||
let numberOfCols = computed(() => {
|
||||
return mdAndUp.value ? 4 : 2
|
||||
const {name} = useDisplay()
|
||||
return homePageCols(name.value)
|
||||
})
|
||||
|
||||
type CustomWindow = {
|
||||
|
||||
@@ -1,44 +1,39 @@
|
||||
<template>
|
||||
<v-table density="compact" v-if="ingredients.length > 0">
|
||||
<v-table density="compact" v-if="props.ingredients.length > 0">
|
||||
|
||||
<tbody>
|
||||
<IngredientsTableRow v-for="i in ingredients" :ingredient="i" :key="i.id" :show-notes="showNotes" :draggable="draggable"></IngredientsTableRow>
|
||||
<IngredientsTableRow v-for="i in props.ingredients" :ingredient="i" :key="i.id" :show-notes="props.showNotes" :draggable="props.draggable"></IngredientsTableRow>
|
||||
</tbody>
|
||||
|
||||
</v-table>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
import {Ingredient, Step} from "@/openapi";
|
||||
<script lang="ts" setup>
|
||||
import {onMounted, PropType, ref} from 'vue'
|
||||
import {Ingredient} from "@/openapi";
|
||||
import IngredientsTableRow from "@/components/display/IngredientsTableRow.vue";
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
export default defineComponent({
|
||||
name: "IngredientsTable",
|
||||
components: {IngredientsTableRow, draggable},
|
||||
props: {
|
||||
ingredients: {
|
||||
type: Array as PropType<Array<Ingredient>>,
|
||||
default: [],
|
||||
},
|
||||
showNotes: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
},
|
||||
const props = defineProps({
|
||||
ingredients: {
|
||||
type: Array as PropType<Array<Ingredient>>,
|
||||
default: [],
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mutable_ingredients: [] as Ingredient[]
|
||||
}
|
||||
showNotes: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
},
|
||||
mounted() {
|
||||
this.mutable_ingredients = this.ingredients
|
||||
}
|
||||
})
|
||||
|
||||
const mutable_ingredients = ref([] as Ingredient[])
|
||||
|
||||
onMounted(() => {
|
||||
mutable_ingredients.value = props.ingredients
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<tr>
|
||||
<template v-if="ingredient.isHeader">
|
||||
<td colspan="4"><b>{{ ingredient.note }}</b></td>
|
||||
<template v-if="props.ingredient.isHeader">
|
||||
<td colspan="4"><b>{{ props.ingredient.note }}</b></td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td>{{ ingredient.amount }}</td>
|
||||
<td><span v-if="ingredient.unit != null">{{ ingredient.unit.name }}</span></td>
|
||||
<td><span v-if="ingredient.food != null">{{ ingredient.food.name }}</span></td>
|
||||
<td v-if="showNotes">
|
||||
<v-icon class="far fa-comment float-right" v-if="ingredient.note != ''" @click="show_tooltip = !show_tooltip">
|
||||
<v-tooltip v-model="show_tooltip" activator="parent" location="start">{{ ingredient.note }}</v-tooltip>
|
||||
<td>{{ props.ingredient.amount }}</td>
|
||||
<td><span v-if="props.ingredient.unit != null">{{ props.ingredient.unit.name }}</span></td>
|
||||
<td><span v-if="props.ingredient.food != null">{{ props.ingredient.food.name }}</span></td>
|
||||
<td v-if="props.showNotes">
|
||||
<v-icon class="far fa-comment float-right" v-if="props.ingredient.note != '' && props.ingredient.note != undefined" @click="showTooltip = !showTooltip">
|
||||
<v-tooltip v-model="showTooltip" activator="parent" location="start">{{ props.ingredient.note }}</v-tooltip>
|
||||
</v-icon>
|
||||
</td>
|
||||
<td v-if="draggable">
|
||||
<td v-if="props.draggable">
|
||||
<i class="fas fa-grip-lines drag-handle cursor-move"></i>
|
||||
</td>
|
||||
</template>
|
||||
@@ -20,32 +20,26 @@
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
<script setup lang="ts">
|
||||
import {PropType, ref} from 'vue'
|
||||
import {Ingredient} from "@/openapi";
|
||||
|
||||
export default defineComponent({
|
||||
name: "IngredientsTableRow",
|
||||
components: {},
|
||||
props: {
|
||||
ingredient: {
|
||||
type: {} as PropType<Ingredient>,
|
||||
required: true
|
||||
},
|
||||
showNotes: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
},
|
||||
const props = defineProps({
|
||||
ingredient: {
|
||||
type: {} as PropType<Ingredient>,
|
||||
required: true
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show_tooltip: false,
|
||||
}
|
||||
showNotes: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
},
|
||||
})
|
||||
|
||||
const showTooltip = ref(false)
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
<template>
|
||||
<div v-if="keywords">
|
||||
<v-chip class="ms-1" :color="color" :size="size" :variant="variant" v-for="k in keywords"> {{ k.label }}</v-chip>
|
||||
<div v-if="props.keywords">
|
||||
<v-chip class="ms-1" :color="props.color" :size="props.size" :variant="props.variant" v-for="k in props.keywords"> {{ k.label }}</v-chip>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script setup lang="ts">
|
||||
|
||||
import {Keyword, KeywordLabel} from "@/openapi";
|
||||
import {PropType} from "vue";
|
||||
|
||||
export default {
|
||||
name: 'KeywordsBar',
|
||||
mixins: [],
|
||||
props: {
|
||||
keywords: Array as PropType<Array<Keyword> | Array<KeywordLabel> | undefined>,
|
||||
size: {type: String, default: 'x-small'},
|
||||
color: {type: String, default: ''},
|
||||
variant: {type: String as PropType<NonNullable<"tonal" | "flat" | "text" | "elevated" | "outlined" | "plain"> | undefined>, default: 'tonal'},
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
const props = defineProps({
|
||||
keywords: Array as PropType<Array<Keyword> | Array<KeywordLabel> | undefined>,
|
||||
size: {type: String, default: 'x-small'},
|
||||
color: {type: String, default: ''},
|
||||
variant: {type: String as PropType<NonNullable<"tonal" | "flat" | "text" | "elevated" | "outlined" | "plain"> | undefined>, default: 'tonal'},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
81
vue3/src/components/display/MealPlanCalendarItem.vue
Normal file
81
vue3/src/components/display/MealPlanCalendarItem.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<v-card class="card cv-item pa-0" hover
|
||||
:style="{'top': itemTop, 'height': itemHeight, 'border-color': mealPlan.mealType.color}"
|
||||
:draggable="true"
|
||||
:key="value.id"
|
||||
@dragstart="emit('onDragStart', value, $event)"
|
||||
:class="value.classes">
|
||||
<v-card-text class="pa-0">
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<div class="flex-column" v-if="detailedItems">
|
||||
<recipe-image :height="itemHeight" :width="itemHeight" :recipe="mealPlan.recipe"></recipe-image>
|
||||
</div>
|
||||
<div class="flex-column flex-grow-0 pa-1">
|
||||
<span class="font-light" :class="{'two-line-text': detailedItems,'one-line-text': !detailedItems,}">
|
||||
<i class="fas fa-shopping-cart fa-xs float-left" v-if="mealPlan.shopping"/>
|
||||
{{ itemTitle }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</v-card-text>
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {computed, PropType} from "vue";
|
||||
import {IMealPlanNormalizedCalendarItem} from "@/types/MealPlan";
|
||||
import RecipeImage from "@/components/display/RecipeImage.vue";
|
||||
|
||||
const emit = defineEmits({
|
||||
onDragStart: (value: IMealPlanNormalizedCalendarItem, event: DragEvent) => {
|
||||
return true
|
||||
},
|
||||
})
|
||||
|
||||
let props = defineProps({
|
||||
value: {type: {} as PropType<IMealPlanNormalizedCalendarItem>, required: true},
|
||||
itemHeight: {type: String,},
|
||||
itemTop: {type: String,},
|
||||
detailedItems: {type: Boolean, default: true}
|
||||
})
|
||||
|
||||
const mealPlan = computed(() => {
|
||||
return props.value.originalItem.mealPlan
|
||||
})
|
||||
|
||||
const itemTitle = computed(() => {
|
||||
if (mealPlan.value.recipe != undefined) {
|
||||
return mealPlan.value.recipe.name
|
||||
} else if (mealPlan.value.title != null && mealPlan.value.title !== "") {
|
||||
return mealPlan.value.title
|
||||
} else {
|
||||
return 'ERROR'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.two-line-text {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.one-line-text {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
274
vue3/src/components/display/MealPlanView.vue
Normal file
274
vue3/src/components/display/MealPlanView.vue
Normal file
@@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<v-row class="h-100">
|
||||
<v-col>
|
||||
<CalendarView
|
||||
:items="planItems"
|
||||
class="theme-default"
|
||||
:item-content-height="calendarItemHeight"
|
||||
:enable-drag-drop="true"
|
||||
@dropOnDate="dropCalendarItemOnDate">
|
||||
<template #header="{ headerProps }">
|
||||
<CalendarViewHeader :header-props="headerProps" />
|
||||
</template>
|
||||
<template #item="{ value, weekStartDate, top }">
|
||||
<meal-plan-calendar-item :item-height="calendarItemHeight" :value="value" :item-top="top" @onDragStart="currentlyDraggedMealplan = value" :detailed-items="lgAndUp"></meal-plan-calendar-item>
|
||||
</template>
|
||||
</CalendarView>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {CalendarView, CalendarViewHeader} from "vue-simple-calendar"
|
||||
import "vue-simple-calendar/dist/style.css"
|
||||
import "vue-simple-calendar/dist/css/default.css"
|
||||
|
||||
import MealPlanCalendarItem from "@/components/display/MealPlanCalendarItem.vue";
|
||||
import {IMealPlanCalendarItem, IMealPlanNormalizedCalendarItem} from "@/types/MealPlan";
|
||||
import {computed, onMounted, ref} from "vue";
|
||||
import {ApiApi, MealPlan} from "@/openapi";
|
||||
import {DateTime} from "luxon";
|
||||
import {useDisplay} from "vuetify";
|
||||
|
||||
const {lgAndUp} = useDisplay()
|
||||
|
||||
const mealPlans = ref([] as MealPlan[])
|
||||
const currentlyDraggedMealplan = ref({} as IMealPlanNormalizedCalendarItem)
|
||||
|
||||
const planItems = computed(() => {
|
||||
let items = [] as IMealPlanCalendarItem[]
|
||||
mealPlans.value.forEach(mp => {
|
||||
items.push({
|
||||
startDate: mp.fromDate,
|
||||
endDate: mp.toDate,
|
||||
id: mp.id,
|
||||
mealPlan: mp,
|
||||
} as IMealPlanCalendarItem)
|
||||
})
|
||||
return items
|
||||
})
|
||||
|
||||
const calendarItemHeight = computed(() => {
|
||||
if (lgAndUp.value) {
|
||||
return '2.6rem'
|
||||
} else {
|
||||
return '1.3rem'
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
let api = new ApiApi()
|
||||
api.apiMealPlanList().then(r => {
|
||||
mealPlans.value = r
|
||||
})
|
||||
})
|
||||
|
||||
function dropCalendarItemOnDate(undefinedItem: IMealPlanNormalizedCalendarItem, targetDate: Date, event: DragEvent) {
|
||||
//The item argument is undefined because our custom calendar item cannot manipulate the calendar state so the item is unknown to the calendar (probably fixable by somehow binding state to the item)
|
||||
mealPlans.value.forEach(mealPlan => {
|
||||
if (mealPlan.id == currentlyDraggedMealplan.value.originalItem.mealPlan.id) {
|
||||
let fromToDiff = DateTime.fromJSDate(mealPlan.toDate).diff(DateTime.fromJSDate(mealPlan.fromDate), 'days')
|
||||
if (event.ctrlKey) {
|
||||
let new_entry = Object.assign({}, mealPlan)
|
||||
new_entry.fromDate = targetDate
|
||||
new_entry.toDate = DateTime.fromJSDate(targetDate).plus(fromToDiff).toJSDate()
|
||||
|
||||
//this.createEntry(new_entry) //TODO implement once API works
|
||||
} else {
|
||||
mealPlan.fromDate = targetDate
|
||||
mealPlan.toDate = DateTime.fromJSDate(targetDate).plus(fromToDiff).toJSDate()
|
||||
console.log(mealPlan.fromDate, mealPlan.toDate)
|
||||
//this.saveEntry(entry) //TODO implement once API works
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
/* TODO remove unused styles */
|
||||
|
||||
.slide-fade-enter-active {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.slide-fade-leave-active {
|
||||
transition: all 0.1s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
|
||||
.slide-fade-enter,
|
||||
.slide-fade-leave-to {
|
||||
transform: translateY(10px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.calender-row {
|
||||
height: calc(100vh - 140px);
|
||||
}
|
||||
|
||||
.calender-parent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.cv-item {
|
||||
white-space: inherit !important;
|
||||
padding: 0;
|
||||
border-radius: 3px !important;
|
||||
}
|
||||
|
||||
|
||||
.isHovered {
|
||||
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
|
||||
}
|
||||
|
||||
.cv-day.draghover {
|
||||
box-shadow: inset 0 0 0.2em 0.2em rgb(221, 191, 134) !important;
|
||||
}
|
||||
|
||||
.modal-backdrop {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/*
|
||||
**************************************************************
|
||||
This theme is the default shipping theme, it includes some
|
||||
decent defaults, but is separate from the calendar component
|
||||
to make it easier for users to implement their own themes w/o
|
||||
having to override as much.
|
||||
**************************************************************
|
||||
*/
|
||||
|
||||
/* Header */
|
||||
|
||||
.theme-default .cv-header,
|
||||
.theme-default .cv-header-day {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.theme-default .cv-header .periodLabel {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
/* Grid */
|
||||
|
||||
.theme-default .cv-weeknumber {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #ccc;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.theme-default .cv-weeknumber span {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.theme-default .cv-day.past {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.theme-default .cv-day.outsideOfMonth {
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.theme-default .cv-day.today {
|
||||
background-color: #ffe;
|
||||
}
|
||||
|
||||
.theme-default .cv-day[aria-selected] {
|
||||
background-color: #ffc;
|
||||
}
|
||||
|
||||
/* Events */
|
||||
|
||||
.theme-default .cv-item {
|
||||
border-color: #e0e0f0;
|
||||
border-radius: 0.5em;
|
||||
background-color: #fff;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.theme-default .cv-item.purple {
|
||||
background-color: #f0e0ff;
|
||||
border-color: #e7d7f7;
|
||||
}
|
||||
|
||||
.theme-default .cv-item.orange {
|
||||
background-color: #ffe7d0;
|
||||
border-color: #f7e0c7;
|
||||
}
|
||||
|
||||
.theme-default .cv-item.continued::before,
|
||||
.theme-default .cv-item.toBeContinued::after {
|
||||
/*
|
||||
removed because it breaks a line and would increase item size https://github.com/TandoorRecipes/recipes/issues/2678
|
||||
content: " \21e2 ";
|
||||
color: #999;
|
||||
*/
|
||||
content: "";
|
||||
}
|
||||
|
||||
.theme-default .cv-item.toBeContinued {
|
||||
border-right-style: none;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.theme-default .cv-item.isHovered.hasUrl {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.theme-default .cv-item.continued {
|
||||
border-left-style: none;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.cv-item.span3,
|
||||
.cv-item.span4,
|
||||
.cv-item.span5,
|
||||
.cv-item.span6,
|
||||
.cv-item.span7 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Event Times */
|
||||
|
||||
.theme-default .cv-item .startTime,
|
||||
.theme-default .cv-item .endTime {
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Drag and drop */
|
||||
|
||||
.theme-default .cv-day.draghover {
|
||||
box-shadow: inset 0 0 0.2em 0.2em yellow;
|
||||
}
|
||||
|
||||
.ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
|
||||
@media (max-width: 767.9px) {
|
||||
.periodLabel {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.b-calendar-grid-help {
|
||||
padding: 0.25rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,55 +1,105 @@
|
||||
<template>
|
||||
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<h2>Activity</h2>
|
||||
<v-timeline side="end" align="start">
|
||||
<v-timeline-item dot-color="grey" size="xsmall" v-for="c in cook_logs" :key="c.id">
|
||||
<v-card>
|
||||
<v-card-text class="bg-primary"><small>{{ c.createdAt }} by {{ c.createdBy.displayName }}</small></v-card-text>
|
||||
<v-card class="mt-1">
|
||||
<v-card-title>Activity</v-card-title>
|
||||
<v-card-text>
|
||||
|
||||
<v-rating density="compact" size="small" color="tandoor" v-model="c.rating"></v-rating>
|
||||
<span v-if="c.servings != null && c.servings > 0">{{ c.servings }} {{ recipe.servingsText }}</span>
|
||||
<p>
|
||||
{{ c.comment }}
|
||||
</p>
|
||||
</v-card>
|
||||
<v-card v-for="c in cookLogs" :key="c.id" class="mt-1">
|
||||
<v-card-text>
|
||||
<v-rating density="comfortable" size="x-small" color="tandoor" v-model="c.rating"></v-rating>
|
||||
<br/>
|
||||
<span v-if="c.servings != null && c.servings > 0">{{ c.servings }} <span v-if="recipe.servingsText != ''">{{ recipe.servingsText }}</span><span v-else>Servings</span></span> <br/>
|
||||
|
||||
</v-timeline-item>
|
||||
</v-timeline>
|
||||
</v-col>
|
||||
</v-row>
|
||||
{{ c.comment }}
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-subtitle>
|
||||
{{ DateTime.fromJSDate(c.createdAt).toLocaleString(DateTime.DATETIME_SHORT) }} by {{ c.createdBy.displayName }}
|
||||
</v-card-subtitle>
|
||||
</v-card>
|
||||
|
||||
|
||||
<Vueform :endpoint="false" @submit="createCookLog" class="mt-2">
|
||||
<textarea-element name="comment" label="Comment"></textarea-element>
|
||||
<text-element type="number" name="rating" label="Rating" :default="5">
|
||||
<template #addon-before>
|
||||
<v-btn-group class="rounded-0">
|
||||
|
||||
<v-btn color="secondary">-</v-btn>
|
||||
</v-btn-group>
|
||||
</template>
|
||||
<template #addon-after>
|
||||
<v-btn-group class="rounded-0">
|
||||
<v-btn color="primary">+</v-btn>
|
||||
</v-btn-group>
|
||||
</template>
|
||||
</text-element>
|
||||
<text-element type="number" name="servings" label="Servings" :default="recipe.servings">
|
||||
<template #addon-before>
|
||||
<v-btn-group class="rounded-0">
|
||||
|
||||
<v-btn color="secondary">-</v-btn>
|
||||
</v-btn-group>
|
||||
</template>
|
||||
<template #addon-after>
|
||||
<v-btn-group class="rounded-0">
|
||||
<v-btn color="primary">+</v-btn>
|
||||
</v-btn-group>
|
||||
</template>
|
||||
</text-element>
|
||||
<button-element name="submit" :submits="true" button-label="Submit"></button-element>
|
||||
</Vueform>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
import {ApiApi, CookLog, Recipe} from "@/openapi";
|
||||
<script setup lang="ts">
|
||||
|
||||
export default defineComponent({
|
||||
name: "RecipeActivity",
|
||||
props: {
|
||||
recipe: {
|
||||
type: Object as PropType<Recipe>,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cook_logs: [] as CookLog[]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const api = new ApiApi()
|
||||
api.listCookLogs({recipe: this.recipe.id}).then(r => {
|
||||
// TODO pagination
|
||||
this.cook_logs = r.results
|
||||
})
|
||||
import {onMounted, PropType, ref} from "vue";
|
||||
import {ApiApi, CookLog, Recipe} from "@/openapi";
|
||||
import {DateTime} from "luxon";
|
||||
|
||||
const props = defineProps({
|
||||
recipe: {
|
||||
type: Object as PropType<Recipe>,
|
||||
required: true
|
||||
},
|
||||
})
|
||||
|
||||
const cookLogs = ref([] as CookLog[])
|
||||
|
||||
function refreshActivity() {
|
||||
const api = new ApiApi()
|
||||
api.apiCookLogList({recipe: props.recipe.id}).then(r => {
|
||||
// TODO pagination
|
||||
if (r.results) {
|
||||
cookLogs.value = r.results
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function createCookLog(form: any) {
|
||||
const api = new ApiApi()
|
||||
let cookLog = {
|
||||
recipe: props.recipe.id,
|
||||
comment: form.data.comment,
|
||||
servings: form.data.servings,
|
||||
rating: form.data.rating,
|
||||
} as CookLog
|
||||
api.apiCookLogCreate({cookLogRequest: cookLog}).then(r => {
|
||||
console.log('success', r)
|
||||
}).catch(err => {
|
||||
console.log('error', err)
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
refreshActivity()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,62 +1,68 @@
|
||||
<template>
|
||||
<template v-if="!loading">
|
||||
<v-card :to="`/recipe/${recipe.id}`" :style="{'height': height}">
|
||||
<template v-if="!componentProps.loading">
|
||||
<v-card :to="`/recipe/${componentProps.recipe.id}`" :style="{'height': componentProps.height}">
|
||||
<v-tooltip
|
||||
class="align-center justify-center"
|
||||
location="top center" origin="overlap"
|
||||
no-click-animation
|
||||
:open-on-hover="recipe.description != null && recipe.description != ''"
|
||||
:open-on-hover="componentProps.recipe.description != null && componentProps.recipe.description != ''"
|
||||
contained
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-img cover
|
||||
height="60%"
|
||||
:src="recipeImageUrl"
|
||||
<recipe-image
|
||||
height="60%"
|
||||
width="100%"
|
||||
:recipe="componentProps.recipe"
|
||||
>
|
||||
<v-chip size="x-small" prepend-icon="fa fa-clock" label color="light" variant="elevated"
|
||||
class="float-start ms-1 mt-1" v-if="recipe.workingTime != undefined && recipe.workingTime > 0">
|
||||
{{ recipe.workingTime }}
|
||||
</v-chip>
|
||||
<v-chip size="x-small" prepend-icon="fa fa-pause" label color="secondary" variant="elevated"
|
||||
class="float-start ms-1 mt-1" v-if="recipe.waitingTime != undefined && recipe.waitingTime > 0">
|
||||
{{ recipe.waitingTime }}
|
||||
</v-chip>
|
||||
</v-img>
|
||||
<v-divider class="p-0" v-if="recipe.image == null"></v-divider>
|
||||
<template #overlay>
|
||||
<v-chip size="x-small" prepend-icon="fa fa-clock" label color="light" variant="elevated"
|
||||
class="float-start ms-1 mt-1" v-if="componentProps.recipe.workingTime != undefined && componentProps.recipe.workingTime > 0">
|
||||
{{ recipe.workingTime }}
|
||||
</v-chip>
|
||||
<v-chip size="x-small" prepend-icon="fa fa-pause" label color="secondary" variant="elevated"
|
||||
class="float-start ms-1 mt-1" v-if="componentProps.recipe.waitingTime != undefined && componentProps.recipe.waitingTime > 0">
|
||||
{{ recipe.waitingTime }}
|
||||
</v-chip>
|
||||
|
||||
<keywords-component variant="flat" :keywords="componentProps.recipe.keywords"></keywords-component>
|
||||
</template>
|
||||
</recipe-image>
|
||||
|
||||
<v-divider class="p-0" v-if="componentProps.recipe.image == null"></v-divider>
|
||||
|
||||
</template>
|
||||
<div v-if="recipe.description != null && recipe.description != ''">
|
||||
{{ recipe.description }}
|
||||
<div v-if="componentProps.recipe.description != null && componentProps.recipe.description != ''">
|
||||
{{ componentProps.recipe.description }}
|
||||
</div>
|
||||
</v-tooltip>
|
||||
|
||||
<v-card-item>
|
||||
<v-card-title>
|
||||
{{ recipe.name }}
|
||||
<recipe-context-menu class="float-end" :recipe="recipe"></recipe-context-menu>
|
||||
|
||||
{{ componentProps.recipe.name }}
|
||||
<recipe-context-menu class="float-end" :recipe="recipe"></recipe-context-menu>
|
||||
</v-card-title>
|
||||
<v-card-subtitle>by {{ componentProps.recipe.createdBy }}</v-card-subtitle>
|
||||
|
||||
|
||||
<v-card-subtitle v-if="show_keywords">
|
||||
<KeywordsComponent :keywords="recipe.keywords"></KeywordsComponent>
|
||||
</v-card-subtitle>
|
||||
<v-rating
|
||||
v-if="recipe.rating != null"
|
||||
v-model="recipe.rating"
|
||||
color="amber"
|
||||
density="comfortable"
|
||||
half-increments
|
||||
readonly
|
||||
size="x-small"
|
||||
></v-rating>
|
||||
<!-- <v-card-subtitle v-if="show_keywords">-->
|
||||
<!-- <keywords-component :keywords="recipe.keywords"></keywords-component>-->
|
||||
<!-- </v-card-subtitle>-->
|
||||
<!-- <v-rating-->
|
||||
<!-- v-if="recipe.rating != null"-->
|
||||
<!-- v-model="recipe.rating"-->
|
||||
<!-- color="amber"-->
|
||||
<!-- density="comfortable"-->
|
||||
<!-- half-increments-->
|
||||
<!-- readonly-->
|
||||
<!-- size="x-small"-->
|
||||
<!-- ></v-rating>-->
|
||||
|
||||
</v-card-item>
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-card :style="{'height': height}">
|
||||
<v-card :style="{'height': componentProps.height}">
|
||||
<v-img src="../../assets/recipe_no_image.svg" cover height="60%"></v-img>
|
||||
<v-card-title>
|
||||
<v-skeleton-loader type="heading"></v-skeleton-loader>
|
||||
@@ -70,29 +76,22 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
<script setup lang="ts">
|
||||
import {PropType} from 'vue'
|
||||
import KeywordsComponent from "@/components/display/KeywordsBar.vue";
|
||||
import {Recipe, RecipeOverview} from "@/openapi";
|
||||
import recipeNoImage from '@/assets/recipe_no_image.svg';
|
||||
import RecipeContextMenu from "@/components/inputs/RecipeContextMenu.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "RecipeCard",
|
||||
components: {RecipeContextMenu, KeywordsComponent},
|
||||
props: {
|
||||
recipe: {type: {} as PropType<Recipe | RecipeOverview>, required: true,},
|
||||
loading: {type: Boolean, required: false},
|
||||
show_keywords: {type: Boolean, required: false},
|
||||
show_description: {type: Boolean, required: false},
|
||||
height: {type: String, required: false, default: '25vh'},
|
||||
},
|
||||
computed: {
|
||||
recipeImageUrl: function () {
|
||||
return (this.recipe.image != null) ? this.recipe.image : recipeNoImage
|
||||
}
|
||||
}
|
||||
import RecipeContextMenu from "@/components/inputs/RecipeContextMenu.vue";
|
||||
import RecipeImage from "@/components/display/RecipeImage.vue";
|
||||
|
||||
const componentProps = defineProps({
|
||||
recipe: {type: {} as PropType<Recipe | RecipeOverview>, required: true,},
|
||||
loading: {type: Boolean, required: false},
|
||||
show_keywords: {type: Boolean, required: false},
|
||||
show_description: {type: Boolean, required: false},
|
||||
height: {type: String, required: false, default: '25vh'},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
39
vue3/src/components/display/RecipeImage.vue
Normal file
39
vue3/src/components/display/RecipeImage.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<v-img :cover="cover" :style="{'height': height, 'width': width,}" :src="image" alt="Recipe Image">
|
||||
<slot name="overlay">
|
||||
|
||||
</slot>
|
||||
</v-img>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {computed, PropType, watch} from "vue";
|
||||
import {Recipe, RecipeOverview} from "@/openapi";
|
||||
import recipeDefaultImage from '../../assets/recipe_no_image.svg'
|
||||
|
||||
const props = defineProps({
|
||||
recipe: {type: {} as PropType<Recipe | RecipeOverview | undefined>, required: false, default: undefined},
|
||||
height: {type: String},
|
||||
width: {type: String},
|
||||
cover: {type: Boolean, default: true}
|
||||
})
|
||||
|
||||
const image = computed(() => {
|
||||
|
||||
if (props.recipe != undefined && props.recipe.image != undefined) {
|
||||
return props.recipe.image
|
||||
} else {
|
||||
return recipeDefaultImage
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.recipe, () => {
|
||||
console.log('changed')
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,47 +1,44 @@
|
||||
<template>
|
||||
|
||||
<template v-if="recipe.name != undefined">
|
||||
<template v-if="props.recipe.name != undefined">
|
||||
|
||||
<v-card class="mt-md-4 rounded-0">
|
||||
<recipe-image
|
||||
max-height="25vh"
|
||||
:recipe="props.recipe"
|
||||
>
|
||||
<template #overlay>
|
||||
<v-chip class="ms-2" color="primary" variant="flat" size="x-small">by {{ props.recipe.createdBy }}</v-chip>
|
||||
<KeywordsComponent variant="flat" class="ms-1 mb-2" :keywords="props.recipe.keywords"></KeywordsComponent>
|
||||
</template>
|
||||
</recipe-image>
|
||||
|
||||
<v-card class="mt-md-4">
|
||||
|
||||
<v-img max-height="25vh" cover lazy :src="recipe.image" v-if="recipe.image != undefined" class="align-end">
|
||||
<KeywordsComponent variant="flat" class="ms-1 mb-2" :keywords="recipe.keywords"></KeywordsComponent>
|
||||
</v-img>
|
||||
|
||||
<v-card>
|
||||
<v-sheet class="d-flex align-center">
|
||||
<span class="ps-2 text-h5 text-truncate flex-grow-1">{{ recipe.name }}</span>
|
||||
<span class="ps-2 text-h5 flex-grow-1" :class="{'text-truncate': !showFullRecipeName}" @click="showFullRecipeName = !showFullRecipeName">{{ props.recipe.name }}</span>
|
||||
<recipe-context-menu :recipe="recipe"></recipe-context-menu>
|
||||
</v-sheet>
|
||||
</v-card>
|
||||
|
||||
<!-- <v-card class="mt-1">-->
|
||||
<!-- <v-sheet class="d-flex ">-->
|
||||
<!-- <span class="ps-2 text-h5 flex-grow-1">{{ recipe.name }}</span>-->
|
||||
<!-- <recipe-context-menu :recipe="recipe"></recipe-context-menu>-->
|
||||
<!-- </v-sheet>-->
|
||||
<!-- </v-card>-->
|
||||
|
||||
</v-card>
|
||||
|
||||
<v-card class="mt-1">
|
||||
<v-container>
|
||||
<v-row class="text-center text-body-2">
|
||||
<v-col class="pt-1 pb-1">
|
||||
<i class="fas fa-cogs"></i> {{ recipe.workingTime }} min<br/>
|
||||
<i class="fas fa-cogs fa-fw mr-1"></i> {{ props.recipe.workingTime }} min<br/>
|
||||
<div class="text-grey">Working Time</div>
|
||||
</v-col>
|
||||
<v-col class="pt-1 pb-1">
|
||||
<div><i class="fas fa-hourglass-half"></i> {{ recipe.waitingTime }} min</div>
|
||||
<div><i class="fas fa-hourglass-half fa-fw mr-1"></i> {{ props.recipe.waitingTime }} min</div>
|
||||
<div class="text-grey">Waiting Time</div>
|
||||
</v-col>
|
||||
<v-col class="pt-1 pb-1">
|
||||
<NumberScalerDialog :number="servings" @change="servings = $event.number" title="Servings">
|
||||
<template #activator>
|
||||
<div class="cursor-pointer">
|
||||
<i class="fas fa-calendar-alt"></i> {{ servings }} <br/>
|
||||
<div class="text-grey"><span v-if="recipe?.servingsText">{{ recipe.servingsText }}</span><span v-else>Servings</span></div>
|
||||
<i class="fas fa-sort-numeric-up fa-fw mr-1"></i> {{ servings }} <br/>
|
||||
<div class="text-grey"><span v-if="props.recipe?.servingsText">{{ props.recipe.servingsText }}</span><span v-else>Servings</span></div>
|
||||
</div>
|
||||
</template>
|
||||
</NumberScalerDialog>
|
||||
@@ -50,21 +47,21 @@
|
||||
</v-container>
|
||||
</v-card>
|
||||
|
||||
<v-card class="mt-1" v-if="recipe.steps.length > 1">
|
||||
<StepsOverview :steps="recipe.steps"></StepsOverview>
|
||||
<v-card class="mt-1" v-if="props.recipe.steps.length > 1">
|
||||
<StepsOverview :steps="props.recipe.steps"></StepsOverview>
|
||||
</v-card>
|
||||
|
||||
<v-card class="mt-1" v-for="s in recipe.steps" :key="s.id">
|
||||
<Step :step="s" :ingredient_factor="ingredient_factor"></Step>
|
||||
<v-card class="mt-1" v-for="(step, index) in props.recipe.steps" :key="step.id">
|
||||
<Step :step="step" :step-number="index+1" :ingredient_factor="ingredientFactor"></Step>
|
||||
</v-card>
|
||||
|
||||
<!-- <RecipeActivity :recipe="recipe"></RecipeActivity>-->
|
||||
<recipe-activity :recipe="recipe"></recipe-activity>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script setup lang="ts">
|
||||
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
import {computed, defineComponent, PropType, ref, watch} from 'vue'
|
||||
import {ApiApi, Ingredient, Recipe} from "@/openapi"
|
||||
import KeywordsBar from "@/components/display/KeywordsBar.vue"
|
||||
import NumberScalerDialog from "@/components/inputs/NumberScalerDialog.vue"
|
||||
@@ -74,38 +71,28 @@ import Step from "@/components/display/Step.vue";
|
||||
import RecipeActivity from "@/components/display/RecipeActivity.vue";
|
||||
import RecipeContextMenu from "@/components/inputs/RecipeContextMenu.vue";
|
||||
import KeywordsComponent from "@/components/display/KeywordsBar.vue";
|
||||
import RecipeImage from "@/components/display/RecipeImage.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "RecipeView",
|
||||
components: {KeywordsComponent, RecipeContextMenu, RecipeActivity, Step, StepsOverview, IngredientsTable, NumberScalerDialog, KeywordsBar},
|
||||
computed: {
|
||||
ingredient_factor: function () {
|
||||
return this.servings / this.recipe.servings
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
servings: 1,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'recipe.servings': function () {
|
||||
if (this.recipe.servings) {
|
||||
this.servings = this.recipe.servings
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
recipe: {
|
||||
type: Object as PropType<Recipe>,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {}
|
||||
const props = defineProps({
|
||||
recipe: {
|
||||
type: Object as PropType<Recipe>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const servings = ref(1)
|
||||
const showFullRecipeName = ref(false)
|
||||
|
||||
const ingredientFactor = computed(() => {
|
||||
return servings.value / ((props.recipe.servings != undefined) ? props.recipe.servings : 1)
|
||||
})
|
||||
|
||||
watch(() => props.recipe.servings, () => {
|
||||
if (props.recipe.servings) {
|
||||
servings.value = props.recipe.servings
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
61
vue3/src/components/display/ShoppingListView.vue
Normal file
61
vue3/src/components/display/ShoppingListView.vue
Normal file
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<v-tabs v-model="currentTab" grow>
|
||||
<v-tab value="shopping"><i class="fas fa-shopping-cart fa-fw"></i> <span class="d-none d-md-block ms-1">Shopping List</span></v-tab>
|
||||
<v-tab value="recipes"><i class="fas fa-book fa-fw"></i> <span class="d-none d-md-block ms-1">Recipes</span></v-tab>
|
||||
</v-tabs>
|
||||
|
||||
<v-window v-model="currentTab">
|
||||
<v-window-item value="shopping">
|
||||
<v-container>
|
||||
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-list lines="two" density="compact">
|
||||
|
||||
<template v-for="category in useShoppingStore().getEntriesByGroup">
|
||||
<v-list-subheader>{{ category.name }}</v-list-subheader>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<template v-for="item in category.foods">
|
||||
<v-list-item>
|
||||
{{ item[1].food.name }}
|
||||
|
||||
<template v-slot:append>
|
||||
<v-btn
|
||||
color="success"
|
||||
icon="fas fa-check"
|
||||
variant="text"
|
||||
></v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</template>
|
||||
</v-list>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-window-item>
|
||||
<v-window-item value="recipes">
|
||||
Recipes
|
||||
</v-window-item>
|
||||
</v-window>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {ref} from "vue";
|
||||
import {useShoppingStore} from "@/stores/ShoppingStore";
|
||||
|
||||
const currentTab = ref("shopping")
|
||||
|
||||
const shoppingStore = useShoppingStore()
|
||||
|
||||
useShoppingStore().refreshFromAPI()
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -2,117 +2,59 @@
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<v-row>
|
||||
<v-col>{{ step.name }}</v-col>
|
||||
<v-col><span v-if="props.step.name">{{ props.step.name }}</span><span v-else>Step {{ props.stepNumber }}</span></v-col>
|
||||
<v-col class="text-right">
|
||||
<v-btn-group density="compact" variant="tonal">
|
||||
<v-btn size="small" color="info" v-if="step.time != undefined && step.time > 0" @click="startTimer(step.time)"><i class="fas fa-stopwatch mr-1"></i> {{ step.time }}</v-btn>
|
||||
<v-btn size="small" color="success"><i class="fas fa-check"></i></v-btn>
|
||||
<v-btn size="small" color="info" v-if="props.step.time != undefined && props.step.time > 0" @click="timerRunning = true"><i class="fas fa-stopwatch mr-1 fa-fw"></i> {{ props.step.time }}</v-btn>
|
||||
<v-btn size="small" color="success" v-if="hasDetails" @click="stepChecked = !stepChecked"><i class="fas fa-fw" :class="{'fa-check': !stepChecked, 'fa-times': stepChecked}"></i></v-btn>
|
||||
</v-btn-group>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-title>
|
||||
<template v-if="!stepChecked">
|
||||
<timer :seconds="props.step.time != undefined ? props.step.time*60 : 0" @stop="timerRunning = false" v-if="timerRunning"></timer>
|
||||
|
||||
<IngredientsTable :ingredients="props.step.ingredients"></IngredientsTable>
|
||||
|
||||
<v-progress-linear v-if="timer_end != null" :model-value="timerProgress" color="success" height="5">
|
||||
<v-card-text v-if="props.step.instructionsMarkdown.length > 0">
|
||||
<instructions :instructions_html="props.step.instructionsMarkdown" :ingredient_factor="ingredient_factor"></instructions>
|
||||
</v-card-text>
|
||||
</template>
|
||||
|
||||
</v-progress-linear>
|
||||
<v-alert :color="timer_color" closable @click:close="timer_end = null">
|
||||
<v-alert-title><i class="fas fa-stopwatch mr-1"></i> {{ remaining_time }}</v-alert-title>
|
||||
Finished at {{ finished_at }}
|
||||
<template #close>
|
||||
<v-btn-group divided>
|
||||
<v-btn width="40" @click="subTimer"><i class="fas fa-minus"></i>1</v-btn>
|
||||
<v-btn width="40" @click="addTimer"><i class="fas fa-plus"></i>1</v-btn>
|
||||
<v-btn width="40"><i class="fas fa-pause"></i></v-btn>
|
||||
<v-btn width="40"><i class="fas fa-stop"></i></v-btn>
|
||||
</v-btn-group>
|
||||
</template>
|
||||
</v-alert>
|
||||
|
||||
<IngredientsTable :ingredients="step.ingredients"></IngredientsTable>
|
||||
|
||||
<v-card-text v-if="step.instructionsMarkdown.length > 0">
|
||||
<instructions :instructions_html="step.instructionsMarkdown" :ingredient_factor="ingredient_factor"></instructions>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
<script setup lang="ts">
|
||||
import {computed, defineComponent, PropType, ref} from 'vue'
|
||||
import IngredientsTable from "@/components/display/IngredientsTable.vue";
|
||||
import {Step} from "@/openapi";
|
||||
import {DateTime, Duration, Interval} from "luxon";
|
||||
|
||||
import Instructions from "@/components/display/Instructions.vue";
|
||||
import Timer from "@/components/display/Timer.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Step",
|
||||
computed: {
|
||||
timer_color: function () {
|
||||
if (this.timer_end != null) {
|
||||
if (this.time_now > this.timer_end) {
|
||||
return 'warning'
|
||||
}
|
||||
}
|
||||
return ''
|
||||
},
|
||||
timerProgress: function () {
|
||||
if (this.timer_end != null && this.timer_start != null && this.step.time != undefined) {
|
||||
return (Interval.fromDateTimes(this.timer_start, this.time_now).length('seconds') / (this.step.time * 60)) * 100
|
||||
}
|
||||
return 0
|
||||
},
|
||||
remaining_time: function () {
|
||||
if (this.timer_end != null) {
|
||||
return Duration.fromMillis(Interval.fromDateTimes(this.time_now, this.timer_end).length()).toFormat('hh:mm:ss')
|
||||
}
|
||||
return ''
|
||||
},
|
||||
finished_at: function () {
|
||||
if (this.timer_end != null) {
|
||||
return this.timer_end.toLocaleString(DateTime.TIME_SIMPLE)
|
||||
}
|
||||
return ''
|
||||
}
|
||||
const props = defineProps({
|
||||
step: {
|
||||
type: {} as PropType<Step>,
|
||||
required: true,
|
||||
},
|
||||
components: {Instructions, IngredientsTable},
|
||||
props: {
|
||||
step: {
|
||||
type: {} as PropType<Step>,
|
||||
required: true,
|
||||
},
|
||||
ingredient_factor: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
stepNumber: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer_end: null as null | DateTime,
|
||||
timer_start: null as null | DateTime,
|
||||
time_now: DateTime.now(),
|
||||
}
|
||||
ingredient_factor: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
mounted() {
|
||||
setInterval(() => {
|
||||
this.time_now = DateTime.now()
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
startTimer(minutes: number) {
|
||||
this.timer_start = DateTime.now()
|
||||
this.timer_end = DateTime.now().plus({minutes: minutes})
|
||||
},
|
||||
subTimer(){
|
||||
if (this.timer_end != null){
|
||||
this.timer_end = this.timer_end.minus({minutes: 1})
|
||||
}
|
||||
},
|
||||
addTimer(){
|
||||
this.timer_end?.plus({minutes: 1})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const timerRunning = ref(false)
|
||||
const stepChecked = ref(false)
|
||||
|
||||
const hasDetails = computed(() => {
|
||||
return props.step.ingredients.length > 0 || (props.step.instruction != undefined && props.step.instruction.length > 0) || props.step.stepRecipeData != undefined || props.step.file != undefined
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<v-expansion-panel-title><i class="far fa-list-alt fa-fw me-2"></i> Steps Overview</v-expansion-panel-title>
|
||||
<v-expansion-panel-text>
|
||||
<v-container>
|
||||
<v-row v-for="(s, i) in steps">
|
||||
<v-row v-for="(s, i) in props.steps">
|
||||
<v-col class="pa-1">
|
||||
<b v-if="s.showAsHeader">{{ i + 1 }}. {{ s.name }} </b>
|
||||
<IngredientsTable :ingredients="s.ingredients"></IngredientsTable>
|
||||
@@ -18,22 +18,18 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
<script setup lang="ts">
|
||||
import {PropType} from 'vue'
|
||||
import {Step} from "@/openapi";
|
||||
import IngredientsTableRow from "@/components/display/IngredientsTableRow.vue";
|
||||
import IngredientsTable from "@/components/display/IngredientsTable.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "StepsOverview",
|
||||
components: {IngredientsTable, IngredientsTableRow},
|
||||
props: {
|
||||
steps: {
|
||||
type: Array as PropType<Array<Step>>,
|
||||
default: [],
|
||||
},
|
||||
}
|
||||
const props = defineProps({
|
||||
steps: {
|
||||
type: Array as PropType<Array<Step>>,
|
||||
default: [],
|
||||
},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
83
vue3/src/components/display/Timer.vue
Normal file
83
vue3/src/components/display/Timer.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<v-progress-linear :model-value="timerProgress" color="primary" height="5"></v-progress-linear>
|
||||
<v-alert :color="timerColor" class="rounded-0" variant="tonal">
|
||||
<v-alert-title><i class="fas fa-stopwatch mr-1"></i> {{ Duration.fromMillis(durationSeconds * 1000).toFormat('hh:mm:ss') }}</v-alert-title>
|
||||
Finished at {{ DateTime.now().plus({'seconds': durationSeconds}).toLocaleString(DateTime.TIME_SIMPLE) }}
|
||||
<template #close>
|
||||
<v-btn-group divided>
|
||||
<v-btn width="40" @click="changeTimer(-60)"><i class="fas fa-minus"></i>1</v-btn>
|
||||
<v-btn width="40" @click="changeTimer(+60)"><i class="fas fa-plus"></i>1</v-btn>
|
||||
<v-btn width="40" @click="timerRunning = !timerRunning"><i class="fas fa-fw" :class="{'fa-pause': timerRunning, 'fa-play': !timerRunning}"></i></v-btn>
|
||||
<v-btn width="40" @click="stopTimer()"><i class="fas fa-stop"></i></v-btn>
|
||||
</v-btn-group>
|
||||
</template>
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const emit = defineEmits(['stop'])
|
||||
|
||||
import {computed, onMounted, ref} from "vue";
|
||||
import {DateTime, Duration} from "luxon";
|
||||
|
||||
const props = defineProps({
|
||||
seconds: {type: Number, required: true}
|
||||
})
|
||||
|
||||
const initialDurationSeconds = ref(props.seconds)
|
||||
const durationSeconds = ref(initialDurationSeconds.value)
|
||||
const timerRunning = ref(true)
|
||||
|
||||
/**
|
||||
* Change timer color based on if the timer has time left or if its finished
|
||||
*/
|
||||
let timerColor = computed(() => {
|
||||
return (durationSeconds.value > 0) ? 'primary' : 'warning'
|
||||
})
|
||||
|
||||
/**
|
||||
* calculate timer progress based on initial time and remaining time
|
||||
*/
|
||||
const timerProgress = computed(() => {
|
||||
if (initialDurationSeconds.value == 0) {
|
||||
return 100
|
||||
}
|
||||
return (1 - (durationSeconds.value / initialDurationSeconds.value)) * 100
|
||||
})
|
||||
|
||||
/**
|
||||
* lifecycle hook onMounted
|
||||
* start interval running the timer
|
||||
*/
|
||||
onMounted(() => {
|
||||
setInterval(() => {
|
||||
if (timerRunning.value && durationSeconds.value > 0) {
|
||||
durationSeconds.value = durationSeconds.value - 1
|
||||
}
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
/**
|
||||
* utility function to change the timer duration
|
||||
* also changes initial duration to keep progress correct
|
||||
* @param seconds number of seconds to change (positive to add time, negative to remove time)
|
||||
*/
|
||||
function changeTimer(seconds: number) {
|
||||
durationSeconds.value = Math.max(0, durationSeconds.value + seconds)
|
||||
initialDurationSeconds.value = Math.max(0, initialDurationSeconds.value + seconds)
|
||||
}
|
||||
|
||||
/**
|
||||
* stops the timer emitting the stop event and resetting the time to time initially passed via prop so it can be started again
|
||||
*/
|
||||
function stopTimer() {
|
||||
durationSeconds.value = props.seconds
|
||||
initialDurationSeconds.value = props.seconds
|
||||
emit('stop')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -15,7 +15,7 @@
|
||||
<v-card-text class="pb-0">
|
||||
<v-text-field
|
||||
id="id_global_search_input"
|
||||
v-model="search_query"
|
||||
v-model="searchQuery"
|
||||
autocomplete="off"
|
||||
clearable
|
||||
placeholder="Search"
|
||||
@@ -27,7 +27,7 @@
|
||||
<v-divider></v-divider>
|
||||
<!-- search results -->
|
||||
<v-card-text>
|
||||
<v-card :variant="cardVariant(index)" v-for="(item, index) in search_results" hover class="mt-1" @click="selected_result = index" :key="index">
|
||||
<v-card :variant="cardVariant(index)" v-for="(item, index) in searchResults" hover class="mt-1" @click="selectedResult = index" :key="index">
|
||||
<v-card-title @click="goToSelectedRecipe()">
|
||||
<v-avatar v-if="item.image" :image="item.image"></v-avatar>
|
||||
<v-avatar v-else-if="item.recipe_id !== undefined" color="tandoor">{{ item.name.charAt(0) }}</v-avatar>
|
||||
@@ -56,124 +56,120 @@
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script setup lang="ts">
|
||||
|
||||
import {defineComponent} from 'vue'
|
||||
import {computed, defineComponent, onMounted, ref, watch} from 'vue'
|
||||
import {SearchResult} from "@/types/SearchTypes";
|
||||
import {ApiApi, Recipe, RecipeFlat} from "@/openapi";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
export default defineComponent({
|
||||
name: "GlobalSearchDialog",
|
||||
props: {},
|
||||
watch: {
|
||||
dialog: function (newValue) {
|
||||
/**
|
||||
* since dialog has no opened event watch the variable and focus input after delay (nextTick/directly does not work)
|
||||
*/
|
||||
this.search_query = ""
|
||||
setTimeout(() => {
|
||||
if (newValue) {
|
||||
let search = document.getElementById('id_global_search_input')
|
||||
if (search != null) {
|
||||
search.focus()
|
||||
}
|
||||
}
|
||||
}, 20)
|
||||
},
|
||||
search_query: function (newValue) {
|
||||
/**
|
||||
* update selected result if search result length changes due to search_query changes
|
||||
*/
|
||||
if (this.selected_result >= this.search_results.length) {
|
||||
this.selected_result = this.search_results.length - 1
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false,
|
||||
recipes: [] as Recipe[],
|
||||
flat_recipes: [] as RecipeFlat[],
|
||||
search_query: null,
|
||||
selected_result: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
/**
|
||||
* build array of search results
|
||||
* uses custom type to be able to incorporate recent items, plans, books, ... at a later stage
|
||||
*/
|
||||
search_results: function () {
|
||||
let search_results = [] as Array<SearchResult>
|
||||
const router = useRouter()
|
||||
|
||||
if (this.search_query != '' && this.search_query != null) {
|
||||
search_results.push({name: this.search_query, icon: 'fas fa-search', suffix: 'Advanced Search'} as SearchResult)
|
||||
const dialog = ref(false)
|
||||
const recipes = ref([] as Recipe[])
|
||||
const flatRecipes = ref([] as RecipeFlat[])
|
||||
const searchQuery = ref(null as string | null)
|
||||
const selectedResult = ref(0)
|
||||
|
||||
this.flat_recipes.filter(fr => fr.name.toLowerCase().includes(this.search_query.toLowerCase())).slice(0, 10).forEach(r => {
|
||||
search_results.push({name: r.name, image: r.image, recipe_id: r.id} as SearchResult)
|
||||
})
|
||||
} else {
|
||||
// search_results.push({name: 'Recent 1', icon: 'fas fa-history',} as SearchResult)
|
||||
// search_results.push({name: 'Recent 2', icon: 'fas fa-history',} as SearchResult)
|
||||
// search_results.push({name: 'Recent 3', icon: 'fas fa-history',} as SearchResult)
|
||||
/**
|
||||
* build array of search results
|
||||
* uses custom type to be able to incorporate recent items, plans, books, ... at a later stage
|
||||
*/
|
||||
const searchResults = computed(() => {
|
||||
let search_results = [] as Array<SearchResult>
|
||||
|
||||
this.flat_recipes.slice(0, 5).forEach(r => {
|
||||
search_results.push({name: r.name, image: r.image, recipe_id: r.id} as SearchResult)
|
||||
})
|
||||
}
|
||||
if (searchQuery.value != '' && searchQuery.value != null) {
|
||||
search_results.push({name: searchQuery.value, icon: 'fas fa-search', suffix: 'Advanced Search'} as SearchResult)
|
||||
|
||||
return search_results
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// add keyhandlers
|
||||
window.addEventListener('keydown', (e) => {
|
||||
if (this.dialog) {
|
||||
if (e.key == 'ArrowUp') {
|
||||
this.selected_result = Math.max(0, this.selected_result - 1)
|
||||
}
|
||||
if (e.key == 'ArrowDown') {
|
||||
this.selected_result = Math.min(this.search_results.length, this.selected_result + 1)
|
||||
}
|
||||
if (e.key == 'Enter') {
|
||||
this.goToSelectedRecipe()
|
||||
}
|
||||
if (e.key == 'k' && e.ctrlKey) {
|
||||
this.dialog = true
|
||||
e.preventDefault()
|
||||
}
|
||||
}
|
||||
flatRecipes.value.filter(fr => fr.name.toLowerCase().includes(searchQuery.value.toLowerCase())).slice(0, 10).forEach(r => {
|
||||
search_results.push({name: r.name, image: r.image, recipe_id: r.id} as SearchResult)
|
||||
})
|
||||
} else {
|
||||
// search_results.push({name: 'Recent 1', icon: 'fas fa-history',} as SearchResult)
|
||||
// search_results.push({name: 'Recent 2', icon: 'fas fa-history',} as SearchResult)
|
||||
// search_results.push({name: 'Recent 3', icon: 'fas fa-history',} as SearchResult)
|
||||
|
||||
const api = new ApiApi()
|
||||
api.apiRecipeFlatList().then(r => {
|
||||
this.flat_recipes = r
|
||||
flatRecipes.value.slice(0, 5).forEach(r => {
|
||||
search_results.push({name: r.name, image: r.image, recipe_id: r.id} as SearchResult)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* determines the style for selected elements
|
||||
* @param index index of card to determine style for
|
||||
*/
|
||||
cardVariant(index: number) {
|
||||
if (this.selected_result == index) {
|
||||
return 'tonal'
|
||||
} else {
|
||||
return 'elevated'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* open selected recipe
|
||||
*/
|
||||
goToSelectedRecipe() {
|
||||
this.dialog = false
|
||||
let searchResult = this.search_results[this.selected_result]
|
||||
if (searchResult.recipe_id != null) {
|
||||
this.$router.push({name: 'view_recipe', params: {'id': searchResult.recipe_id}})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return search_results
|
||||
|
||||
})
|
||||
|
||||
watch(dialog, (newValue) => {
|
||||
/**
|
||||
* since dialog has no opened event watch the variable and focus input after delay (nextTick/directly does not work)
|
||||
*/
|
||||
searchQuery.value = ""
|
||||
setTimeout(() => {
|
||||
if (newValue) {
|
||||
let search = document.getElementById('id_global_search_input')
|
||||
if (search != null) {
|
||||
search.focus()
|
||||
}
|
||||
}
|
||||
}, 20)
|
||||
})
|
||||
|
||||
watch(searchQuery, () => {
|
||||
/**
|
||||
* update selected result if search result length changes due to search_query changes
|
||||
*/
|
||||
if (selectedResult.value >= searchResults.value.length) {
|
||||
selectedResult.value = searchResults.value.length - 1
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('keydown', (e) => {
|
||||
if (dialog.value) {
|
||||
if (e.key == 'ArrowUp') {
|
||||
selectedResult.value = Math.max(0, selectedResult.value - 1)
|
||||
}
|
||||
if (e.key == 'ArrowDown') {
|
||||
selectedResult.value = Math.min(searchResults.value.length, selectedResult.value + 1)
|
||||
}
|
||||
if (e.key == 'Enter') {
|
||||
goToSelectedRecipe()
|
||||
}
|
||||
} else {
|
||||
if (e.key == 'k' && e.ctrlKey) {
|
||||
e.preventDefault();
|
||||
dialog.value = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const api = new ApiApi()
|
||||
api.apiRecipeFlatList().then(r => {
|
||||
flatRecipes.value = r
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* determines the style for selected elements
|
||||
* @param index index of card to determine style for
|
||||
*/
|
||||
function cardVariant(index: number) {
|
||||
if (selectedResult.value == index) {
|
||||
return 'tonal'
|
||||
} else {
|
||||
return 'elevated'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* open selected recipe
|
||||
*/
|
||||
function goToSelectedRecipe() {
|
||||
dialog.value = false
|
||||
let searchResult = searchResults.value[selectedResult.value]
|
||||
if (searchResult.recipe_id != null) {
|
||||
router.push({name: 'view_recipe', params: {'id': searchResult.recipe_id}})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
<v-card-text>
|
||||
|
||||
<v-number-input v-model="mutable_number" @update:modelValue="updateNumber('set')" control-variant="split" :min="0" >
|
||||
<v-number-input v-model="mutable_number" @update:modelValue="updateNumber('set')" control-variant="split" :min="0">
|
||||
</v-number-input>
|
||||
|
||||
<v-btn-group divided class="d-flex">
|
||||
<v-btn variant="tonal" class="flex-grow-1" @click="updateNumber( 'half')">
|
||||
<v-btn variant="tonal" class="flex-grow-1" @click="updateNumber( 'half')">
|
||||
<i class="fas fa-divide"></i> 2
|
||||
</v-btn>
|
||||
<v-btn variant="tonal" class="flex-grow-1" @click="updateNumber('double')">
|
||||
@@ -34,59 +34,53 @@
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script setup lang="ts">
|
||||
|
||||
import {defineComponent} from 'vue'
|
||||
import {defineComponent, onMounted, ref, watch} from 'vue'
|
||||
import {VNumberInput} from 'vuetify/labs/VNumberInput' //TODO remove once component is out of labs
|
||||
export default defineComponent({
|
||||
name: "NumberScalerDialog",
|
||||
components: {VNumberInput},
|
||||
emits: {
|
||||
change(payload: { number: number }) {
|
||||
return payload
|
||||
}
|
||||
},
|
||||
props: {
|
||||
number: {type: Number, default: 0},
|
||||
title: {type: String, default: 'Number'}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false,
|
||||
mutable_number: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
number: function (newVal) {
|
||||
this.mutable_number = newVal
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.mutable_number = this.number
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* perform given operation on linked number
|
||||
* @param operation update mode
|
||||
*/
|
||||
updateNumber: function (operation: string) {
|
||||
if (operation === 'half') {
|
||||
this.mutable_number = this.number / 2
|
||||
}
|
||||
if (operation === 'double') {
|
||||
this.mutable_number = this.number * 2
|
||||
}
|
||||
if (operation === 'add') {
|
||||
this.mutable_number = this.number + 1
|
||||
}
|
||||
if (operation === 'sub') {
|
||||
this.mutable_number = this.number - 1
|
||||
}
|
||||
|
||||
this.$emit('change', {number: this.mutable_number})
|
||||
}
|
||||
},
|
||||
const emit = defineEmits({
|
||||
change(payload: { number: number }) {
|
||||
return payload
|
||||
}
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
number: {type: Number, default: 0},
|
||||
title: {type: String, default: 'Number'}
|
||||
})
|
||||
|
||||
const dialog = ref(false)
|
||||
const mutable_number = ref(0)
|
||||
|
||||
watch(() => props.number, (newVal) => {
|
||||
mutable_number.value = newVal
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
mutable_number.value = props.number
|
||||
})
|
||||
|
||||
/**
|
||||
* perform given operation on linked number
|
||||
* @param operation update mode
|
||||
*/
|
||||
function updateNumber(operation: string) {
|
||||
if (operation === 'half') {
|
||||
mutable_number.value = props.number / 2
|
||||
}
|
||||
if (operation === 'double') {
|
||||
mutable_number.value = props.number * 2
|
||||
}
|
||||
if (operation === 'add') {
|
||||
mutable_number.value = props.number + 1
|
||||
}
|
||||
if (operation === 'sub') {
|
||||
mutable_number.value = props.number - 1
|
||||
}
|
||||
console.log(operation, mutable_number.value)
|
||||
emit('change', {number: mutable_number.value})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -14,21 +14,19 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, PropType} from 'vue'
|
||||
<script setup lang="ts">
|
||||
import {PropType} from 'vue'
|
||||
import {Recipe, RecipeFlat, RecipeOverview} from "@/openapi";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
export default defineComponent({
|
||||
name: "RecipeContextMenu",
|
||||
props: {
|
||||
recipe: {type: Object as PropType<Recipe | RecipeFlat | RecipeOverview>, required: true}
|
||||
},
|
||||
methods: {
|
||||
openRecipe: function () {
|
||||
this.$router.push({name: 'edit_recipe', params: {recipe_id: this.recipe.id}})
|
||||
}
|
||||
}
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
recipe: {type: Object as PropType<Recipe | RecipeFlat | RecipeOverview>, required: true}
|
||||
})
|
||||
|
||||
function openRecipe() {
|
||||
router.push({name: 'edit_recipe', params: {recipe_id: props.recipe.id}})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -4,30 +4,71 @@ apis/ApiTokenAuthApi.ts
|
||||
apis/index.ts
|
||||
index.ts
|
||||
models/AccessToken.ts
|
||||
models/AccessTokenRequest.ts
|
||||
models/AuthToken.ts
|
||||
models/AuthTokenRequest.ts
|
||||
models/Automation.ts
|
||||
models/AutomationRequest.ts
|
||||
models/AutomationTypeEnum.ts
|
||||
models/BaseUnitEnum.ts
|
||||
models/BookmarkletImport.ts
|
||||
models/BookmarkletImportList.ts
|
||||
models/BookmarkletImportRequest.ts
|
||||
models/ConnectorConfigConfig.ts
|
||||
models/ConnectorConfigConfigRequest.ts
|
||||
models/CookLog.ts
|
||||
models/CookLogRequest.ts
|
||||
models/CustomFilter.ts
|
||||
models/CustomFilterRequest.ts
|
||||
models/DefaultPageEnum.ts
|
||||
models/DeleteEnum.ts
|
||||
models/ExportLog.ts
|
||||
models/ExportLogRequest.ts
|
||||
models/Food.ts
|
||||
models/FoodInheritField.ts
|
||||
models/FoodInheritFieldRequest.ts
|
||||
models/FoodRequest.ts
|
||||
models/FoodShoppingUpdate.ts
|
||||
models/FoodShoppingUpdateRequest.ts
|
||||
models/FoodSimple.ts
|
||||
models/FoodSimpleRequest.ts
|
||||
models/Group.ts
|
||||
models/GroupRequest.ts
|
||||
models/ImportLog.ts
|
||||
models/ImportLogRequest.ts
|
||||
models/Ingredient.ts
|
||||
models/IngredientRequest.ts
|
||||
models/InviteLink.ts
|
||||
models/InviteLinkRequest.ts
|
||||
models/Keyword.ts
|
||||
models/KeywordLabel.ts
|
||||
models/KeywordRequest.ts
|
||||
models/MealPlan.ts
|
||||
models/MealPlanRequest.ts
|
||||
models/MealType.ts
|
||||
models/MealTypeRequest.ts
|
||||
models/MethodEnum.ts
|
||||
models/NutritionInformation.ts
|
||||
models/NutritionInformationRequest.ts
|
||||
models/OpenDataCategory.ts
|
||||
models/OpenDataCategoryRequest.ts
|
||||
models/OpenDataConversion.ts
|
||||
models/OpenDataConversionRequest.ts
|
||||
models/OpenDataFood.ts
|
||||
models/OpenDataFoodProperty.ts
|
||||
models/OpenDataFoodPropertyRequest.ts
|
||||
models/OpenDataFoodRequest.ts
|
||||
models/OpenDataProperty.ts
|
||||
models/OpenDataPropertyRequest.ts
|
||||
models/OpenDataStore.ts
|
||||
models/OpenDataStoreCategory.ts
|
||||
models/OpenDataStoreCategoryRequest.ts
|
||||
models/OpenDataStoreRequest.ts
|
||||
models/OpenDataUnit.ts
|
||||
models/OpenDataUnitRequest.ts
|
||||
models/OpenDataUnitTypeEnum.ts
|
||||
models/OpenDataVersion.ts
|
||||
models/OpenDataVersionRequest.ts
|
||||
models/PaginatedAutomationList.ts
|
||||
models/PaginatedCookLogList.ts
|
||||
models/PaginatedCustomFilterList.ts
|
||||
@@ -43,72 +84,100 @@ models/PaginatedSyncLogList.ts
|
||||
models/PaginatedUnitList.ts
|
||||
models/PaginatedUserSpaceList.ts
|
||||
models/PaginatedViewLogList.ts
|
||||
models/PatchedAccessToken.ts
|
||||
models/PatchedAutomation.ts
|
||||
models/PatchedBookmarkletImport.ts
|
||||
models/PatchedConnectorConfigConfig.ts
|
||||
models/PatchedCookLog.ts
|
||||
models/PatchedCustomFilter.ts
|
||||
models/PatchedExportLog.ts
|
||||
models/PatchedFood.ts
|
||||
models/PatchedImportLog.ts
|
||||
models/PatchedIngredient.ts
|
||||
models/PatchedInviteLink.ts
|
||||
models/PatchedKeyword.ts
|
||||
models/PatchedMealPlan.ts
|
||||
models/PatchedMealType.ts
|
||||
models/PatchedProperty.ts
|
||||
models/PatchedPropertyType.ts
|
||||
models/PatchedRecipe.ts
|
||||
models/PatchedRecipeBook.ts
|
||||
models/PatchedRecipeBookEntry.ts
|
||||
models/PatchedShoppingListEntry.ts
|
||||
models/PatchedShoppingListRecipe.ts
|
||||
models/PatchedSpace.ts
|
||||
models/PatchedStep.ts
|
||||
models/PatchedStorage.ts
|
||||
models/PatchedSupermarket.ts
|
||||
models/PatchedSupermarketCategory.ts
|
||||
models/PatchedSupermarketCategoryRelation.ts
|
||||
models/PatchedSync.ts
|
||||
models/PatchedUnit.ts
|
||||
models/PatchedUnitConversion.ts
|
||||
models/PatchedUser.ts
|
||||
models/PatchedUserPreference.ts
|
||||
models/PatchedUserSpace.ts
|
||||
models/PatchedViewLog.ts
|
||||
models/PatchedAccessTokenRequest.ts
|
||||
models/PatchedAutomationRequest.ts
|
||||
models/PatchedBookmarkletImportRequest.ts
|
||||
models/PatchedConnectorConfigConfigRequest.ts
|
||||
models/PatchedCookLogRequest.ts
|
||||
models/PatchedCustomFilterRequest.ts
|
||||
models/PatchedExportLogRequest.ts
|
||||
models/PatchedFoodRequest.ts
|
||||
models/PatchedImportLogRequest.ts
|
||||
models/PatchedIngredientRequest.ts
|
||||
models/PatchedInviteLinkRequest.ts
|
||||
models/PatchedKeywordRequest.ts
|
||||
models/PatchedMealPlanRequest.ts
|
||||
models/PatchedMealTypeRequest.ts
|
||||
models/PatchedOpenDataCategoryRequest.ts
|
||||
models/PatchedOpenDataConversionRequest.ts
|
||||
models/PatchedOpenDataFoodRequest.ts
|
||||
models/PatchedOpenDataPropertyRequest.ts
|
||||
models/PatchedOpenDataStoreRequest.ts
|
||||
models/PatchedOpenDataUnitRequest.ts
|
||||
models/PatchedOpenDataVersionRequest.ts
|
||||
models/PatchedPropertyRequest.ts
|
||||
models/PatchedPropertyTypeRequest.ts
|
||||
models/PatchedRecipeBookEntryRequest.ts
|
||||
models/PatchedRecipeBookRequest.ts
|
||||
models/PatchedRecipeRequest.ts
|
||||
models/PatchedShoppingListEntryRequest.ts
|
||||
models/PatchedShoppingListRecipeRequest.ts
|
||||
models/PatchedSpaceRequest.ts
|
||||
models/PatchedStepRequest.ts
|
||||
models/PatchedStorageRequest.ts
|
||||
models/PatchedSupermarketCategoryRelationRequest.ts
|
||||
models/PatchedSupermarketCategoryRequest.ts
|
||||
models/PatchedSupermarketRequest.ts
|
||||
models/PatchedSyncRequest.ts
|
||||
models/PatchedUnitConversionRequest.ts
|
||||
models/PatchedUnitRequest.ts
|
||||
models/PatchedUserPreferenceRequest.ts
|
||||
models/PatchedUserRequest.ts
|
||||
models/PatchedUserSpaceRequest.ts
|
||||
models/PatchedViewLogRequest.ts
|
||||
models/Property.ts
|
||||
models/PropertyRequest.ts
|
||||
models/PropertyType.ts
|
||||
models/PropertyTypeRequest.ts
|
||||
models/Recipe.ts
|
||||
models/RecipeBook.ts
|
||||
models/RecipeBookEntry.ts
|
||||
models/RecipeBookEntryRequest.ts
|
||||
models/RecipeBookRequest.ts
|
||||
models/RecipeFlat.ts
|
||||
models/RecipeImage.ts
|
||||
models/RecipeOverview.ts
|
||||
models/RecipeOverviewRequest.ts
|
||||
models/RecipeRequest.ts
|
||||
models/RecipeShoppingUpdate.ts
|
||||
models/RecipeShoppingUpdateRequest.ts
|
||||
models/RecipeSimple.ts
|
||||
models/RecipeSimpleRequest.ts
|
||||
models/ShoppingListEntry.ts
|
||||
models/ShoppingListEntryBulk.ts
|
||||
models/ShoppingListEntryBulkRequest.ts
|
||||
models/ShoppingListEntryRequest.ts
|
||||
models/ShoppingListRecipe.ts
|
||||
models/ShoppingListRecipeRequest.ts
|
||||
models/Space.ts
|
||||
models/SpaceNavTextColorEnum.ts
|
||||
models/SpaceThemeEnum.ts
|
||||
models/Step.ts
|
||||
models/StepRequest.ts
|
||||
models/Storage.ts
|
||||
models/StorageRequest.ts
|
||||
models/Supermarket.ts
|
||||
models/SupermarketCategory.ts
|
||||
models/SupermarketCategoryRelation.ts
|
||||
models/SupermarketCategoryRelationRequest.ts
|
||||
models/SupermarketCategoryRequest.ts
|
||||
models/SupermarketRequest.ts
|
||||
models/Sync.ts
|
||||
models/SyncLog.ts
|
||||
models/SyncRequest.ts
|
||||
models/ThemeEnum.ts
|
||||
models/TypeEnum.ts
|
||||
models/Unit.ts
|
||||
models/UnitConversion.ts
|
||||
models/UnitConversionRequest.ts
|
||||
models/UnitRequest.ts
|
||||
models/User.ts
|
||||
models/UserFile.ts
|
||||
models/UserFileView.ts
|
||||
models/UserFileViewRequest.ts
|
||||
models/UserPreference.ts
|
||||
models/UserPreferenceNavTextColorEnum.ts
|
||||
models/UserRequest.ts
|
||||
models/UserSpace.ts
|
||||
models/ViewLog.ts
|
||||
models/ViewLogRequest.ts
|
||||
models/index.ts
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,6 @@ import {
|
||||
export interface ApiTokenAuthCreateRequest {
|
||||
username: string;
|
||||
password: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,13 +49,6 @@ export class ApiTokenAuthApi extends runtime.BaseAPI {
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['token'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'token',
|
||||
'Required parameter "token" was null or undefined when calling apiTokenAuthCreate().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -89,10 +81,6 @@ export class ApiTokenAuthApi extends runtime.BaseAPI {
|
||||
formParams.append('password', requestParameters['password'] as any);
|
||||
}
|
||||
|
||||
if (requestParameters['token'] != null) {
|
||||
formParams.append('token', requestParameters['token'] as any);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/api-token-auth/`,
|
||||
method: 'POST',
|
||||
|
||||
77
vue3/src/openapi/models/AccessTokenRequest.ts
Normal file
77
vue3/src/openapi/models/AccessTokenRequest.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/* 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 AccessTokenRequest
|
||||
*/
|
||||
export interface AccessTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
expires: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
scope?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AccessTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfAccessTokenRequest(value: object): boolean {
|
||||
if (!('expires' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AccessTokenRequestFromJSON(json: any): AccessTokenRequest {
|
||||
return AccessTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': (new Date(json['expires'])),
|
||||
'scope': json['scope'] == null ? undefined : json['scope'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,18 +19,6 @@ import { mapValues } from '../runtime';
|
||||
* @interface AuthToken
|
||||
*/
|
||||
export interface AuthToken {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthToken
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthToken
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -43,8 +31,6 @@ export interface AuthToken {
|
||||
* Check if a given object implements the AuthToken interface.
|
||||
*/
|
||||
export function instanceOfAuthToken(value: object): boolean {
|
||||
if (!('username' in value)) return false;
|
||||
if (!('password' in value)) return false;
|
||||
if (!('token' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -59,8 +45,6 @@ export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'username': json['username'],
|
||||
'password': json['password'],
|
||||
'token': json['token'],
|
||||
};
|
||||
}
|
||||
@@ -71,8 +55,6 @@ export function AuthTokenToJSON(value?: AuthToken | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
70
vue3/src/openapi/models/AuthTokenRequest.ts
Normal file
70
vue3/src/openapi/models/AuthTokenRequest.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* 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 AuthTokenRequest
|
||||
*/
|
||||
export interface AuthTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthTokenRequest
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthTokenRequest
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AuthTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfAuthTokenRequest(value: object): boolean {
|
||||
if (!('username' in value)) return false;
|
||||
if (!('password' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AuthTokenRequestFromJSON(json: any): AuthTokenRequest {
|
||||
return AuthTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AuthTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'username': json['username'],
|
||||
'password': json['password'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AuthTokenRequestToJSON(value?: AuthTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import type { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import {
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
} from './TypeEnum';
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
} from './AutomationTypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -34,10 +34,10 @@ export interface Automation {
|
||||
readonly id: number;
|
||||
/**
|
||||
*
|
||||
* @type {TypeEnum}
|
||||
* @type {AutomationTypeEnum}
|
||||
* @memberof Automation
|
||||
*/
|
||||
type: TypeEnum;
|
||||
type: AutomationTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -109,7 +109,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'type': TypeEnumFromJSON(json['type']),
|
||||
'type': AutomationTypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
@@ -127,7 +127,7 @@ export function AutomationToJSON(value?: Automation | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
|
||||
132
vue3/src/openapi/models/AutomationRequest.ts
Normal file
132
vue3/src/openapi/models/AutomationRequest.ts
Normal file
@@ -0,0 +1,132 @@
|
||||
/* 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 { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import {
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
} from './AutomationTypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AutomationRequest
|
||||
*/
|
||||
export interface AutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
type: AutomationTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param1?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param2?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param3?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AutomationRequest interface.
|
||||
*/
|
||||
export function instanceOfAutomationRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AutomationRequestFromJSON(json: any): AutomationRequest {
|
||||
return AutomationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': AutomationTypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
'param2': json['param_2'] == null ? undefined : json['param_2'],
|
||||
'param3': json['param_3'] == null ? undefined : json['param_3'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'disabled': json['disabled'] == null ? undefined : json['disabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AutomationRequestToJSON(value?: AutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
'param_2': value['param2'],
|
||||
'param_3': value['param3'],
|
||||
'order': value['order'],
|
||||
'disabled': value['disabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
77
vue3/src/openapi/models/BookmarkletImportRequest.ts
Normal file
77
vue3/src/openapi/models/BookmarkletImportRequest.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/* 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 BookmarkletImportRequest
|
||||
*/
|
||||
export interface BookmarkletImportRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
html: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the BookmarkletImportRequest interface.
|
||||
*/
|
||||
export function instanceOfBookmarkletImportRequest(value: object): boolean {
|
||||
if (!('html' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestFromJSON(json: any): BookmarkletImportRequest {
|
||||
return BookmarkletImportRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkletImportRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'html': json['html'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,12 +37,6 @@ export interface ConnectorConfigConfig {
|
||||
* @memberof ConnectorConfigConfig
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfig
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -104,7 +98,6 @@ export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminato
|
||||
'id': json['id'],
|
||||
'name': json['name'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
|
||||
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
||||
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'],
|
||||
@@ -122,7 +115,6 @@ export function ConnectorConfigConfigToJSON(value?: ConnectorConfigConfig | null
|
||||
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
|
||||
125
vue3/src/openapi/models/ConnectorConfigConfigRequest.ts
Normal file
125
vue3/src/openapi/models/ConnectorConfigConfigRequest.ts
Normal file
@@ -0,0 +1,125 @@
|
||||
/* 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 ConnectorConfigConfigRequest
|
||||
*/
|
||||
export interface ConnectorConfigConfigRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
todoEntity?: string;
|
||||
/**
|
||||
* Is Connector Enabled
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryCreatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryUpdatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryDeletedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ConnectorConfigConfigRequest interface.
|
||||
*/
|
||||
export function instanceOfConnectorConfigConfigRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestFromJSON(json: any): ConnectorConfigConfigRequest {
|
||||
return ConnectorConfigConfigRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorConfigConfigRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
|
||||
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
||||
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'],
|
||||
'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'],
|
||||
'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestToJSON(value?: ConnectorConfigConfigRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
|
||||
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
101
vue3/src/openapi/models/CookLogRequest.ts
Normal file
101
vue3/src/openapi/models/CookLogRequest.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
/* 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 CookLogRequest
|
||||
*/
|
||||
export interface CookLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
recipe: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
rating?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLogRequest interface.
|
||||
*/
|
||||
export function instanceOfCookLogRequest(value: object): boolean {
|
||||
if (!('recipe' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CookLogRequestFromJSON(json: any): CookLogRequest {
|
||||
return CookLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogRequestToJSON(value?: CookLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
'comment': value['comment'],
|
||||
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
93
vue3/src/openapi/models/CustomFilterRequest.ts
Normal file
93
vue3/src/openapi/models/CustomFilterRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* 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 { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface CustomFilterRequest
|
||||
*/
|
||||
export interface CustomFilterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CustomFilterRequest interface.
|
||||
*/
|
||||
export function instanceOfCustomFilterRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
if (!('search' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CustomFilterRequestFromJSON(json: any): CustomFilterRequest {
|
||||
return CustomFilterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'search': json['search'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CustomFilterRequestToJSON(value?: CustomFilterRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'search': value['search'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
117
vue3/src/openapi/models/ExportLogRequest.ts
Normal file
117
vue3/src/openapi/models/ExportLogRequest.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/* 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 ExportLogRequest
|
||||
*/
|
||||
export interface ExportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
exportedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
cacheDuration?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
possiblyNotExpired?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ExportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfExportLogRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ExportLogRequestFromJSON(json: any): ExportLogRequest {
|
||||
return ExportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
|
||||
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
|
||||
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ExportLogRequestToJSON(value?: ExportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'exported_recipes': value['exportedRecipes'],
|
||||
'cache_duration': value['cacheDuration'],
|
||||
'possibly_not_expired': value['possiblyNotExpired'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
110
vue3/src/openapi/models/FoodInheritFieldRequest.ts
Normal file
110
vue3/src/openapi/models/FoodInheritFieldRequest.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface FoodInheritFieldRequest
|
||||
*/
|
||||
export interface FoodInheritFieldRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodInheritFieldRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritFieldRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestFromJSON(json: any): FoodInheritFieldRequest {
|
||||
return FoodInheritFieldRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'field': json['field'] == null ? undefined : json['field'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'field': value['field'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
276
vue3/src/openapi/models/FoodRequest.ts
Normal file
276
vue3/src/openapi/models/FoodRequest.ts
Normal file
@@ -0,0 +1,276 @@
|
||||
/* 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 { FoodInheritFieldRequest } from './FoodInheritFieldRequest';
|
||||
import {
|
||||
FoodInheritFieldRequestFromJSON,
|
||||
FoodInheritFieldRequestFromJSONTyped,
|
||||
FoodInheritFieldRequestToJSON,
|
||||
} from './FoodInheritFieldRequest';
|
||||
import type { FoodSimpleRequest } from './FoodSimpleRequest';
|
||||
import {
|
||||
FoodSimpleRequestFromJSON,
|
||||
FoodSimpleRequestFromJSONTyped,
|
||||
FoodSimpleRequestToJSON,
|
||||
} from './FoodSimpleRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { RecipeSimpleRequest } from './RecipeSimpleRequest';
|
||||
import {
|
||||
RecipeSimpleRequestFromJSON,
|
||||
RecipeSimpleRequestFromJSONTyped,
|
||||
RecipeSimpleRequestToJSON,
|
||||
} from './RecipeSimpleRequest';
|
||||
import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface FoodRequest
|
||||
*/
|
||||
export interface FoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeSimpleRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
recipe?: RecipeSimpleRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
foodOnhand?: string;
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
supermarketCategory?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSimpleRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substitute?: Array<FoodSimpleRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodRequestFromJSON(json: any): FoodRequest {
|
||||
return FoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']),
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']),
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']),
|
||||
'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'],
|
||||
'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array<any>).map(FoodSimpleRequestFromJSON)),
|
||||
'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'],
|
||||
'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodRequestToJSON(value?: FoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'recipe': RecipeSimpleRequestToJSON(value['recipe']),
|
||||
'url': value['url'],
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'fdc_id': value['fdcId'],
|
||||
'food_onhand': value['foodOnhand'],
|
||||
'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']),
|
||||
'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'ignore_shopping': value['ignoreShopping'],
|
||||
'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array<any>).map(FoodSimpleRequestToJSON)),
|
||||
'substitute_siblings': value['substituteSiblings'],
|
||||
'substitute_children': value['substituteChildren'],
|
||||
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,13 +13,6 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@@ -32,26 +25,6 @@ export interface FoodShoppingUpdate {
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
readonly id: number;
|
||||
/**
|
||||
* Amount of food to add to the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
* ID of unit to use for the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
unit?: number;
|
||||
/**
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @type {DeleteEnum}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
_delete: DeleteEnum | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,7 +32,6 @@ export interface FoodShoppingUpdate {
|
||||
*/
|
||||
export function instanceOfFoodShoppingUpdate(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('_delete' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -74,9 +46,6 @@ export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'_delete': DeleteEnumFromJSON(json['delete']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,9 +55,6 @@ export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit': value['unit'],
|
||||
'delete': DeleteEnumToJSON(value['_delete']),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
94
vue3/src/openapi/models/FoodShoppingUpdateRequest.ts
Normal file
94
vue3/src/openapi/models/FoodShoppingUpdateRequest.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
/* 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 { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodShoppingUpdateRequest
|
||||
*/
|
||||
export interface FoodShoppingUpdateRequest {
|
||||
/**
|
||||
* Amount of food to add to the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
* ID of unit to use for the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
unit?: number;
|
||||
/**
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @type {DeleteEnum}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
_delete: DeleteEnum | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodShoppingUpdateRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodShoppingUpdateRequest(value: object): boolean {
|
||||
if (!('_delete' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestFromJSON(json: any): FoodShoppingUpdateRequest {
|
||||
return FoodShoppingUpdateRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'_delete': DeleteEnumFromJSON(json['delete']),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit': value['unit'],
|
||||
'delete': DeleteEnumToJSON(value['_delete']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
77
vue3/src/openapi/models/FoodSimpleRequest.ts
Normal file
77
vue3/src/openapi/models/FoodSimpleRequest.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/* 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 FoodSimpleRequest
|
||||
*/
|
||||
export interface FoodSimpleRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSimpleRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodSimpleRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestFromJSON(json: any): FoodSimpleRequest {
|
||||
return FoodSimpleRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSimpleRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
103
vue3/src/openapi/models/GroupRequest.ts
Normal file
103
vue3/src/openapi/models/GroupRequest.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface GroupRequest
|
||||
*/
|
||||
export interface GroupRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof GroupRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof GroupRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the GroupRequest interface.
|
||||
*/
|
||||
export function instanceOfGroupRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function GroupRequestFromJSON(json: any): GroupRequest {
|
||||
return GroupRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function GroupRequestToJSON(value?: GroupRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
101
vue3/src/openapi/models/ImportLogRequest.ts
Normal file
101
vue3/src/openapi/models/ImportLogRequest.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
/* 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 ImportLogRequest
|
||||
*/
|
||||
export interface ImportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
importedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ImportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfImportLogRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ImportLogRequestFromJSON(json: any): ImportLogRequest {
|
||||
return ImportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ImportLogRequestToJSON(value?: ImportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'imported_recipes': value['importedRecipes'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
156
vue3/src/openapi/models/IngredientRequest.ts
Normal file
156
vue3/src/openapi/models/IngredientRequest.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
/* 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 { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface IngredientRequest
|
||||
*/
|
||||
export interface IngredientRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
food: FoodRequest | null;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
unit: UnitRequest | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
amount: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
isHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
noAmount?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
originalText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
alwaysUsePluralUnit?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
alwaysUsePluralFood?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientRequest interface.
|
||||
*/
|
||||
export function instanceOfIngredientRequest(value: object): boolean {
|
||||
if (!('food' in value)) return false;
|
||||
if (!('unit' in value)) return false;
|
||||
if (!('amount' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function IngredientRequestFromJSON(json: any): IngredientRequest {
|
||||
return IngredientRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestFromJSON(json['food']),
|
||||
'unit': UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'isHeader': json['is_header'] == null ? undefined : json['is_header'],
|
||||
'noAmount': json['no_amount'] == null ? undefined : json['no_amount'],
|
||||
'originalText': json['original_text'] == null ? undefined : json['original_text'],
|
||||
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'],
|
||||
'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientRequestToJSON(value?: IngredientRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'note': value['note'],
|
||||
'order': value['order'],
|
||||
'is_header': value['isHeader'],
|
||||
'no_amount': value['noAmount'],
|
||||
'original_text': value['originalText'],
|
||||
'always_use_plural_unit': value['alwaysUsePluralUnit'],
|
||||
'always_use_plural_food': value['alwaysUsePluralFood'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
116
vue3/src/openapi/models/InviteLinkRequest.ts
Normal file
116
vue3/src/openapi/models/InviteLinkRequest.ts
Normal file
@@ -0,0 +1,116 @@
|
||||
/* 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 { GroupRequest } from './GroupRequest';
|
||||
import {
|
||||
GroupRequestFromJSON,
|
||||
GroupRequestFromJSONTyped,
|
||||
GroupRequestToJSON,
|
||||
} from './GroupRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface InviteLinkRequest
|
||||
*/
|
||||
export interface InviteLinkRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {GroupRequest}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
group: GroupRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
validUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
usedBy?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
reusable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the InviteLinkRequest interface.
|
||||
*/
|
||||
export function instanceOfInviteLinkRequest(value: object): boolean {
|
||||
if (!('group' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function InviteLinkRequestFromJSON(json: any): InviteLinkRequest {
|
||||
return InviteLinkRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function InviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'group': GroupRequestFromJSON(json['group']),
|
||||
'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])),
|
||||
'usedBy': json['used_by'] == null ? undefined : json['used_by'],
|
||||
'reusable': json['reusable'] == null ? undefined : json['reusable'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function InviteLinkRequestToJSON(value?: InviteLinkRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value['email'],
|
||||
'group': GroupRequestToJSON(value['group']),
|
||||
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),
|
||||
'used_by': value['usedBy'],
|
||||
'reusable': value['reusable'],
|
||||
'internal_note': value['internalNote'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
111
vue3/src/openapi/models/KeywordRequest.ts
Normal file
111
vue3/src/openapi/models/KeywordRequest.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface KeywordRequest
|
||||
*/
|
||||
export interface KeywordRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the KeywordRequest interface.
|
||||
*/
|
||||
export function instanceOfKeywordRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function KeywordRequestFromJSON(json: any): KeywordRequest {
|
||||
return KeywordRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function KeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeywordRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function KeywordRequestToJSON(value?: KeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
146
vue3/src/openapi/models/MealPlanRequest.ts
Normal file
146
vue3/src/openapi/models/MealPlanRequest.ts
Normal file
@@ -0,0 +1,146 @@
|
||||
/* 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 { MealTypeRequest } from './MealTypeRequest';
|
||||
import {
|
||||
MealTypeRequestFromJSON,
|
||||
MealTypeRequestFromJSONTyped,
|
||||
MealTypeRequestToJSON,
|
||||
} from './MealTypeRequest';
|
||||
import type { RecipeOverviewRequest } from './RecipeOverviewRequest';
|
||||
import {
|
||||
RecipeOverviewRequestFromJSON,
|
||||
RecipeOverviewRequestFromJSONTyped,
|
||||
RecipeOverviewRequestToJSON,
|
||||
} from './RecipeOverviewRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealPlanRequest
|
||||
*/
|
||||
export interface MealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeOverviewRequest}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
recipe?: RecipeOverviewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
servings: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
fromDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
toDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {MealTypeRequest}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
mealType: MealTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRequest(value: object): boolean {
|
||||
if (!('servings' in value)) return false;
|
||||
if (!('fromDate' in value)) return false;
|
||||
if (!('mealType' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function MealPlanRequestFromJSON(json: any): MealPlanRequest {
|
||||
return MealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': json['title'] == null ? undefined : json['title'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']),
|
||||
'servings': json['servings'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'fromDate': (new Date(json['from_date'])),
|
||||
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
|
||||
'mealType': MealTypeRequestFromJSON(json['meal_type']),
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRequestToJSON(value?: MealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': value['title'],
|
||||
'recipe': RecipeOverviewRequestToJSON(value['recipe']),
|
||||
'servings': value['servings'],
|
||||
'note': value['note'],
|
||||
'from_date': ((value['fromDate']).toISOString().substring(0,10)),
|
||||
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
|
||||
'meal_type': MealTypeRequestToJSON(value['mealType']),
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
93
vue3/src/openapi/models/MealTypeRequest.ts
Normal file
93
vue3/src/openapi/models/MealTypeRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealTypeRequest
|
||||
*/
|
||||
export interface MealTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfMealTypeRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function MealTypeRequestFromJSON(json: any): MealTypeRequest {
|
||||
return MealTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'color': json['color'] == null ? undefined : json['color'],
|
||||
'_default': json['default'] == null ? undefined : json['default'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealTypeRequestToJSON(value?: MealTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'order': value['order'],
|
||||
'color': value['color'],
|
||||
'default': value['_default'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
104
vue3/src/openapi/models/NutritionInformationRequest.ts
Normal file
104
vue3/src/openapi/models/NutritionInformationRequest.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
/* 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 NutritionInformationRequest
|
||||
*/
|
||||
export interface NutritionInformationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
carbohydrates: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
fats: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
proteins: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
calories: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the NutritionInformationRequest interface.
|
||||
*/
|
||||
export function instanceOfNutritionInformationRequest(value: object): boolean {
|
||||
if (!('carbohydrates' in value)) return false;
|
||||
if (!('fats' in value)) return false;
|
||||
if (!('proteins' in value)) return false;
|
||||
if (!('calories' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestFromJSON(json: any): NutritionInformationRequest {
|
||||
return NutritionInformationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NutritionInformationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'carbohydrates': json['carbohydrates'],
|
||||
'fats': json['fats'],
|
||||
'proteins': json['proteins'],
|
||||
'calories': json['calories'],
|
||||
'source': json['source'] == null ? undefined : json['source'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestToJSON(value?: NutritionInformationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'carbohydrates': value['carbohydrates'],
|
||||
'fats': value['fats'],
|
||||
'proteins': value['proteins'],
|
||||
'calories': value['calories'],
|
||||
'source': value['source'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
144
vue3/src/openapi/models/OpenDataCategoryRequest.ts
Normal file
144
vue3/src/openapi/models/OpenDataCategoryRequest.ts
Normal file
@@ -0,0 +1,144 @@
|
||||
/* 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 { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataCategoryRequest
|
||||
*/
|
||||
export interface OpenDataCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataCategoryRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestFromJSON(json: any): OpenDataCategoryRequest {
|
||||
return OpenDataCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestToJSON(value?: OpenDataCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
159
vue3/src/openapi/models/OpenDataConversionRequest.ts
Normal file
159
vue3/src/openapi/models/OpenDataConversionRequest.ts
Normal file
@@ -0,0 +1,159 @@
|
||||
/* 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 { OpenDataFoodRequest } from './OpenDataFoodRequest';
|
||||
import {
|
||||
OpenDataFoodRequestFromJSON,
|
||||
OpenDataFoodRequestFromJSONTyped,
|
||||
OpenDataFoodRequestToJSON,
|
||||
} from './OpenDataFoodRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataConversionRequest
|
||||
*/
|
||||
export interface OpenDataConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataFoodRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
food: OpenDataFoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
baseAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
baseUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
convertedAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
convertedUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
source: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('food' in value)) return false;
|
||||
if (!('baseAmount' in value)) return false;
|
||||
if (!('baseUnit' in value)) return false;
|
||||
if (!('convertedAmount' in value)) return false;
|
||||
if (!('convertedUnit' in value)) return false;
|
||||
if (!('source' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestFromJSON(json: any): OpenDataConversionRequest {
|
||||
return OpenDataConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'food': OpenDataFoodRequestFromJSON(json['food']),
|
||||
'baseAmount': json['base_amount'],
|
||||
'baseUnit': OpenDataUnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'],
|
||||
'convertedUnit': OpenDataUnitRequestFromJSON(json['converted_unit']),
|
||||
'source': json['source'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestToJSON(value?: OpenDataConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'food': OpenDataFoodRequestToJSON(value['food']),
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
|
||||
'source': value['source'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
85
vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts
Normal file
85
vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
/* 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 { OpenDataPropertyRequest } from './OpenDataPropertyRequest';
|
||||
import {
|
||||
OpenDataPropertyRequestFromJSON,
|
||||
OpenDataPropertyRequestFromJSONTyped,
|
||||
OpenDataPropertyRequestToJSON,
|
||||
} from './OpenDataPropertyRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataFoodPropertyRequest
|
||||
*/
|
||||
export interface OpenDataFoodPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataPropertyRequest}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
property: OpenDataPropertyRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
propertyAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataFoodPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodPropertyRequest(value: object): boolean {
|
||||
if (!('property' in value)) return false;
|
||||
if (!('propertyAmount' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestFromJSON(json: any): OpenDataFoodPropertyRequest {
|
||||
return OpenDataFoodPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestFromJSON(json['property']),
|
||||
'propertyAmount': json['property_amount'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestToJSON(value['property']),
|
||||
'property_amount': value['propertyAmount'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
247
vue3/src/openapi/models/OpenDataFoodRequest.ts
Normal file
247
vue3/src/openapi/models/OpenDataFoodRequest.ts
Normal file
@@ -0,0 +1,247 @@
|
||||
/* 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 { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest';
|
||||
import {
|
||||
OpenDataFoodPropertyRequestFromJSON,
|
||||
OpenDataFoodPropertyRequestFromJSONTyped,
|
||||
OpenDataFoodPropertyRequestToJSON,
|
||||
} from './OpenDataFoodPropertyRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataFoodRequest
|
||||
*/
|
||||
export interface OpenDataFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
pluralName: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
storeCategory: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataFoodPropertyRequest>}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
properties: Array<OpenDataFoodPropertyRequest> | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
fdcId: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('pluralName' in value)) return false;
|
||||
if (!('storeCategory' in value)) return false;
|
||||
if (!('properties' in value)) return false;
|
||||
if (!('propertiesFoodUnit' in value)) return false;
|
||||
if (!('fdcId' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestFromJSON(json: any): OpenDataFoodRequest {
|
||||
return OpenDataFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'],
|
||||
'storeCategory': OpenDataCategoryRequestFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': (json['properties'] == null ? null : (json['properties'] as Array<any>).map(OpenDataFoodPropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': OpenDataUnitRequestFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestToJSON(value?: OpenDataFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']),
|
||||
'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']),
|
||||
'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']),
|
||||
'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']),
|
||||
'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']),
|
||||
'properties': (value['properties'] == null ? null : (value['properties'] as Array<any>).map(OpenDataFoodPropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'properties_source': value['propertiesSource'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
152
vue3/src/openapi/models/OpenDataPropertyRequest.ts
Normal file
152
vue3/src/openapi/models/OpenDataPropertyRequest.ts
Normal file
@@ -0,0 +1,152 @@
|
||||
/* 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 { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataPropertyRequest
|
||||
*/
|
||||
export interface OpenDataPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataPropertyRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestFromJSON(json: any): OpenDataPropertyRequest {
|
||||
return OpenDataPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestToJSON(value?: OpenDataPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
93
vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts
Normal file
93
vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* 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 { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataStoreCategoryRequest
|
||||
*/
|
||||
export interface OpenDataStoreCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
category: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
store: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreCategoryRequest(value: object): boolean {
|
||||
if (!('category' in value)) return false;
|
||||
if (!('store' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestFromJSON(json: any): OpenDataStoreCategoryRequest {
|
||||
return OpenDataStoreCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestFromJSON(json['category']),
|
||||
'store': json['store'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestToJSON(value['category']),
|
||||
'store': value['store'],
|
||||
'order': value['order'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
117
vue3/src/openapi/models/OpenDataStoreRequest.ts
Normal file
117
vue3/src/openapi/models/OpenDataStoreRequest.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/* 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 { OpenDataStoreCategoryRequest } from './OpenDataStoreCategoryRequest';
|
||||
import {
|
||||
OpenDataStoreCategoryRequestFromJSON,
|
||||
OpenDataStoreCategoryRequestFromJSONTyped,
|
||||
OpenDataStoreCategoryRequestToJSON,
|
||||
} from './OpenDataStoreCategoryRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataStoreRequest
|
||||
*/
|
||||
export interface OpenDataStoreRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataStoreCategoryRequest>}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
categoryToStore: Array<OpenDataStoreCategoryRequest> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('categoryToStore' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataStoreRequestFromJSON(json: any): OpenDataStoreRequest {
|
||||
return OpenDataStoreRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'categoryToStore': (json['category_to_store'] == null ? null : (json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreRequestToJSON(value?: OpenDataStoreRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'category_to_store': (value['categoryToStore'] == null ? null : (value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
173
vue3/src/openapi/models/OpenDataUnitRequest.ts
Normal file
173
vue3/src/openapi/models/OpenDataUnitRequest.ts
Normal file
@@ -0,0 +1,173 @@
|
||||
/* 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 { BaseUnitEnum } from './BaseUnitEnum';
|
||||
import {
|
||||
BaseUnitEnumFromJSON,
|
||||
BaseUnitEnumFromJSONTyped,
|
||||
BaseUnitEnumToJSON,
|
||||
} from './BaseUnitEnum';
|
||||
import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum';
|
||||
import {
|
||||
OpenDataUnitTypeEnumFromJSON,
|
||||
OpenDataUnitTypeEnumFromJSONTyped,
|
||||
OpenDataUnitTypeEnumToJSON,
|
||||
} from './OpenDataUnitTypeEnum';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataUnitRequest
|
||||
*/
|
||||
export interface OpenDataUnitRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {BaseUnitEnum}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
baseUnit?: BaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitTypeEnum}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
type: OpenDataUnitTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataUnitRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataUnitRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataUnitRequestFromJSON(json: any): OpenDataUnitRequest {
|
||||
return OpenDataUnitRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']),
|
||||
'type': OpenDataUnitTypeEnumFromJSON(json['type']),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataUnitRequestToJSON(value?: OpenDataUnitRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'base_unit': BaseUnitEnumToJSON(value['baseUnit']),
|
||||
'type': OpenDataUnitTypeEnumToJSON(value['type']),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
120
vue3/src/openapi/models/OpenDataVersionRequest.ts
Normal file
120
vue3/src/openapi/models/OpenDataVersionRequest.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataVersionRequest
|
||||
*/
|
||||
export interface OpenDataVersionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataVersionRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataVersionRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
if (!('code' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestFromJSON(json: any): OpenDataVersionRequest {
|
||||
return OpenDataVersionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataVersionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'code': json['code'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestToJSON(value?: OpenDataVersionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
76
vue3/src/openapi/models/PatchedAccessTokenRequest.ts
Normal file
76
vue3/src/openapi/models/PatchedAccessTokenRequest.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/* 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 PatchedAccessTokenRequest
|
||||
*/
|
||||
export interface PatchedAccessTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedAccessTokenRequest
|
||||
*/
|
||||
expires?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAccessTokenRequest
|
||||
*/
|
||||
scope?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedAccessTokenRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedAccessTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedAccessTokenRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestFromJSON(json: any): PatchedAccessTokenRequest {
|
||||
return PatchedAccessTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAccessTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
|
||||
'scope': json['scope'] == null ? undefined : json['scope'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestToJSON(value?: PatchedAccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import type { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import {
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
} from './TypeEnum';
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
} from './AutomationTypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -34,10 +34,10 @@ export interface PatchedAutomation {
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {TypeEnum}
|
||||
* @type {AutomationTypeEnum}
|
||||
* @memberof PatchedAutomation
|
||||
*/
|
||||
type?: TypeEnum;
|
||||
type?: AutomationTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -106,7 +106,7 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']),
|
||||
'type': json['type'] == null ? undefined : AutomationTypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
@@ -124,7 +124,7 @@ export function PatchedAutomationToJSON(value?: PatchedAutomation | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
|
||||
131
vue3/src/openapi/models/PatchedAutomationRequest.ts
Normal file
131
vue3/src/openapi/models/PatchedAutomationRequest.ts
Normal file
@@ -0,0 +1,131 @@
|
||||
/* 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 { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import {
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
} from './AutomationTypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedAutomationRequest
|
||||
*/
|
||||
export interface PatchedAutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
type?: AutomationTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
param1?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
param2?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
param3?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedAutomationRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedAutomationRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestFromJSON(json: any): PatchedAutomationRequest {
|
||||
return PatchedAutomationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAutomationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'] == null ? undefined : AutomationTypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
'param2': json['param_2'] == null ? undefined : json['param_2'],
|
||||
'param3': json['param_3'] == null ? undefined : json['param_3'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'disabled': json['disabled'] == null ? undefined : json['disabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestToJSON(value?: PatchedAutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
'param_2': value['param2'],
|
||||
'param_3': value['param3'],
|
||||
'order': value['order'],
|
||||
'disabled': value['disabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
76
vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts
Normal file
76
vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/* 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 PatchedBookmarkletImportRequest
|
||||
*/
|
||||
export interface PatchedBookmarkletImportRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedBookmarkletImportRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedBookmarkletImportRequest
|
||||
*/
|
||||
html?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedBookmarkletImportRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedBookmarkletImportRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedBookmarkletImportRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestFromJSON(json: any): PatchedBookmarkletImportRequest {
|
||||
return PatchedBookmarkletImportRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedBookmarkletImportRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'html': json['html'] == null ? undefined : json['html'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestToJSON(value?: PatchedBookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
124
vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts
Normal file
124
vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
/* 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 PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
export interface PatchedConnectorConfigConfigRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
todoEntity?: string;
|
||||
/**
|
||||
* Is Connector Enabled
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryCreatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryUpdatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryDeletedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedConnectorConfigConfigRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedConnectorConfigConfigRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedConnectorConfigConfigRequestFromJSON(json: any): PatchedConnectorConfigConfigRequest {
|
||||
return PatchedConnectorConfigConfigRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConnectorConfigConfigRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
|
||||
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
||||
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'],
|
||||
'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'],
|
||||
'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedConnectorConfigConfigRequestToJSON(value?: PatchedConnectorConfigConfigRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
|
||||
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
100
vue3/src/openapi/models/PatchedCookLogRequest.ts
Normal file
100
vue3/src/openapi/models/PatchedCookLogRequest.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
/* 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 PatchedCookLogRequest
|
||||
*/
|
||||
export interface PatchedCookLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
recipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
rating?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedCookLogRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedCookLogRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedCookLogRequestFromJSON(json: any): PatchedCookLogRequest {
|
||||
return PatchedCookLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedCookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCookLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedCookLogRequestToJSON(value?: PatchedCookLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
'comment': value['comment'],
|
||||
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
91
vue3/src/openapi/models/PatchedCustomFilterRequest.ts
Normal file
91
vue3/src/openapi/models/PatchedCustomFilterRequest.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
/* 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 { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedCustomFilterRequest
|
||||
*/
|
||||
export interface PatchedCustomFilterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
search?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedCustomFilterRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedCustomFilterRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedCustomFilterRequestFromJSON(json: any): PatchedCustomFilterRequest {
|
||||
return PatchedCustomFilterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedCustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCustomFilterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'search': json['search'] == null ? undefined : json['search'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedCustomFilterRequestToJSON(value?: PatchedCustomFilterRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'search': value['search'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
116
vue3/src/openapi/models/PatchedExportLogRequest.ts
Normal file
116
vue3/src/openapi/models/PatchedExportLogRequest.ts
Normal file
@@ -0,0 +1,116 @@
|
||||
/* 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 PatchedExportLogRequest
|
||||
*/
|
||||
export interface PatchedExportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
exportedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
cacheDuration?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
possiblyNotExpired?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedExportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedExportLogRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedExportLogRequestFromJSON(json: any): PatchedExportLogRequest {
|
||||
return PatchedExportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedExportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
|
||||
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
|
||||
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedExportLogRequestToJSON(value?: PatchedExportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'exported_recipes': value['exportedRecipes'],
|
||||
'cache_duration': value['cacheDuration'],
|
||||
'possibly_not_expired': value['possiblyNotExpired'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
275
vue3/src/openapi/models/PatchedFoodRequest.ts
Normal file
275
vue3/src/openapi/models/PatchedFoodRequest.ts
Normal file
@@ -0,0 +1,275 @@
|
||||
/* 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 { FoodInheritFieldRequest } from './FoodInheritFieldRequest';
|
||||
import {
|
||||
FoodInheritFieldRequestFromJSON,
|
||||
FoodInheritFieldRequestFromJSONTyped,
|
||||
FoodInheritFieldRequestToJSON,
|
||||
} from './FoodInheritFieldRequest';
|
||||
import type { FoodSimpleRequest } from './FoodSimpleRequest';
|
||||
import {
|
||||
FoodSimpleRequestFromJSON,
|
||||
FoodSimpleRequestFromJSONTyped,
|
||||
FoodSimpleRequestToJSON,
|
||||
} from './FoodSimpleRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { RecipeSimpleRequest } from './RecipeSimpleRequest';
|
||||
import {
|
||||
RecipeSimpleRequestFromJSON,
|
||||
RecipeSimpleRequestFromJSONTyped,
|
||||
RecipeSimpleRequestToJSON,
|
||||
} from './RecipeSimpleRequest';
|
||||
import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedFoodRequest
|
||||
*/
|
||||
export interface PatchedFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeSimpleRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
recipe?: RecipeSimpleRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
foodOnhand?: string;
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
supermarketCategory?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSimpleRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
substitute?: Array<FoodSimpleRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedFoodRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedFoodRequestFromJSON(json: any): PatchedFoodRequest {
|
||||
return PatchedFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']),
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']),
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']),
|
||||
'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'],
|
||||
'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array<any>).map(FoodSimpleRequestFromJSON)),
|
||||
'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'],
|
||||
'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedFoodRequestToJSON(value?: PatchedFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'recipe': RecipeSimpleRequestToJSON(value['recipe']),
|
||||
'url': value['url'],
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'fdc_id': value['fdcId'],
|
||||
'food_onhand': value['foodOnhand'],
|
||||
'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']),
|
||||
'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'ignore_shopping': value['ignoreShopping'],
|
||||
'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array<any>).map(FoodSimpleRequestToJSON)),
|
||||
'substitute_siblings': value['substituteSiblings'],
|
||||
'substitute_children': value['substituteChildren'],
|
||||
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
100
vue3/src/openapi/models/PatchedImportLogRequest.ts
Normal file
100
vue3/src/openapi/models/PatchedImportLogRequest.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
/* 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 PatchedImportLogRequest
|
||||
*/
|
||||
export interface PatchedImportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
importedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedImportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedImportLogRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedImportLogRequestFromJSON(json: any): PatchedImportLogRequest {
|
||||
return PatchedImportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedImportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedImportLogRequestToJSON(value?: PatchedImportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'imported_recipes': value['importedRecipes'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
153
vue3/src/openapi/models/PatchedIngredientRequest.ts
Normal file
153
vue3/src/openapi/models/PatchedIngredientRequest.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
/* 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 { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedIngredientRequest
|
||||
*/
|
||||
export interface PatchedIngredientRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
food?: FoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
unit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
amount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
isHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
noAmount?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
originalText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
alwaysUsePluralUnit?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
alwaysUsePluralFood?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedIngredientRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedIngredientRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedIngredientRequestFromJSON(json: any): PatchedIngredientRequest {
|
||||
return PatchedIngredientRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedIngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedIngredientRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
|
||||
'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'isHeader': json['is_header'] == null ? undefined : json['is_header'],
|
||||
'noAmount': json['no_amount'] == null ? undefined : json['no_amount'],
|
||||
'originalText': json['original_text'] == null ? undefined : json['original_text'],
|
||||
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'],
|
||||
'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedIngredientRequestToJSON(value?: PatchedIngredientRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'note': value['note'],
|
||||
'order': value['order'],
|
||||
'is_header': value['isHeader'],
|
||||
'no_amount': value['noAmount'],
|
||||
'original_text': value['originalText'],
|
||||
'always_use_plural_unit': value['alwaysUsePluralUnit'],
|
||||
'always_use_plural_food': value['alwaysUsePluralFood'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
115
vue3/src/openapi/models/PatchedInviteLinkRequest.ts
Normal file
115
vue3/src/openapi/models/PatchedInviteLinkRequest.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
/* 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 { GroupRequest } from './GroupRequest';
|
||||
import {
|
||||
GroupRequestFromJSON,
|
||||
GroupRequestFromJSONTyped,
|
||||
GroupRequestToJSON,
|
||||
} from './GroupRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedInviteLinkRequest
|
||||
*/
|
||||
export interface PatchedInviteLinkRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {GroupRequest}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
group?: GroupRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
validUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
usedBy?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
reusable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedInviteLinkRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedInviteLinkRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedInviteLinkRequestFromJSON(json: any): PatchedInviteLinkRequest {
|
||||
return PatchedInviteLinkRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedInviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInviteLinkRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'group': json['group'] == null ? undefined : GroupRequestFromJSON(json['group']),
|
||||
'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])),
|
||||
'usedBy': json['used_by'] == null ? undefined : json['used_by'],
|
||||
'reusable': json['reusable'] == null ? undefined : json['reusable'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedInviteLinkRequestToJSON(value?: PatchedInviteLinkRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value['email'],
|
||||
'group': GroupRequestToJSON(value['group']),
|
||||
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),
|
||||
'used_by': value['usedBy'],
|
||||
'reusable': value['reusable'],
|
||||
'internal_note': value['internalNote'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
110
vue3/src/openapi/models/PatchedKeywordRequest.ts
Normal file
110
vue3/src/openapi/models/PatchedKeywordRequest.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedKeywordRequest
|
||||
*/
|
||||
export interface PatchedKeywordRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedKeywordRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedKeywordRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedKeywordRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedKeywordRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedKeywordRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestFromJSON(json: any): PatchedKeywordRequest {
|
||||
return PatchedKeywordRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKeywordRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestToJSON(value?: PatchedKeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
143
vue3/src/openapi/models/PatchedMealPlanRequest.ts
Normal file
143
vue3/src/openapi/models/PatchedMealPlanRequest.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
/* 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 { MealTypeRequest } from './MealTypeRequest';
|
||||
import {
|
||||
MealTypeRequestFromJSON,
|
||||
MealTypeRequestFromJSONTyped,
|
||||
MealTypeRequestToJSON,
|
||||
} from './MealTypeRequest';
|
||||
import type { RecipeOverviewRequest } from './RecipeOverviewRequest';
|
||||
import {
|
||||
RecipeOverviewRequestFromJSON,
|
||||
RecipeOverviewRequestFromJSONTyped,
|
||||
RecipeOverviewRequestToJSON,
|
||||
} from './RecipeOverviewRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedMealPlanRequest
|
||||
*/
|
||||
export interface PatchedMealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeOverviewRequest}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
recipe?: RecipeOverviewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
servings?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
fromDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
toDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {MealTypeRequest}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
mealType?: MealTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedMealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedMealPlanRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedMealPlanRequestFromJSON(json: any): PatchedMealPlanRequest {
|
||||
return PatchedMealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': json['title'] == null ? undefined : json['title'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']),
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'fromDate': json['from_date'] == null ? undefined : (new Date(json['from_date'])),
|
||||
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
|
||||
'mealType': json['meal_type'] == null ? undefined : MealTypeRequestFromJSON(json['meal_type']),
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedMealPlanRequestToJSON(value?: PatchedMealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': value['title'],
|
||||
'recipe': RecipeOverviewRequestToJSON(value['recipe']),
|
||||
'servings': value['servings'],
|
||||
'note': value['note'],
|
||||
'from_date': value['fromDate'] == null ? undefined : ((value['fromDate']).toISOString().substring(0,10)),
|
||||
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
|
||||
'meal_type': MealTypeRequestToJSON(value['mealType']),
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
92
vue3/src/openapi/models/PatchedMealTypeRequest.ts
Normal file
92
vue3/src/openapi/models/PatchedMealTypeRequest.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedMealTypeRequest
|
||||
*/
|
||||
export interface PatchedMealTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedMealTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedMealTypeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedMealTypeRequestFromJSON(json: any): PatchedMealTypeRequest {
|
||||
return PatchedMealTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedMealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'color': json['color'] == null ? undefined : json['color'],
|
||||
'_default': json['default'] == null ? undefined : json['default'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedMealTypeRequestToJSON(value?: PatchedMealTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'order': value['order'],
|
||||
'color': value['color'],
|
||||
'default': value['_default'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
141
vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts
Normal file
141
vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts
Normal file
@@ -0,0 +1,141 @@
|
||||
/* 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 { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
export interface PatchedOpenDataCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataCategoryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataCategoryRequestFromJSON(json: any): PatchedOpenDataCategoryRequest {
|
||||
return PatchedOpenDataCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataCategoryRequestToJSON(value?: PatchedOpenDataCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
151
vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts
Normal file
151
vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
/* 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 { OpenDataFoodRequest } from './OpenDataFoodRequest';
|
||||
import {
|
||||
OpenDataFoodRequestFromJSON,
|
||||
OpenDataFoodRequestFromJSONTyped,
|
||||
OpenDataFoodRequestToJSON,
|
||||
} from './OpenDataFoodRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedOpenDataConversionRequest
|
||||
*/
|
||||
export interface PatchedOpenDataConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataFoodRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
food?: OpenDataFoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
baseAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
baseUnit?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
convertedAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
convertedUnit?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataConversionRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataConversionRequestFromJSON(json: any): PatchedOpenDataConversionRequest {
|
||||
return PatchedOpenDataConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'food': json['food'] == null ? undefined : OpenDataFoodRequestFromJSON(json['food']),
|
||||
'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'] == null ? undefined : json['converted_amount'],
|
||||
'convertedUnit': json['converted_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['converted_unit']),
|
||||
'source': json['source'] == null ? undefined : json['source'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataConversionRequestToJSON(value?: PatchedOpenDataConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'food': OpenDataFoodRequestToJSON(value['food']),
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
|
||||
'source': value['source'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
239
vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts
Normal file
239
vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts
Normal file
@@ -0,0 +1,239 @@
|
||||
/* 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 { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest';
|
||||
import {
|
||||
OpenDataFoodPropertyRequestFromJSON,
|
||||
OpenDataFoodPropertyRequestFromJSONTyped,
|
||||
OpenDataFoodPropertyRequestToJSON,
|
||||
} from './OpenDataFoodPropertyRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataFoodRequest
|
||||
*/
|
||||
export interface PatchedOpenDataFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
storeCategory?: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataFoodPropertyRequest>}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
properties?: Array<OpenDataFoodPropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
fdcId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataFoodRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataFoodRequestFromJSON(json: any): PatchedOpenDataFoodRequest {
|
||||
return PatchedOpenDataFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'storeCategory': json['store_category'] == null ? undefined : OpenDataCategoryRequestFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(OpenDataFoodPropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataFoodRequestToJSON(value?: PatchedOpenDataFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']),
|
||||
'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']),
|
||||
'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']),
|
||||
'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']),
|
||||
'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']),
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(OpenDataFoodPropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'properties_source': value['propertiesSource'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
149
vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts
Normal file
149
vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts
Normal file
@@ -0,0 +1,149 @@
|
||||
/* 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 { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
export interface PatchedOpenDataPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataPropertyRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataPropertyRequestFromJSON(json: any): PatchedOpenDataPropertyRequest {
|
||||
return PatchedOpenDataPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataPropertyRequestToJSON(value?: PatchedOpenDataPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
113
vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts
Normal file
113
vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
/* 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 { OpenDataStoreCategoryRequest } from './OpenDataStoreCategoryRequest';
|
||||
import {
|
||||
OpenDataStoreCategoryRequestFromJSON,
|
||||
OpenDataStoreCategoryRequestFromJSONTyped,
|
||||
OpenDataStoreCategoryRequestToJSON,
|
||||
} from './OpenDataStoreCategoryRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedOpenDataStoreRequest
|
||||
*/
|
||||
export interface PatchedOpenDataStoreRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataStoreCategoryRequest>}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
categoryToStore?: Array<OpenDataStoreCategoryRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataStoreRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataStoreRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataStoreRequestFromJSON(json: any): PatchedOpenDataStoreRequest {
|
||||
return PatchedOpenDataStoreRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataStoreRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'categoryToStore': json['category_to_store'] == null ? undefined : ((json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataStoreRequestToJSON(value?: PatchedOpenDataStoreRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'category_to_store': value['categoryToStore'] == null ? undefined : ((value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
169
vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts
Normal file
169
vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts
Normal file
@@ -0,0 +1,169 @@
|
||||
/* 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 { BaseUnitEnum } from './BaseUnitEnum';
|
||||
import {
|
||||
BaseUnitEnumFromJSON,
|
||||
BaseUnitEnumFromJSONTyped,
|
||||
BaseUnitEnumToJSON,
|
||||
} from './BaseUnitEnum';
|
||||
import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum';
|
||||
import {
|
||||
OpenDataUnitTypeEnumFromJSON,
|
||||
OpenDataUnitTypeEnumFromJSONTyped,
|
||||
OpenDataUnitTypeEnumToJSON,
|
||||
} from './OpenDataUnitTypeEnum';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataUnitRequest
|
||||
*/
|
||||
export interface PatchedOpenDataUnitRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {BaseUnitEnum}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
baseUnit?: BaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitTypeEnum}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
type?: OpenDataUnitTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataUnitRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataUnitRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataUnitRequestFromJSON(json: any): PatchedOpenDataUnitRequest {
|
||||
return PatchedOpenDataUnitRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataUnitRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']),
|
||||
'type': json['type'] == null ? undefined : OpenDataUnitTypeEnumFromJSON(json['type']),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataUnitRequestToJSON(value?: PatchedOpenDataUnitRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'base_unit': BaseUnitEnumToJSON(value['baseUnit']),
|
||||
'type': OpenDataUnitTypeEnumToJSON(value['type']),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
118
vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts
Normal file
118
vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataVersionRequest
|
||||
*/
|
||||
export interface PatchedOpenDataVersionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataVersionRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataVersionRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestFromJSON(json: any): PatchedOpenDataVersionRequest {
|
||||
return PatchedOpenDataVersionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataVersionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'code': json['code'] == null ? undefined : json['code'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestToJSON(value?: PatchedOpenDataVersionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
117
vue3/src/openapi/models/PatchedPropertyRequest.ts
Normal file
117
vue3/src/openapi/models/PatchedPropertyRequest.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/* 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 { PropertyTypeRequest } from './PropertyTypeRequest';
|
||||
import {
|
||||
PropertyTypeRequestFromJSON,
|
||||
PropertyTypeRequestFromJSONTyped,
|
||||
PropertyTypeRequestToJSON,
|
||||
} from './PropertyTypeRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedPropertyRequest
|
||||
*/
|
||||
export interface PatchedPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
propertyAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {PropertyTypeRequest}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
propertyType?: PropertyTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedPropertyRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestFromJSON(json: any): PatchedPropertyRequest {
|
||||
return PatchedPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'propertyAmount': json['property_amount'] == null ? undefined : json['property_amount'],
|
||||
'propertyType': json['property_type'] == null ? undefined : PropertyTypeRequestFromJSON(json['property_type']),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestToJSON(value?: PatchedPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property_amount': value['propertyAmount'],
|
||||
'property_type': PropertyTypeRequestToJSON(value['propertyType']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
108
vue3/src/openapi/models/PatchedPropertyTypeRequest.ts
Normal file
108
vue3/src/openapi/models/PatchedPropertyTypeRequest.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedPropertyTypeRequest
|
||||
*/
|
||||
export interface PatchedPropertyTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedPropertyTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedPropertyTypeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedPropertyTypeRequestFromJSON(json: any): PatchedPropertyTypeRequest {
|
||||
return PatchedPropertyTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedPropertyTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedPropertyTypeRequestToJSON(value?: PatchedPropertyTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'description': value['description'],
|
||||
'order': value['order'],
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'fdc_id': value['fdcId'],
|
||||
};
|
||||
}
|
||||
|
||||
76
vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts
Normal file
76
vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/* 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 PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
export interface PatchedRecipeBookEntryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
book?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
recipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedRecipeBookEntryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedRecipeBookEntryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestFromJSON(json: any): PatchedRecipeBookEntryRequest {
|
||||
return PatchedRecipeBookEntryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookEntryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'book': json['book'] == null ? undefined : json['book'],
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestToJSON(value?: PatchedRecipeBookEntryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'book': value['book'],
|
||||
'recipe': value['recipe'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
113
vue3/src/openapi/models/PatchedRecipeBookRequest.ts
Normal file
113
vue3/src/openapi/models/PatchedRecipeBookRequest.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
/* 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 { CustomFilterRequest } from './CustomFilterRequest';
|
||||
import {
|
||||
CustomFilterRequestFromJSON,
|
||||
CustomFilterRequestFromJSONTyped,
|
||||
CustomFilterRequestToJSON,
|
||||
} from './CustomFilterRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedRecipeBookRequest
|
||||
*/
|
||||
export interface PatchedRecipeBookRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {CustomFilterRequest}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
filter?: CustomFilterRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedRecipeBookRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedRecipeBookRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookRequestFromJSON(json: any): PatchedRecipeBookRequest {
|
||||
return PatchedRecipeBookRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'filter': json['filter'] == null ? undefined : CustomFilterRequestFromJSON(json['filter']),
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookRequestToJSON(value?: PatchedRecipeBookRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'filter': CustomFilterRequestToJSON(value['filter']),
|
||||
'order': value['order'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
219
vue3/src/openapi/models/PatchedRecipeRequest.ts
Normal file
219
vue3/src/openapi/models/PatchedRecipeRequest.ts
Normal file
@@ -0,0 +1,219 @@
|
||||
/* 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 { KeywordRequest } from './KeywordRequest';
|
||||
import {
|
||||
KeywordRequestFromJSON,
|
||||
KeywordRequestFromJSONTyped,
|
||||
KeywordRequestToJSON,
|
||||
} from './KeywordRequest';
|
||||
import type { NutritionInformationRequest } from './NutritionInformationRequest';
|
||||
import {
|
||||
NutritionInformationRequestFromJSON,
|
||||
NutritionInformationRequestFromJSONTyped,
|
||||
NutritionInformationRequestToJSON,
|
||||
} from './NutritionInformationRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { StepRequest } from './StepRequest';
|
||||
import {
|
||||
StepRequestFromJSON,
|
||||
StepRequestFromJSONTyped,
|
||||
StepRequestToJSON,
|
||||
} from './StepRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedRecipeRequest
|
||||
*/
|
||||
export interface PatchedRecipeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<KeywordRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
keywords?: Array<KeywordRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<StepRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
steps?: Array<StepRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
workingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
waitingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
sourceUrl?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
internal?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
showIngredientOverview?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {NutritionInformationRequest}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
nutrition?: NutritionInformationRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
filePath?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
servingsText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
_private?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedRecipeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedRecipeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedRecipeRequestFromJSON(json: any): PatchedRecipeRequest {
|
||||
return PatchedRecipeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'keywords': json['keywords'] == null ? undefined : ((json['keywords'] as Array<any>).map(KeywordRequestFromJSON)),
|
||||
'steps': json['steps'] == null ? undefined : ((json['steps'] as Array<any>).map(StepRequestFromJSON)),
|
||||
'workingTime': json['working_time'] == null ? undefined : json['working_time'],
|
||||
'waitingTime': json['waiting_time'] == null ? undefined : json['waiting_time'],
|
||||
'sourceUrl': json['source_url'] == null ? undefined : json['source_url'],
|
||||
'internal': json['internal'] == null ? undefined : json['internal'],
|
||||
'showIngredientOverview': json['show_ingredient_overview'] == null ? undefined : json['show_ingredient_overview'],
|
||||
'nutrition': json['nutrition'] == null ? undefined : NutritionInformationRequestFromJSON(json['nutrition']),
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'filePath': json['file_path'] == null ? undefined : json['file_path'],
|
||||
'servingsText': json['servings_text'] == null ? undefined : json['servings_text'],
|
||||
'_private': json['private'] == null ? undefined : json['private'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeRequestToJSON(value?: PatchedRecipeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array<any>).map(KeywordRequestToJSON)),
|
||||
'steps': value['steps'] == null ? undefined : ((value['steps'] as Array<any>).map(StepRequestToJSON)),
|
||||
'working_time': value['workingTime'],
|
||||
'waiting_time': value['waitingTime'],
|
||||
'source_url': value['sourceUrl'],
|
||||
'internal': value['internal'],
|
||||
'show_ingredient_overview': value['showIngredientOverview'],
|
||||
'nutrition': NutritionInformationRequestToJSON(value['nutrition']),
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'servings': value['servings'],
|
||||
'file_path': value['filePath'],
|
||||
'servings_text': value['servingsText'],
|
||||
'private': value['_private'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
137
vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts
Normal file
137
vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts
Normal file
@@ -0,0 +1,137 @@
|
||||
/* 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 { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedShoppingListEntryRequest
|
||||
*/
|
||||
export interface PatchedShoppingListEntryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
listRecipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
food?: FoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
unit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
amount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
checked?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
completedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
delayUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedShoppingListEntryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedShoppingListEntryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedShoppingListEntryRequestFromJSON(json: any): PatchedShoppingListEntryRequest {
|
||||
return PatchedShoppingListEntryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedShoppingListEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListEntryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'],
|
||||
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
|
||||
'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'checked': json['checked'] == null ? undefined : json['checked'],
|
||||
'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
|
||||
'delayUntil': json['delay_until'] == null ? undefined : (new Date(json['delay_until'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedShoppingListEntryRequestToJSON(value?: PatchedShoppingListEntryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'list_recipe': value['listRecipe'],
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'order': value['order'],
|
||||
'checked': value['checked'],
|
||||
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
|
||||
'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
84
vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts
Normal file
84
vue3/src/openapi/models/PatchedShoppingListRecipeRequest.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 PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
export interface PatchedShoppingListRecipeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
recipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
mealplan?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
servings?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedShoppingListRecipeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedShoppingListRecipeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeRequestFromJSON(json: any): PatchedShoppingListRecipeRequest {
|
||||
return PatchedShoppingListRecipeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListRecipeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'mealplan': json['mealplan'] == null ? undefined : json['mealplan'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeRequestToJSON(value?: PatchedShoppingListRecipeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'mealplan': value['mealplan'],
|
||||
'servings': value['servings'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
213
vue3/src/openapi/models/PatchedSpaceRequest.ts
Normal file
213
vue3/src/openapi/models/PatchedSpaceRequest.ts
Normal file
@@ -0,0 +1,213 @@
|
||||
/* 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 { FoodInheritFieldRequest } from './FoodInheritFieldRequest';
|
||||
import {
|
||||
FoodInheritFieldRequestFromJSON,
|
||||
FoodInheritFieldRequestFromJSONTyped,
|
||||
FoodInheritFieldRequestToJSON,
|
||||
} from './FoodInheritFieldRequest';
|
||||
import type { SpaceNavTextColorEnum } from './SpaceNavTextColorEnum';
|
||||
import {
|
||||
SpaceNavTextColorEnumFromJSON,
|
||||
SpaceNavTextColorEnumFromJSONTyped,
|
||||
SpaceNavTextColorEnumToJSON,
|
||||
} from './SpaceNavTextColorEnum';
|
||||
import type { SpaceThemeEnum } from './SpaceThemeEnum';
|
||||
import {
|
||||
SpaceThemeEnumFromJSON,
|
||||
SpaceThemeEnumFromJSONTyped,
|
||||
SpaceThemeEnumToJSON,
|
||||
} from './SpaceThemeEnum';
|
||||
import type { UserFileViewRequest } from './UserFileViewRequest';
|
||||
import {
|
||||
UserFileViewRequestFromJSON,
|
||||
UserFileViewRequestFromJSONTyped,
|
||||
UserFileViewRequestToJSON,
|
||||
} from './UserFileViewRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedSpaceRequest
|
||||
*/
|
||||
export interface PatchedSpaceRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
foodInherit?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
image?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
navLogo?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {SpaceThemeEnum}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
spaceTheme?: SpaceThemeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
customSpaceTheme?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
navBgColor?: string;
|
||||
/**
|
||||
*
|
||||
* @type {SpaceNavTextColorEnum}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
navTextColor?: SpaceNavTextColorEnum;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor32?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor128?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor144?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor180?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor192?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor512?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColorSvg?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSpaceRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSpaceRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSpaceRequestFromJSON(json: any): PatchedSpaceRequest {
|
||||
return PatchedSpaceRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSpaceRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'message': json['message'] == null ? undefined : json['message'],
|
||||
'foodInherit': json['food_inherit'] == null ? undefined : ((json['food_inherit'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'image': json['image'] == null ? undefined : UserFileViewRequestFromJSON(json['image']),
|
||||
'navLogo': json['nav_logo'] == null ? undefined : UserFileViewRequestFromJSON(json['nav_logo']),
|
||||
'spaceTheme': json['space_theme'] == null ? undefined : SpaceThemeEnumFromJSON(json['space_theme']),
|
||||
'customSpaceTheme': json['custom_space_theme'] == null ? undefined : UserFileViewRequestFromJSON(json['custom_space_theme']),
|
||||
'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'],
|
||||
'navTextColor': json['nav_text_color'] == null ? undefined : SpaceNavTextColorEnumFromJSON(json['nav_text_color']),
|
||||
'logoColor32': json['logo_color_32'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_32']),
|
||||
'logoColor128': json['logo_color_128'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_128']),
|
||||
'logoColor144': json['logo_color_144'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_144']),
|
||||
'logoColor180': json['logo_color_180'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_180']),
|
||||
'logoColor192': json['logo_color_192'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_192']),
|
||||
'logoColor512': json['logo_color_512'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_512']),
|
||||
'logoColorSvg': json['logo_color_svg'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_svg']),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSpaceRequestToJSON(value?: PatchedSpaceRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'message': value['message'],
|
||||
'food_inherit': value['foodInherit'] == null ? undefined : ((value['foodInherit'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'image': UserFileViewRequestToJSON(value['image']),
|
||||
'nav_logo': UserFileViewRequestToJSON(value['navLogo']),
|
||||
'space_theme': SpaceThemeEnumToJSON(value['spaceTheme']),
|
||||
'custom_space_theme': UserFileViewRequestToJSON(value['customSpaceTheme']),
|
||||
'nav_bg_color': value['navBgColor'],
|
||||
'nav_text_color': SpaceNavTextColorEnumToJSON(value['navTextColor']),
|
||||
'logo_color_32': UserFileViewRequestToJSON(value['logoColor32']),
|
||||
'logo_color_128': UserFileViewRequestToJSON(value['logoColor128']),
|
||||
'logo_color_144': UserFileViewRequestToJSON(value['logoColor144']),
|
||||
'logo_color_180': UserFileViewRequestToJSON(value['logoColor180']),
|
||||
'logo_color_192': UserFileViewRequestToJSON(value['logoColor192']),
|
||||
'logo_color_512': UserFileViewRequestToJSON(value['logoColor512']),
|
||||
'logo_color_svg': UserFileViewRequestToJSON(value['logoColorSvg']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
145
vue3/src/openapi/models/PatchedStepRequest.ts
Normal file
145
vue3/src/openapi/models/PatchedStepRequest.ts
Normal file
@@ -0,0 +1,145 @@
|
||||
/* 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 { IngredientRequest } from './IngredientRequest';
|
||||
import {
|
||||
IngredientRequestFromJSON,
|
||||
IngredientRequestFromJSONTyped,
|
||||
IngredientRequestToJSON,
|
||||
} from './IngredientRequest';
|
||||
import type { UserFileViewRequest } from './UserFileViewRequest';
|
||||
import {
|
||||
UserFileViewRequestFromJSON,
|
||||
UserFileViewRequestFromJSONTyped,
|
||||
UserFileViewRequestToJSON,
|
||||
} from './UserFileViewRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedStepRequest
|
||||
*/
|
||||
export interface PatchedStepRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
instruction?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<IngredientRequest>}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
ingredients?: Array<IngredientRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
time?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
showAsHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
file?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
stepRecipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
showIngredientsTable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedStepRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedStepRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedStepRequestFromJSON(json: any): PatchedStepRequest {
|
||||
return PatchedStepRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedStepRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStepRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'instruction': json['instruction'] == null ? undefined : json['instruction'],
|
||||
'ingredients': json['ingredients'] == null ? undefined : ((json['ingredients'] as Array<any>).map(IngredientRequestFromJSON)),
|
||||
'time': json['time'] == null ? undefined : json['time'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'showAsHeader': json['show_as_header'] == null ? undefined : json['show_as_header'],
|
||||
'file': json['file'] == null ? undefined : UserFileViewRequestFromJSON(json['file']),
|
||||
'stepRecipe': json['step_recipe'] == null ? undefined : json['step_recipe'],
|
||||
'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedStepRequestToJSON(value?: PatchedStepRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'instruction': value['instruction'],
|
||||
'ingredients': value['ingredients'] == null ? undefined : ((value['ingredients'] as Array<any>).map(IngredientRequestToJSON)),
|
||||
'time': value['time'],
|
||||
'order': value['order'],
|
||||
'show_as_header': value['showAsHeader'],
|
||||
'file': UserFileViewRequestToJSON(value['file']),
|
||||
'step_recipe': value['stepRecipe'],
|
||||
'show_ingredients_table': value['showIngredientsTable'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
107
vue3/src/openapi/models/PatchedStorageRequest.ts
Normal file
107
vue3/src/openapi/models/PatchedStorageRequest.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
/* 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 { MethodEnum } from './MethodEnum';
|
||||
import {
|
||||
MethodEnumFromJSON,
|
||||
MethodEnumFromJSONTyped,
|
||||
MethodEnumToJSON,
|
||||
} from './MethodEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedStorageRequest
|
||||
*/
|
||||
export interface PatchedStorageRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {MethodEnum}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
method?: MethodEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedStorageRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedStorageRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedStorageRequestFromJSON(json: any): PatchedStorageRequest {
|
||||
return PatchedStorageRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedStorageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStorageRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'method': json['method'] == null ? undefined : MethodEnumFromJSON(json['method']),
|
||||
'username': json['username'] == null ? undefined : json['username'],
|
||||
'password': json['password'] == null ? undefined : json['password'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedStorageRequestToJSON(value?: PatchedStorageRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'method': MethodEnumToJSON(value['method']),
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
'token': value['token'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* 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 { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
export interface PatchedSupermarketCategoryRelationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
category?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
supermarket?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSupermarketCategoryRelationRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSupermarketCategoryRelationRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRelationRequestFromJSON(json: any): PatchedSupermarketCategoryRelationRequest {
|
||||
return PatchedSupermarketCategoryRelationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRelationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRelationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': json['category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['category']),
|
||||
'supermarket': json['supermarket'] == null ? undefined : json['supermarket'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRelationRequestToJSON(value?: PatchedSupermarketCategoryRelationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': SupermarketCategoryRequestToJSON(value['category']),
|
||||
'supermarket': value['supermarket'],
|
||||
'order': value['order'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
110
vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts
Normal file
110
vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
export interface PatchedSupermarketCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSupermarketCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSupermarketCategoryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRequestFromJSON(json: any): PatchedSupermarketCategoryRequest {
|
||||
return PatchedSupermarketCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRequestToJSON(value?: PatchedSupermarketCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
118
vue3/src/openapi/models/PatchedSupermarketRequest.ts
Normal file
118
vue3/src/openapi/models/PatchedSupermarketRequest.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedSupermarketRequest
|
||||
*/
|
||||
export interface PatchedSupermarketRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSupermarketRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSupermarketRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSupermarketRequestFromJSON(json: any): PatchedSupermarketRequest {
|
||||
return PatchedSupermarketRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSupermarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSupermarketRequestToJSON(value?: PatchedSupermarketRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
92
vue3/src/openapi/models/PatchedSyncRequest.ts
Normal file
92
vue3/src/openapi/models/PatchedSyncRequest.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
/* 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 PatchedSyncRequest
|
||||
*/
|
||||
export interface PatchedSyncRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
storage?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
active?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
lastChecked?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSyncRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSyncRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSyncRequestFromJSON(json: any): PatchedSyncRequest {
|
||||
return PatchedSyncRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSyncRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSyncRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'storage': json['storage'] == null ? undefined : json['storage'],
|
||||
'path': json['path'] == null ? undefined : json['path'],
|
||||
'active': json['active'] == null ? undefined : json['active'],
|
||||
'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSyncRequestToJSON(value?: PatchedSyncRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'storage': value['storage'],
|
||||
'path': value['path'],
|
||||
'active': value['active'],
|
||||
'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
121
vue3/src/openapi/models/PatchedUnitConversionRequest.ts
Normal file
121
vue3/src/openapi/models/PatchedUnitConversionRequest.ts
Normal file
@@ -0,0 +1,121 @@
|
||||
/* 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 { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedUnitConversionRequest
|
||||
*/
|
||||
export interface PatchedUnitConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
baseAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
baseUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
convertedAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
convertedUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
food?: FoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUnitConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUnitConversionRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionRequestFromJSON(json: any): PatchedUnitConversionRequest {
|
||||
return PatchedUnitConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : UnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'] == null ? undefined : json['converted_amount'],
|
||||
'convertedUnit': json['converted_unit'] == null ? undefined : UnitRequestFromJSON(json['converted_unit']),
|
||||
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionRequestToJSON(value?: PatchedUnitConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': UnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': UnitRequestToJSON(value['convertedUnit']),
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
134
vue3/src/openapi/models/PatchedUnitRequest.ts
Normal file
134
vue3/src/openapi/models/PatchedUnitRequest.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedUnitRequest
|
||||
*/
|
||||
export interface PatchedUnitRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
baseUnit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUnitRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUnitRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUnitRequestFromJSON(json: any): PatchedUnitRequest {
|
||||
return PatchedUnitRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : json['base_unit'],
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUnitRequestToJSON(value?: PatchedUnitRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'base_unit': value['baseUnit'],
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
299
vue3/src/openapi/models/PatchedUserPreferenceRequest.ts
Normal file
299
vue3/src/openapi/models/PatchedUserPreferenceRequest.ts
Normal file
@@ -0,0 +1,299 @@
|
||||
/* 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 { DefaultPageEnum } from './DefaultPageEnum';
|
||||
import {
|
||||
DefaultPageEnumFromJSON,
|
||||
DefaultPageEnumFromJSONTyped,
|
||||
DefaultPageEnumToJSON,
|
||||
} from './DefaultPageEnum';
|
||||
import type { ThemeEnum } from './ThemeEnum';
|
||||
import {
|
||||
ThemeEnumFromJSON,
|
||||
ThemeEnumFromJSONTyped,
|
||||
ThemeEnumToJSON,
|
||||
} from './ThemeEnum';
|
||||
import type { UserFileViewRequest } from './UserFileViewRequest';
|
||||
import {
|
||||
UserFileViewRequestFromJSON,
|
||||
UserFileViewRequestFromJSONTyped,
|
||||
UserFileViewRequestToJSON,
|
||||
} from './UserFileViewRequest';
|
||||
import type { UserPreferenceNavTextColorEnum } from './UserPreferenceNavTextColorEnum';
|
||||
import {
|
||||
UserPreferenceNavTextColorEnumFromJSON,
|
||||
UserPreferenceNavTextColorEnumFromJSONTyped,
|
||||
UserPreferenceNavTextColorEnumToJSON,
|
||||
} from './UserPreferenceNavTextColorEnum';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedUserPreferenceRequest
|
||||
*/
|
||||
export interface PatchedUserPreferenceRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
user?: number;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
image?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {ThemeEnum}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
theme?: ThemeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navBgColor?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UserPreferenceNavTextColorEnum}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navTextColor?: UserPreferenceNavTextColorEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navShowLogo?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
defaultUnit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {DefaultPageEnum}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
defaultPage?: DefaultPageEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
useFractions?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
useKj?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
planShare?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navSticky?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
ingredientDecimals?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
comments?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingAutoSync?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
mealplanAutoaddShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
defaultDelay?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
mealplanAutoincludeRelated?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
mealplanAutoexcludeOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingShare?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingRecentDays?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
csvDelim?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
csvPrefix?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
filterToSupermarket?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingAddOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
leftHanded?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
showStepIngredients?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUserPreferenceRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUserPreferenceRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUserPreferenceRequestFromJSON(json: any): PatchedUserPreferenceRequest {
|
||||
return PatchedUserPreferenceRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUserPreferenceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserPreferenceRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'user': json['user'] == null ? undefined : json['user'],
|
||||
'image': json['image'] == null ? undefined : UserFileViewRequestFromJSON(json['image']),
|
||||
'theme': json['theme'] == null ? undefined : ThemeEnumFromJSON(json['theme']),
|
||||
'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'],
|
||||
'navTextColor': json['nav_text_color'] == null ? undefined : UserPreferenceNavTextColorEnumFromJSON(json['nav_text_color']),
|
||||
'navShowLogo': json['nav_show_logo'] == null ? undefined : json['nav_show_logo'],
|
||||
'defaultUnit': json['default_unit'] == null ? undefined : json['default_unit'],
|
||||
'defaultPage': json['default_page'] == null ? undefined : DefaultPageEnumFromJSON(json['default_page']),
|
||||
'useFractions': json['use_fractions'] == null ? undefined : json['use_fractions'],
|
||||
'useKj': json['use_kj'] == null ? undefined : json['use_kj'],
|
||||
'planShare': json['plan_share'] == null ? undefined : ((json['plan_share'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'navSticky': json['nav_sticky'] == null ? undefined : json['nav_sticky'],
|
||||
'ingredientDecimals': json['ingredient_decimals'] == null ? undefined : json['ingredient_decimals'],
|
||||
'comments': json['comments'] == null ? undefined : json['comments'],
|
||||
'shoppingAutoSync': json['shopping_auto_sync'] == null ? undefined : json['shopping_auto_sync'],
|
||||
'mealplanAutoaddShopping': json['mealplan_autoadd_shopping'] == null ? undefined : json['mealplan_autoadd_shopping'],
|
||||
'defaultDelay': json['default_delay'] == null ? undefined : json['default_delay'],
|
||||
'mealplanAutoincludeRelated': json['mealplan_autoinclude_related'] == null ? undefined : json['mealplan_autoinclude_related'],
|
||||
'mealplanAutoexcludeOnhand': json['mealplan_autoexclude_onhand'] == null ? undefined : json['mealplan_autoexclude_onhand'],
|
||||
'shoppingShare': json['shopping_share'] == null ? undefined : ((json['shopping_share'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'shoppingRecentDays': json['shopping_recent_days'] == null ? undefined : json['shopping_recent_days'],
|
||||
'csvDelim': json['csv_delim'] == null ? undefined : json['csv_delim'],
|
||||
'csvPrefix': json['csv_prefix'] == null ? undefined : json['csv_prefix'],
|
||||
'filterToSupermarket': json['filter_to_supermarket'] == null ? undefined : json['filter_to_supermarket'],
|
||||
'shoppingAddOnhand': json['shopping_add_onhand'] == null ? undefined : json['shopping_add_onhand'],
|
||||
'leftHanded': json['left_handed'] == null ? undefined : json['left_handed'],
|
||||
'showStepIngredients': json['show_step_ingredients'] == null ? undefined : json['show_step_ingredients'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUserPreferenceRequestToJSON(value?: PatchedUserPreferenceRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'user': value['user'],
|
||||
'image': UserFileViewRequestToJSON(value['image']),
|
||||
'theme': ThemeEnumToJSON(value['theme']),
|
||||
'nav_bg_color': value['navBgColor'],
|
||||
'nav_text_color': UserPreferenceNavTextColorEnumToJSON(value['navTextColor']),
|
||||
'nav_show_logo': value['navShowLogo'],
|
||||
'default_unit': value['defaultUnit'],
|
||||
'default_page': DefaultPageEnumToJSON(value['defaultPage']),
|
||||
'use_fractions': value['useFractions'],
|
||||
'use_kj': value['useKj'],
|
||||
'plan_share': value['planShare'] == null ? undefined : ((value['planShare'] as Array<any>).map(UserRequestToJSON)),
|
||||
'nav_sticky': value['navSticky'],
|
||||
'ingredient_decimals': value['ingredientDecimals'],
|
||||
'comments': value['comments'],
|
||||
'shopping_auto_sync': value['shoppingAutoSync'],
|
||||
'mealplan_autoadd_shopping': value['mealplanAutoaddShopping'],
|
||||
'default_delay': value['defaultDelay'],
|
||||
'mealplan_autoinclude_related': value['mealplanAutoincludeRelated'],
|
||||
'mealplan_autoexclude_onhand': value['mealplanAutoexcludeOnhand'],
|
||||
'shopping_share': value['shoppingShare'] == null ? undefined : ((value['shoppingShare'] as Array<any>).map(UserRequestToJSON)),
|
||||
'shopping_recent_days': value['shoppingRecentDays'],
|
||||
'csv_delim': value['csvDelim'],
|
||||
'csv_prefix': value['csvPrefix'],
|
||||
'filter_to_supermarket': value['filterToSupermarket'],
|
||||
'shopping_add_onhand': value['shoppingAddOnhand'],
|
||||
'left_handed': value['leftHanded'],
|
||||
'show_step_ingredients': value['showStepIngredients'],
|
||||
};
|
||||
}
|
||||
|
||||
76
vue3/src/openapi/models/PatchedUserRequest.ts
Normal file
76
vue3/src/openapi/models/PatchedUserRequest.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/* 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';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedUserRequest
|
||||
*/
|
||||
export interface PatchedUserRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserRequest
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserRequest
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUserRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUserRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUserRequestFromJSON(json: any): PatchedUserRequest {
|
||||
return PatchedUserRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'firstName': json['first_name'] == null ? undefined : json['first_name'],
|
||||
'lastName': json['last_name'] == null ? undefined : json['last_name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUserRequestToJSON(value?: PatchedUserRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value['firstName'],
|
||||
'last_name': value['lastName'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
91
vue3/src/openapi/models/PatchedUserSpaceRequest.ts
Normal file
91
vue3/src/openapi/models/PatchedUserSpaceRequest.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
/* 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 { GroupRequest } from './GroupRequest';
|
||||
import {
|
||||
GroupRequestFromJSON,
|
||||
GroupRequestFromJSONTyped,
|
||||
GroupRequestToJSON,
|
||||
} from './GroupRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedUserSpaceRequest
|
||||
*/
|
||||
export interface PatchedUserSpaceRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<GroupRequest>}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
groups?: Array<GroupRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
active?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUserSpaceRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUserSpaceRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUserSpaceRequestFromJSON(json: any): PatchedUserSpaceRequest {
|
||||
return PatchedUserSpaceRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUserSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSpaceRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'groups': json['groups'] == null ? undefined : ((json['groups'] as Array<any>).map(GroupRequestFromJSON)),
|
||||
'active': json['active'] == null ? undefined : json['active'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUserSpaceRequestToJSON(value?: PatchedUserSpaceRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'groups': value['groups'] == null ? undefined : ((value['groups'] as Array<any>).map(GroupRequestToJSON)),
|
||||
'active': value['active'],
|
||||
'internal_note': value['internalNote'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user