food402 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/dist/api.d.ts +417 -0
- package/dist/api.js +1164 -0
- package/dist/auth.d.ts +16 -0
- package/dist/auth.js +117 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +455 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Food402 MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP (Model Context Protocol) server that enables AI assistants to order food from TGO Yemek. Simply chat with your AI assistant to browse restaurants, build your order, and complete checkout.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"food402": {
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": ["-y", "food402"],
|
|
15
|
+
"env": {
|
|
16
|
+
"TGO_EMAIL": "your-email@example.com",
|
|
17
|
+
"TGO_PASSWORD": "your-password"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Replace `your-email@example.com` and `your-password` with your TGO Yemek credentials.
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
### Account Setup Required
|
|
29
|
+
|
|
30
|
+
Before using this MCP server, you must have a TGO Yemek account with:
|
|
31
|
+
|
|
32
|
+
1. **TGO Yemek account** - Create one at tgoyemek.com if you don't have one
|
|
33
|
+
2. **Payment card saved to your account** - The checkout process requires a saved card; you cannot enter card details during ordering
|
|
34
|
+
3. **At least one delivery address saved** (recommended) - You can add addresses through the MCP, but having one pre-configured makes ordering faster
|
|
35
|
+
|
|
36
|
+
## Quick Start: Ordering Flow
|
|
37
|
+
|
|
38
|
+
Here's the typical workflow when ordering food through the AI assistant:
|
|
39
|
+
|
|
40
|
+
### 1. Select Delivery Address
|
|
41
|
+
```
|
|
42
|
+
"Show me my saved addresses"
|
|
43
|
+
"Select my home address for delivery"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. Find Restaurants
|
|
47
|
+
```
|
|
48
|
+
"What restaurants are near me?"
|
|
49
|
+
"Search for pizza restaurants"
|
|
50
|
+
"Find places that serve lahmacun"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. Browse Menu & Add Items
|
|
54
|
+
```
|
|
55
|
+
"Show me the menu for [restaurant name]"
|
|
56
|
+
"Add 2 lahmacun to my cart"
|
|
57
|
+
"What customization options are available for this item?"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 4. Review & Checkout
|
|
61
|
+
```
|
|
62
|
+
"Show me my basket"
|
|
63
|
+
"Remove the drink from my order"
|
|
64
|
+
"I'm ready to checkout"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 5. Place Order
|
|
68
|
+
```
|
|
69
|
+
"Place my order using my saved card"
|
|
70
|
+
```
|
|
71
|
+
*Note: A browser window will open for 3D Secure verification. Complete the verification to finalize your order.*
|
|
72
|
+
|
|
73
|
+
### 6. Track Order
|
|
74
|
+
```
|
|
75
|
+
"What's the status of my order?"
|
|
76
|
+
"Show me my recent orders"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Available Tools
|
|
80
|
+
|
|
81
|
+
| Tool | Description | Parameters |
|
|
82
|
+
|------|-------------|------------|
|
|
83
|
+
| `get_addresses` | Get user's saved delivery addresses | None |
|
|
84
|
+
| `select_address` | Select delivery address (must call before ordering) | `addressId` |
|
|
85
|
+
| `get_restaurants` | Search restaurants near a location | `latitude`, `longitude`, `page?` |
|
|
86
|
+
| `search_restaurants` | Search restaurants and products by keyword | `searchQuery`, `latitude`, `longitude`, `page?` |
|
|
87
|
+
| `get_restaurant_menu` | Get restaurant's full menu | `restaurantId`, `latitude`, `longitude` |
|
|
88
|
+
| `get_product_details` | Get product customization options | `restaurantId`, `productId`, `latitude`, `longitude` |
|
|
89
|
+
| `get_product_recommendations` | Get "goes well with" suggestions | `restaurantId`, `productIds[]` |
|
|
90
|
+
| `add_to_basket` | Add items to cart | `storeId`, `items[]`, `latitude`, `longitude`, etc. |
|
|
91
|
+
| `get_basket` | Get current cart contents | None |
|
|
92
|
+
| `remove_from_basket` | Remove item from cart | `itemId` |
|
|
93
|
+
| `clear_basket` | Clear entire cart | None |
|
|
94
|
+
| `get_cities` | Get list of all cities for address selection | None |
|
|
95
|
+
| `get_districts` | Get districts for a city | `cityId` |
|
|
96
|
+
| `get_neighborhoods` | Get neighborhoods for a district | `districtId` |
|
|
97
|
+
| `add_address` | Add a new delivery address | `name`, `surname`, `phone`, `addressName`, `addressLine`, `cityId`, `districtId`, `neighborhoodId`, `latitude`, `longitude`, etc. |
|
|
98
|
+
| `get_saved_cards` | Get user's saved payment cards (masked) | None |
|
|
99
|
+
| `checkout_ready` | Get basket ready for checkout with payment context | None |
|
|
100
|
+
| `set_order_note` | Set order note and delivery preferences | `note?`, `noServiceWare?`, `contactlessDelivery?`, `dontRingBell?` |
|
|
101
|
+
| `place_order` | Place order with 3D Secure (opens browser for verification) | `cardId` |
|
|
102
|
+
| `get_orders` | Get user's order history with status | `page?` |
|
|
103
|
+
| `get_order_detail` | Get detailed order info including delivery status | `orderId` |
|
|
104
|
+
|
|
105
|
+
## Development
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Clone the repository
|
|
109
|
+
git clone https://github.com/getclave/food402.git
|
|
110
|
+
cd food402
|
|
111
|
+
|
|
112
|
+
# Install dependencies
|
|
113
|
+
npm install
|
|
114
|
+
|
|
115
|
+
# Run in development mode
|
|
116
|
+
npm start
|
|
117
|
+
|
|
118
|
+
# Build TypeScript
|
|
119
|
+
npm run build
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
export interface Address {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
surname: string;
|
|
5
|
+
phone: string;
|
|
6
|
+
countryPhoneCode: string;
|
|
7
|
+
addressLine: string;
|
|
8
|
+
addressName: string;
|
|
9
|
+
postalCode: string;
|
|
10
|
+
cityId: number;
|
|
11
|
+
cityName: string;
|
|
12
|
+
districtId: number;
|
|
13
|
+
districtName: string;
|
|
14
|
+
neighborhoodId: number;
|
|
15
|
+
neighborhoodName: string;
|
|
16
|
+
latitude: string;
|
|
17
|
+
longitude: string;
|
|
18
|
+
addressDescription: string;
|
|
19
|
+
apartmentNumber: string;
|
|
20
|
+
floor: string;
|
|
21
|
+
doorNumber: string;
|
|
22
|
+
addressType: string;
|
|
23
|
+
elevatorAvailable: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface AddressesResponse {
|
|
26
|
+
infoMessage: string | null;
|
|
27
|
+
id: string;
|
|
28
|
+
addresses: Address[];
|
|
29
|
+
}
|
|
30
|
+
export interface Restaurant {
|
|
31
|
+
id: number;
|
|
32
|
+
name: string;
|
|
33
|
+
kitchen: string;
|
|
34
|
+
rating: number;
|
|
35
|
+
ratingText: string;
|
|
36
|
+
minBasketPrice: number;
|
|
37
|
+
averageDeliveryInterval: string;
|
|
38
|
+
distance: number;
|
|
39
|
+
neighborhoodName: string;
|
|
40
|
+
isClosed: boolean;
|
|
41
|
+
campaignText?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface RestaurantsResponse {
|
|
44
|
+
restaurants: Restaurant[];
|
|
45
|
+
totalCount: number;
|
|
46
|
+
currentPage: number;
|
|
47
|
+
pageSize: number;
|
|
48
|
+
hasNextPage: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare function getAddresses(): Promise<AddressesResponse>;
|
|
51
|
+
export interface MenuItem {
|
|
52
|
+
id: number;
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
price: number;
|
|
56
|
+
likePercentage?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface MenuCategory {
|
|
59
|
+
name: string;
|
|
60
|
+
slug: string;
|
|
61
|
+
items: MenuItem[];
|
|
62
|
+
}
|
|
63
|
+
export interface RestaurantInfo {
|
|
64
|
+
id: number;
|
|
65
|
+
name: string;
|
|
66
|
+
status: string;
|
|
67
|
+
rating: number;
|
|
68
|
+
ratingText: string;
|
|
69
|
+
workingHours: string;
|
|
70
|
+
deliveryTime: string;
|
|
71
|
+
minOrderPrice: number;
|
|
72
|
+
}
|
|
73
|
+
export interface RestaurantMenuResponse {
|
|
74
|
+
info: RestaurantInfo;
|
|
75
|
+
categories: MenuCategory[];
|
|
76
|
+
totalItems: number;
|
|
77
|
+
}
|
|
78
|
+
export declare function getRestaurants(latitude: string, longitude: string, page?: number): Promise<RestaurantsResponse>;
|
|
79
|
+
export declare function getRestaurantMenu(restaurantId: number, latitude: string, longitude: string): Promise<RestaurantMenuResponse>;
|
|
80
|
+
export interface RecommendedItem {
|
|
81
|
+
id: number;
|
|
82
|
+
name: string;
|
|
83
|
+
description: string | null;
|
|
84
|
+
price: number;
|
|
85
|
+
imageUrl: string;
|
|
86
|
+
}
|
|
87
|
+
export interface RecommendationCollection {
|
|
88
|
+
name: string;
|
|
89
|
+
items: RecommendedItem[];
|
|
90
|
+
}
|
|
91
|
+
export interface ProductRecommendationsResponse {
|
|
92
|
+
collections: RecommendationCollection[];
|
|
93
|
+
totalItems: number;
|
|
94
|
+
}
|
|
95
|
+
export declare function getProductRecommendations(restaurantId: number, productIds: number[]): Promise<ProductRecommendationsResponse>;
|
|
96
|
+
export interface ProductOption {
|
|
97
|
+
id: number;
|
|
98
|
+
name: string;
|
|
99
|
+
price: number;
|
|
100
|
+
selected: boolean;
|
|
101
|
+
isPopular?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface ProductComponent {
|
|
104
|
+
type: "INGREDIENTS" | "MODIFIER_GROUP";
|
|
105
|
+
title: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
modifierGroupId?: number;
|
|
108
|
+
options: ProductOption[];
|
|
109
|
+
isSingleChoice: boolean;
|
|
110
|
+
minSelections: number;
|
|
111
|
+
maxSelections: number;
|
|
112
|
+
}
|
|
113
|
+
export interface ProductDetailsResponse {
|
|
114
|
+
restaurantId: number;
|
|
115
|
+
restaurantName: string;
|
|
116
|
+
productId: number;
|
|
117
|
+
productName: string;
|
|
118
|
+
description: string;
|
|
119
|
+
imageUrl: string;
|
|
120
|
+
price: number;
|
|
121
|
+
maxQuantity: number;
|
|
122
|
+
components: ProductComponent[];
|
|
123
|
+
}
|
|
124
|
+
export declare function getProductDetails(restaurantId: number, productId: number, latitude: string, longitude: string): Promise<ProductDetailsResponse>;
|
|
125
|
+
export interface IngredientExclusion {
|
|
126
|
+
id: number;
|
|
127
|
+
}
|
|
128
|
+
export interface ModifierProduct {
|
|
129
|
+
productId: number;
|
|
130
|
+
modifierGroupId: number;
|
|
131
|
+
modifierProducts: ModifierProduct[];
|
|
132
|
+
ingredientOptions: {
|
|
133
|
+
excludes: IngredientExclusion[];
|
|
134
|
+
includes: [];
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export interface BasketItem {
|
|
138
|
+
productId: number;
|
|
139
|
+
quantity: number;
|
|
140
|
+
modifierProducts: ModifierProduct[];
|
|
141
|
+
ingredientOptions: {
|
|
142
|
+
excludes: IngredientExclusion[];
|
|
143
|
+
includes: [];
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export interface AddToBasketRequest {
|
|
147
|
+
storeId: number;
|
|
148
|
+
items: BasketItem[];
|
|
149
|
+
isFlashSale: boolean;
|
|
150
|
+
storePickup: boolean;
|
|
151
|
+
latitude: number;
|
|
152
|
+
longitude: number;
|
|
153
|
+
}
|
|
154
|
+
export interface CartProduct {
|
|
155
|
+
productId: number;
|
|
156
|
+
itemId: string;
|
|
157
|
+
name: string;
|
|
158
|
+
quantity: number;
|
|
159
|
+
salePrice: number;
|
|
160
|
+
description: string;
|
|
161
|
+
}
|
|
162
|
+
export interface CartStore {
|
|
163
|
+
id: number;
|
|
164
|
+
name: string;
|
|
165
|
+
imageUrl: string;
|
|
166
|
+
rating: number;
|
|
167
|
+
averageDeliveryInterval: string;
|
|
168
|
+
minAmount: number;
|
|
169
|
+
}
|
|
170
|
+
export interface CartSummaryLine {
|
|
171
|
+
title: string;
|
|
172
|
+
amount: number;
|
|
173
|
+
isPromotion?: boolean;
|
|
174
|
+
}
|
|
175
|
+
export interface AddToBasketResponse {
|
|
176
|
+
store: CartStore;
|
|
177
|
+
products: CartProduct[];
|
|
178
|
+
summary: CartSummaryLine[];
|
|
179
|
+
totalProductCount: number;
|
|
180
|
+
totalProductPrice: number;
|
|
181
|
+
totalProductPriceDiscounted: number;
|
|
182
|
+
totalPrice: number;
|
|
183
|
+
deliveryPrice: number;
|
|
184
|
+
}
|
|
185
|
+
export interface SetShippingAddressRequest {
|
|
186
|
+
shippingAddressId: number;
|
|
187
|
+
invoiceAddressId: number;
|
|
188
|
+
}
|
|
189
|
+
export declare function setShippingAddress(request: SetShippingAddressRequest): Promise<void>;
|
|
190
|
+
export declare function addToBasket(request: AddToBasketRequest): Promise<AddToBasketResponse>;
|
|
191
|
+
export interface CartProductDetails extends CartProduct {
|
|
192
|
+
marketPrice: number;
|
|
193
|
+
modifierProducts: Array<{
|
|
194
|
+
productId: number;
|
|
195
|
+
modifierGroupId: number;
|
|
196
|
+
name: string;
|
|
197
|
+
price: number;
|
|
198
|
+
}>;
|
|
199
|
+
ingredientExcludes: Array<{
|
|
200
|
+
id: number;
|
|
201
|
+
name: string;
|
|
202
|
+
}>;
|
|
203
|
+
}
|
|
204
|
+
export interface CartStoreGroup {
|
|
205
|
+
store: CartStore;
|
|
206
|
+
products: CartProductDetails[];
|
|
207
|
+
}
|
|
208
|
+
export interface GetBasketResponse {
|
|
209
|
+
storeGroups: CartStoreGroup[];
|
|
210
|
+
summary: CartSummaryLine[];
|
|
211
|
+
totalProductCount: number;
|
|
212
|
+
totalProductPrice: number;
|
|
213
|
+
totalProductPriceDiscounted: number;
|
|
214
|
+
totalPrice: number;
|
|
215
|
+
deliveryPrice: number;
|
|
216
|
+
isEmpty: boolean;
|
|
217
|
+
}
|
|
218
|
+
export declare function getBasket(): Promise<GetBasketResponse>;
|
|
219
|
+
export declare function removeFromBasket(itemId: string): Promise<GetBasketResponse>;
|
|
220
|
+
export declare function clearBasket(): Promise<void>;
|
|
221
|
+
export interface SearchProduct {
|
|
222
|
+
id: number;
|
|
223
|
+
name: string;
|
|
224
|
+
description?: string;
|
|
225
|
+
price: number;
|
|
226
|
+
imageUrl?: string;
|
|
227
|
+
}
|
|
228
|
+
export interface SearchRestaurant extends Restaurant {
|
|
229
|
+
products: SearchProduct[];
|
|
230
|
+
warning?: string;
|
|
231
|
+
}
|
|
232
|
+
export interface SearchRestaurantsResponse {
|
|
233
|
+
restaurants: SearchRestaurant[];
|
|
234
|
+
totalCount: number;
|
|
235
|
+
currentPage: number;
|
|
236
|
+
pageSize: number;
|
|
237
|
+
hasNextPage: boolean;
|
|
238
|
+
searchQuery: string;
|
|
239
|
+
}
|
|
240
|
+
export interface City {
|
|
241
|
+
id: number;
|
|
242
|
+
code: string;
|
|
243
|
+
name: string;
|
|
244
|
+
}
|
|
245
|
+
export interface District {
|
|
246
|
+
id: number;
|
|
247
|
+
name: string;
|
|
248
|
+
}
|
|
249
|
+
export interface Neighborhood {
|
|
250
|
+
id: number;
|
|
251
|
+
name: string;
|
|
252
|
+
}
|
|
253
|
+
export interface CitiesResponse {
|
|
254
|
+
cities: City[];
|
|
255
|
+
count: number;
|
|
256
|
+
}
|
|
257
|
+
export interface DistrictsResponse {
|
|
258
|
+
districts: District[];
|
|
259
|
+
count: number;
|
|
260
|
+
cityId: number;
|
|
261
|
+
}
|
|
262
|
+
export interface NeighborhoodsResponse {
|
|
263
|
+
neighborhoods: Neighborhood[];
|
|
264
|
+
count: number;
|
|
265
|
+
districtId: number;
|
|
266
|
+
}
|
|
267
|
+
export declare function getCities(): Promise<CitiesResponse>;
|
|
268
|
+
export declare function getDistricts(cityId: number): Promise<DistrictsResponse>;
|
|
269
|
+
export declare function getNeighborhoods(districtId: number): Promise<NeighborhoodsResponse>;
|
|
270
|
+
export interface AddAddressRequest {
|
|
271
|
+
name: string;
|
|
272
|
+
surname: string;
|
|
273
|
+
phone: string;
|
|
274
|
+
apartmentNumber?: string;
|
|
275
|
+
floor?: string;
|
|
276
|
+
doorNumber?: string;
|
|
277
|
+
addressName: string;
|
|
278
|
+
addressDescription?: string;
|
|
279
|
+
addressLine: string;
|
|
280
|
+
cityId: number;
|
|
281
|
+
districtId: number;
|
|
282
|
+
neighborhoodId: number;
|
|
283
|
+
latitude: string;
|
|
284
|
+
longitude: string;
|
|
285
|
+
countryCode?: string;
|
|
286
|
+
elevatorAvailable?: boolean;
|
|
287
|
+
}
|
|
288
|
+
export interface AddAddressResponse {
|
|
289
|
+
success: boolean;
|
|
290
|
+
address?: Address;
|
|
291
|
+
requiresOtp?: boolean;
|
|
292
|
+
message: string;
|
|
293
|
+
}
|
|
294
|
+
export declare function addAddress(request: AddAddressRequest): Promise<AddAddressResponse>;
|
|
295
|
+
export interface SavedCard {
|
|
296
|
+
cardId: number;
|
|
297
|
+
name: string;
|
|
298
|
+
maskedCardNumber: string;
|
|
299
|
+
cardTypeName: string;
|
|
300
|
+
bankName: string;
|
|
301
|
+
isDebitCard: boolean;
|
|
302
|
+
cvvRequired: boolean;
|
|
303
|
+
cardNetwork: string;
|
|
304
|
+
}
|
|
305
|
+
export interface SavedCardsResponse {
|
|
306
|
+
cards: SavedCard[];
|
|
307
|
+
hasCards: boolean;
|
|
308
|
+
message?: string;
|
|
309
|
+
}
|
|
310
|
+
export interface CheckoutReadyResponse {
|
|
311
|
+
ready: boolean;
|
|
312
|
+
store: CartStore;
|
|
313
|
+
products: CartProductDetails[];
|
|
314
|
+
summary: CartSummaryLine[];
|
|
315
|
+
totalPrice: number;
|
|
316
|
+
deliveryPrice: number;
|
|
317
|
+
warnings: string[];
|
|
318
|
+
}
|
|
319
|
+
export interface PlaceOrderResponse {
|
|
320
|
+
success: boolean;
|
|
321
|
+
orderId?: string;
|
|
322
|
+
requires3DSecure?: boolean;
|
|
323
|
+
redirectUrl?: string;
|
|
324
|
+
htmlContent?: string;
|
|
325
|
+
message: string;
|
|
326
|
+
}
|
|
327
|
+
export interface CustomerNoteRequest {
|
|
328
|
+
customerNote: string;
|
|
329
|
+
noServiceWare: boolean;
|
|
330
|
+
contactlessDelivery: boolean;
|
|
331
|
+
dontRingBell: boolean;
|
|
332
|
+
}
|
|
333
|
+
export declare function updateCustomerNote(request: CustomerNoteRequest): Promise<void>;
|
|
334
|
+
export declare function getSavedCards(): Promise<SavedCardsResponse>;
|
|
335
|
+
export declare function getCheckoutReady(): Promise<CheckoutReadyResponse>;
|
|
336
|
+
export declare function placeOrder(cardId: number): Promise<PlaceOrderResponse>;
|
|
337
|
+
export interface OrderStatus {
|
|
338
|
+
status: string;
|
|
339
|
+
statusText: string;
|
|
340
|
+
statusColor: string;
|
|
341
|
+
}
|
|
342
|
+
export interface OrderStore {
|
|
343
|
+
id: number;
|
|
344
|
+
name: string;
|
|
345
|
+
}
|
|
346
|
+
export interface OrderPrice {
|
|
347
|
+
totalPrice: number;
|
|
348
|
+
totalPriceText: string;
|
|
349
|
+
refundedPrice: number;
|
|
350
|
+
cancelledPrice: number;
|
|
351
|
+
totalDeliveryPrice: number;
|
|
352
|
+
totalServicePrice: number;
|
|
353
|
+
}
|
|
354
|
+
export interface OrderProductSummary {
|
|
355
|
+
productId: number;
|
|
356
|
+
name: string;
|
|
357
|
+
imageUrl: string;
|
|
358
|
+
}
|
|
359
|
+
export interface Order {
|
|
360
|
+
id: string;
|
|
361
|
+
orderDate: string;
|
|
362
|
+
store: OrderStore;
|
|
363
|
+
status: OrderStatus;
|
|
364
|
+
price: OrderPrice;
|
|
365
|
+
productSummary: string;
|
|
366
|
+
products: OrderProductSummary[];
|
|
367
|
+
isReady: boolean;
|
|
368
|
+
}
|
|
369
|
+
export interface OrdersResponse {
|
|
370
|
+
orders: Order[];
|
|
371
|
+
pagination: {
|
|
372
|
+
currentPage: number;
|
|
373
|
+
pageSize: number;
|
|
374
|
+
totalCount: number;
|
|
375
|
+
hasNext: boolean;
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
export interface OrderDetailProduct {
|
|
379
|
+
name: string;
|
|
380
|
+
imageUrl: string;
|
|
381
|
+
salePrice: number;
|
|
382
|
+
salePriceText: string;
|
|
383
|
+
quantity: number;
|
|
384
|
+
description: string;
|
|
385
|
+
}
|
|
386
|
+
export interface OrderStatusStep {
|
|
387
|
+
status: string;
|
|
388
|
+
statusText: string;
|
|
389
|
+
}
|
|
390
|
+
export interface OrderShipmentItem {
|
|
391
|
+
status: OrderStatus;
|
|
392
|
+
statusSteps: OrderStatusStep[];
|
|
393
|
+
products: OrderDetailProduct[];
|
|
394
|
+
}
|
|
395
|
+
export interface OrderDetail {
|
|
396
|
+
orderId: string;
|
|
397
|
+
orderNumber: string;
|
|
398
|
+
orderDate: string;
|
|
399
|
+
customerNote: string;
|
|
400
|
+
store: OrderStore;
|
|
401
|
+
eta: string;
|
|
402
|
+
deliveredDate: string;
|
|
403
|
+
status: OrderStatus;
|
|
404
|
+
statusSteps: OrderStatusStep[];
|
|
405
|
+
products: OrderDetailProduct[];
|
|
406
|
+
price: OrderPrice;
|
|
407
|
+
paymentDescription: string;
|
|
408
|
+
deliveryAddress: {
|
|
409
|
+
name: string;
|
|
410
|
+
address: string;
|
|
411
|
+
districtCity: string;
|
|
412
|
+
phoneNumber: string;
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
export declare function getOrders(page?: number): Promise<OrdersResponse>;
|
|
416
|
+
export declare function getOrderDetail(orderId: string): Promise<OrderDetail>;
|
|
417
|
+
export declare function searchRestaurants(searchQuery: string, latitude: string, longitude: string, page?: number): Promise<SearchRestaurantsResponse>;
|