-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
86 lines (77 loc) · 2.72 KB
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import {
type CreateFoodType,
type GetFoodTypes
} from 'controllers/sql/foodTypes/types'
import {
type CreateIngredient,
type GetIngredients,
type TIngr_purchase_places
} from 'controllers/sql/ingredients/types'
import {
type CreateIngredientStock,
type GetIngredientStock
} from 'controllers/sql/ingredientStock/types'
import {
type CreateMenu,
type GetMenus
} from 'controllers/nextjs/MenuCRUD'
import {
type CreatePurchasePlace,
type GetPurchasePlaces
} from 'controllers/sql/purchasePlaces/types'
import {
type CreateUom,
type GetUnitsOfMeasureData
} from 'controllers/sql/unitsOfMeasure/types'
import {
type GetWeeklyMenu,
type TCreateWeeklyMenus
} from 'controllers/sql/weeklyMenus/types'
import {
type CreateFood
} from 'redux/slices/foodsSlice/types'
import { type GetDays } from 'controllers/sql/days/types'
import {
type GetFoods
} from 'controllers/nextjs/foodsCRUD'
import {
type GetMenusIngredients
} from 'controllers/sql/menus/getMenusIngredientsSql'
import { type OpenDialogReturnValue } from 'electron'
import { type units_of_measure } from '@prisma/client'
import { type units_of_measure_types } from 'controllers/dbTablesTypes'
// Electron bridges
declare global {
interface Window {
// Database
getUomData: () => GetUnitsOfMeasureData
getDaysData: () => GetDays
getFoodTypesData: () => GetFoodTypes
getFoodsData: () => GetFoods
getIngredientsStockData: () => GetIngredientStock
getMenusData: () => GetMenus
getWeeklyMenusData: () => GetWeeklyMenu
getIngredientsData: () => GetIngredients
getMenusIngredients: () => GetMenusIngredients
getPurchasePlacesData: () => GetPurchasePlaces
createMenus: (menu: CreateMenu) => GetMenus[0]
createFoods: (food: CreateFood) => GetFoods[0]
createFoodType: (foodType: CreateFoodType) => GetFoodTypes[0]
createIngredients: (ingredient: CreateIngredient) => GetIngredients[0]
createIngredientsStock: (ingredientsStock: CreateIngredientStock) => GetIngredientStock[0]
createUnitsOfMeausure: (unitOfMeasure: CreateUom) => units_of_measure
createUnitsOfMeasureTypes: (uomType) => GetFoodTypes[0]
createIngredientPurchasePlaces:
(ingredientId: number, purchasePlacesid: number[]) => TIngr_purchase_places
createWeeklyMenu: (weeklyMenu: TCreateWeeklyMenus) => GetWeeklyMenu[0]
createPurchasePlaces: (purchasePlace: CreatePurchasePlace) => GetPurchasePlaces[0]
updateUnitsOfMeasureTypes:
(unitsOfMeasureTypes: units_of_measure_types) => units_of_measure_types
updateUnitsOfMeasure: (unitsOfMeasure: units_of_measure) => units_of_measure
// Os
selectImage: () => Promise<OpenDialogReturnValue & {
base64Image: string
}>
getBase64Image: (filePath) => Promise<string>
}
}