From 656a5db58d09bea547c651e3730af08ea36e4ca2 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Tue, 25 May 2021 16:03:10 -0500 Subject: [PATCH] Added index for types --- framework/bigcommerce/types/common.ts | 1 + framework/bigcommerce/types/index.ts | 27 +++++++++++++++++-- framework/commerce/types/index.ts | 37 +++++++++++++++++---------- 3 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 framework/bigcommerce/types/common.ts diff --git a/framework/bigcommerce/types/common.ts b/framework/bigcommerce/types/common.ts new file mode 100644 index 000000000..b52c33a4d --- /dev/null +++ b/framework/bigcommerce/types/common.ts @@ -0,0 +1 @@ +export * from '@commerce/types/common' diff --git a/framework/bigcommerce/types/index.ts b/framework/bigcommerce/types/index.ts index a0792d798..7ab0b7f64 100644 --- a/framework/bigcommerce/types/index.ts +++ b/framework/bigcommerce/types/index.ts @@ -1,2 +1,25 @@ -export * from '@commerce/types' -export * from './cart' +import * as Cart from './cart' +import * as Checkout from './checkout' +import * as Common from './common' +import * as Customer from './customer' +import * as Login from './login' +import * as Logout from './logout' +import * as Page from './page' +import * as Product from './product' +import * as Signup from './signup' +import * as Site from './site' +import * as Wishlist from './wishlist' + +export type { + Cart, + Checkout, + Common, + Customer, + Login, + Logout, + Page, + Product, + Signup, + Site, + Wishlist, +} diff --git a/framework/commerce/types/index.ts b/framework/commerce/types/index.ts index c187b29bb..7ab0b7f64 100644 --- a/framework/commerce/types/index.ts +++ b/framework/commerce/types/index.ts @@ -1,14 +1,25 @@ -import type { Wishlist as BCWishlist } from '../../bigcommerce/api/wishlist' -import type { Customer as BCCustomer } from '../../bigcommerce/api/customers' -import type { SearchProductsData as BCSearchProductsData } from '../../bigcommerce/api/catalog/products' +import * as Cart from './cart' +import * as Checkout from './checkout' +import * as Common from './common' +import * as Customer from './customer' +import * as Login from './login' +import * as Logout from './logout' +import * as Page from './page' +import * as Product from './product' +import * as Signup from './signup' +import * as Site from './site' +import * as Wishlist from './wishlist' -export * from './common' - -// TODO: Properly define this type -export interface Wishlist extends BCWishlist {} - -// TODO: Properly define this type -export interface Customer extends BCCustomer {} - -// TODO: Properly define this type -export interface SearchProductsData extends BCSearchProductsData {} +export type { + Cart, + Checkout, + Common, + Customer, + Login, + Logout, + Page, + Product, + Signup, + Site, + Wishlist, +}