@open-tender/types 0.1.9 → 0.2.1
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.
|
@@ -56,6 +56,10 @@ export declare type CartItemGroups = CartItemGroup[];
|
|
|
56
56
|
export declare type Cart = CartItem[];
|
|
57
57
|
export declare type CartLevels = number[][];
|
|
58
58
|
export declare type CartCounts = Record<string, number>;
|
|
59
|
+
export interface CartErrors extends Record<string, Cart> {
|
|
60
|
+
missingItems: Cart;
|
|
61
|
+
invalidItems: Cart;
|
|
62
|
+
}
|
|
59
63
|
export declare type CartItemOptionLookup = Record<string, CartItemOption>;
|
|
60
64
|
export declare type CartItemGroupLookupOptions = Omit<CartItemGroup, 'options'> & {
|
|
61
65
|
options: CartItemOptionLookup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RequestedAt } from '../datetimes';
|
|
2
2
|
import { Decimal, Money, ServiceType, TaxTypeInt, Temperature } from '../global';
|
|
3
|
+
import { Cart, CartErrors } from './cart';
|
|
3
4
|
export interface NutritionalInfo {
|
|
4
5
|
calories: number;
|
|
5
6
|
cholesterol: number;
|
|
@@ -145,6 +146,10 @@ export interface MenuVars {
|
|
|
145
146
|
serviceType: ServiceType;
|
|
146
147
|
requestedAt: RequestedAt;
|
|
147
148
|
}
|
|
149
|
+
export interface MenuCartErrors {
|
|
150
|
+
newCart: Cart;
|
|
151
|
+
errors: CartErrors | null;
|
|
152
|
+
}
|
|
148
153
|
export interface DiscountedItem {
|
|
149
154
|
id: number;
|
|
150
155
|
category_id: number;
|
|
@@ -354,6 +354,7 @@ export interface ThemeLink extends Record<string, string> {
|
|
|
354
354
|
color: string;
|
|
355
355
|
hover: string;
|
|
356
356
|
}
|
|
357
|
+
export declare type ThemeLinkType = 'customize' | 'dark' | 'light' | 'primary';
|
|
357
358
|
export interface ThemeLinks extends Record<string, string | ThemeLink> {
|
|
358
359
|
customize: ThemeLink;
|
|
359
360
|
dark: ThemeLink;
|
|
@@ -56,6 +56,10 @@ export declare type CartItemGroups = CartItemGroup[];
|
|
|
56
56
|
export declare type Cart = CartItem[];
|
|
57
57
|
export declare type CartLevels = number[][];
|
|
58
58
|
export declare type CartCounts = Record<string, number>;
|
|
59
|
+
export interface CartErrors extends Record<string, Cart> {
|
|
60
|
+
missingItems: Cart;
|
|
61
|
+
invalidItems: Cart;
|
|
62
|
+
}
|
|
59
63
|
export declare type CartItemOptionLookup = Record<string, CartItemOption>;
|
|
60
64
|
export declare type CartItemGroupLookupOptions = Omit<CartItemGroup, 'options'> & {
|
|
61
65
|
options: CartItemOptionLookup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RequestedAt } from '../datetimes';
|
|
2
2
|
import { Decimal, Money, ServiceType, TaxTypeInt, Temperature } from '../global';
|
|
3
|
+
import { Cart, CartErrors } from './cart';
|
|
3
4
|
export interface NutritionalInfo {
|
|
4
5
|
calories: number;
|
|
5
6
|
cholesterol: number;
|
|
@@ -145,6 +146,10 @@ export interface MenuVars {
|
|
|
145
146
|
serviceType: ServiceType;
|
|
146
147
|
requestedAt: RequestedAt;
|
|
147
148
|
}
|
|
149
|
+
export interface MenuCartErrors {
|
|
150
|
+
newCart: Cart;
|
|
151
|
+
errors: CartErrors | null;
|
|
152
|
+
}
|
|
148
153
|
export interface DiscountedItem {
|
|
149
154
|
id: number;
|
|
150
155
|
category_id: number;
|
|
@@ -354,6 +354,7 @@ export interface ThemeLink extends Record<string, string> {
|
|
|
354
354
|
color: string;
|
|
355
355
|
hover: string;
|
|
356
356
|
}
|
|
357
|
+
export declare type ThemeLinkType = 'customize' | 'dark' | 'light' | 'primary';
|
|
357
358
|
export interface ThemeLinks extends Record<string, string | ThemeLink> {
|
|
358
359
|
customize: ThemeLink;
|
|
359
360
|
dark: ThemeLink;
|
package/package.json
CHANGED