44 lines
812 B
TypeScript
44 lines
812 B
TypeScript
// place files you want to import through the `$lib` alias in this folder.
|
|
|
|
export type ColorProductVariation = {
|
|
type: 'color'
|
|
name: string
|
|
hex: string
|
|
numericValue: null
|
|
}
|
|
export type CapacityProductVariation = {
|
|
type: 'capacity'
|
|
name: string
|
|
hex: null
|
|
numericValue: number
|
|
}
|
|
|
|
export enum ConditionEnum {
|
|
EXCELLENT = 'excellent',
|
|
VERY_GOOD = 'very_good',
|
|
GOOD = 'good',
|
|
FAIR = 'fair',
|
|
}
|
|
|
|
export type ConditionProductVariation = {
|
|
type: 'condition'
|
|
name: ConditionEnum
|
|
hex: null
|
|
numericValue: number
|
|
}
|
|
|
|
export type ProductVariation =
|
|
| ColorProductVariation
|
|
| CapacityProductVariation
|
|
| ConditionProductVariation
|
|
|
|
export type SpecificationAttribute = {
|
|
key: string
|
|
value: string
|
|
}
|
|
|
|
export type Specification = {
|
|
title: string
|
|
attributes: SpecificationAttribute[]
|
|
}
|