Files
phoenix/src/lib/index.ts
Tobias Klemp 90280fd436 wip
2025-11-23 18:55:37 +01:00

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[]
}