summaryrefslogtreecommitdiff
path: root/src/frontend/types/Cart.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/types/Cart.ts')
-rw-r--r--src/frontend/types/Cart.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/frontend/types/Cart.ts b/src/frontend/types/Cart.ts
new file mode 100644
index 0000000..93e7f54
--- /dev/null
+++ b/src/frontend/types/Cart.ts
@@ -0,0 +1,23 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+import {Address, Cart, OrderItem, OrderResult, Product} from '../protos/demo';
+
+export interface IProductCartItem {
+ productId: string;
+ quantity: number;
+ product: Product;
+}
+
+export interface IProductCheckoutItem extends OrderItem {
+ item: IProductCartItem;
+}
+
+export interface IProductCheckout extends OrderResult {
+ items: IProductCheckoutItem[];
+ shippingAddress: Address;
+}
+
+export interface IProductCart extends Cart {
+ items: IProductCartItem[];
+}