general setup
This commit is contained in:
40
types/TibiCommerceRelated.d.ts
vendored
Normal file
40
types/TibiCommerceRelated.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
interface LocalProduct {
|
||||
id: string
|
||||
bigCommerceSKU: string
|
||||
previewImage: FileField
|
||||
isBestseller: boolean
|
||||
isFeatured: boolean
|
||||
isOnSale: boolean
|
||||
isNew: boolean
|
||||
}
|
||||
|
||||
interface CompleteYourLook {
|
||||
id: string
|
||||
products: {
|
||||
productImage: string
|
||||
productReference: string
|
||||
imageWidth: number
|
||||
imageHeight: number
|
||||
imageTop: number
|
||||
imageLeft: number
|
||||
}
|
||||
}
|
||||
|
||||
interface ProductRating {
|
||||
id: string
|
||||
bigCommerceOrderId: string
|
||||
bigCommerceProductRatingId: string
|
||||
productId: string
|
||||
author: string
|
||||
rating: {
|
||||
length: number
|
||||
fit: number
|
||||
quality: number
|
||||
priceQualityRatio: number
|
||||
comfort: number
|
||||
overall: number
|
||||
}
|
||||
comment: string
|
||||
review_date: Date
|
||||
status: "pending" | "approved" | "rejected"
|
||||
}
|
||||
23
types/content.d.ts
vendored
23
types/content.d.ts
vendored
@@ -12,9 +12,16 @@ interface Content {
|
||||
}
|
||||
}
|
||||
|
||||
enum ContentWidth {
|
||||
Full = 0,
|
||||
Normal = 1,
|
||||
Narrow = 2,
|
||||
}
|
||||
|
||||
interface Row {
|
||||
title: string
|
||||
backgroundImage: string
|
||||
contentWidth: ContentWidth
|
||||
columns: Column[]
|
||||
}
|
||||
|
||||
@@ -24,5 +31,19 @@ type Column =
|
||||
| { contentType: "form"; moduleImport: string }
|
||||
| { contentType: "text"; text: string }
|
||||
| { contentType: "googleMaps" }
|
||||
| {
|
||||
contentType: "productSlider"
|
||||
productSlider: {
|
||||
productSource: "manual" | "category" | "bestseller" | "newProducts" | "offers"
|
||||
productSKUs: string[]
|
||||
category: string
|
||||
}
|
||||
}
|
||||
|
||||
type Module = { type: "form"; form: DBFormObj; id: string } | { type: ""; id: string }
|
||||
interface SizeChart {
|
||||
rows: Row[]
|
||||
}
|
||||
type Module =
|
||||
| { type: "form"; form: DBFormObj; id: string }
|
||||
| { type: "completeYourLook"; completeYourLook: CompleteYourLook }
|
||||
| { type: "sizeChart"; sizeChart: SizeChart }
|
||||
|
||||
9
types/navigation.d.ts
vendored
9
types/navigation.d.ts
vendored
@@ -1,12 +1,17 @@
|
||||
enum NavigationType {
|
||||
MainNavigation = 0,
|
||||
ServiceNavigation = 1,
|
||||
}
|
||||
|
||||
interface Navigation {
|
||||
tree: number
|
||||
type: NavigationType
|
||||
elements: NavElement[]
|
||||
}
|
||||
|
||||
interface NavElement {
|
||||
endpoint: boolean
|
||||
name: string
|
||||
image: FileField
|
||||
image?: string
|
||||
page?: string
|
||||
elements?: NavElement[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user