@open-tender/utils
Version:
A library of utils for use with Open Tender applications that utilize our cloud-based Order API.
58 lines (57 loc) • 2.12 kB
TypeScript
import { CartCounts, CartItem, ThemeMenuItemsContentDescription, MenuItemFavorite } from '@open-tender/types';
export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavorite | null, allergenAlerts?: string[], cartCounts?: CartCounts, showCals?: boolean, showTags?: boolean, showAllergens?: boolean, showDesc?: ThemeMenuItemsContentDescription, tagsAllert?: string[]) => {
displayDesc: string | null;
displayTags: string[];
displayAllergens: string[];
displayPrice: string;
displayCals: string | null;
isIncomplete: boolean;
isSoldOut: boolean;
allergenAlert: string | null;
tagAlert: string | null;
hasSelections: boolean;
sizeOnly: boolean | undefined;
cartCount: number;
cartGuestId: number | null;
customerId: number | null;
index?: number | undefined;
madeFor: string | null;
notes: string | null;
signature?: string | undefined;
similarItems: number[];
upsellItems: number[];
list_name: string | null;
list_id: string | null;
menu_position: number | null;
allergens: string[];
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
cals: number | null;
description: string | null;
groups: import("@open-tender/types").CartItemGroups;
id: number;
imageUrl: string | null;
appImageUrl?: string | null | undefined;
increment: number;
ingredients: string | null;
max: number;
min: number;
name: string;
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
points: number | null;
pos_ext_id: string | null;
price: number;
quantity: number;
shorthand: string | null;
shortDescription: string | null;
shortName: string;
slug: string;
suspend_until: number | null;
tags: string[];
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
totalAllergens: string[];
totalCals: number | null;
totalPoints: number | null;
totalPrice: number | null;
itemShape: import("@open-tender/types").PizzaShape | null;
excludeFromBuilder: boolean;
};