-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtype.d.ts
More file actions
107 lines (92 loc) · 2.08 KB
/
type.d.ts
File metadata and controls
107 lines (92 loc) · 2.08 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { Models } from "react-native-appwrite";
export interface MenuItem extends Models.Document {
name: string;
price: number;
image_url: string;
description: string;
calories: number;
protein: number;
rating: number;
type: string;
}
export interface Category extends Models.Document {
name: string;
description: string;
}
export interface User extends Models.Document {
name: string;
email: string;
avatar: string;
}
export interface CartCustomization {
id: string;
name: string;
price: number;
type: string;
}
export interface CartItemType {
id: string; // menu item id
name: string;
price: number;
image_url: string;
quantity: number;
customizations?: CartCustomization[];
}
export interface CartStore {
items: CartItem[];
addItem: (item: Omit<CartItem, "quantity">) => void;
removeItem: (id: string, customizations: CartCustomization[]) => void;
increaseQty: (id: string, customizations: CartCustomization[]) => void;
decreaseQty: (id: string, customizations: CartCustomization[]) => void;
clearCart: () => void;
getTotalItems: () => number;
getTotalPrice: () => number;
}
interface TabBarIconProps {
focused: boolean;
icon: ImageSourcePropType;
title: string;
}
interface PaymentInfoStripeProps {
label: string;
value: string;
labelStyle?: string;
valueStyle?: string;
}
interface CustomButtonProps {
onPress?: () => void;
title?: string;
style?: string;
leftIcon?: React.ReactNode;
textStyle?: string;
isLoading?: boolean;
}
interface CustomHeaderProps {
title?: string;
}
interface CustomInputProps {
placeholder?: string;
value?: string;
onChangeText?: (text: string) => void;
label: string;
secureTextEntry?: boolean;
keyboardType?: "default" | "email-address" | "numeric" | "phone-pad";
}
interface ProfileFieldProps {
label: string;
value: string;
icon: ImageSourcePropType;
}
interface CreateUserParams {
email: string;
password: string;
name: string;
}
interface SignInParams {
email: string;
password: string;
}
interface GetMenuParams {
category: string;
query: string;
}