134 lines
2.9 KiB
TypeScript
134 lines
2.9 KiB
TypeScript
export { };
|
|
|
|
import type { RouteLocation as NRouteLocation } from "vue-router";
|
|
|
|
// * --- MODELS From JSON Schema
|
|
|
|
/** Showroom Bo json data format */
|
|
type AppModel = {
|
|
/** Version de l'application */
|
|
version: string;
|
|
settings: SettingsModel;
|
|
items: Array<BrandModel>;
|
|
}
|
|
|
|
/** Settings from Showroom Bo */
|
|
type SettingsModel = {
|
|
/** Titre de l'application" */
|
|
title: string;
|
|
/** Logo de l'application, chemin tel que présent dans le zip */
|
|
logo: string;
|
|
/** Couleur de l'application (hex color) */
|
|
color: string;
|
|
/** Éléments par ligne, entre 3 et 6 inclus */
|
|
items_by_line: number;
|
|
created_at: string;
|
|
updated_at: string;
|
|
};
|
|
|
|
/** A brand from Showroom Bo */
|
|
type BrandModel = {
|
|
/** The unique identifier for a product */
|
|
id: number;
|
|
/** Nom de la marque */
|
|
name: string;
|
|
/** Slug de la marque */
|
|
slug: string;
|
|
/** Couleur de la marque (hex color) */
|
|
color: string;
|
|
/** Logo de la marque, chemin tel que présent dans le zip */
|
|
picture: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
ranges: Array<RangeModel>;
|
|
};
|
|
|
|
/** A range from Showroom Bo */
|
|
type RangeModel = {
|
|
/** The unique identifier for a range */
|
|
id: number;
|
|
/** Nom de la gamme */
|
|
name: string;
|
|
/** Slug de la gamme */
|
|
slug: string;
|
|
/** Logo de la gamme, chemin tel que présent dans le zip */
|
|
picture: string;
|
|
/** Clé étrangère de la marque */
|
|
brand_id: number;
|
|
created_at: string;
|
|
updated_at: string;
|
|
products: Array<ProductModel>;
|
|
};
|
|
|
|
/** A product from Showroom Bo */
|
|
type ProductModel = {
|
|
/** The unique identifier for a product */
|
|
id: number;
|
|
/** Nom du produit */
|
|
name: string;
|
|
/** Slug du produit */
|
|
slug: string;
|
|
/** Description du produit, texte WYSYWYG */
|
|
description: string;
|
|
/** Logo du produit, chemin tel que présent dans le zip */
|
|
picture: string;
|
|
/** Clé étrangère de la gamme */
|
|
range_id: number;
|
|
created_at: string;
|
|
updated_at: string;
|
|
};
|
|
|
|
// * --- END MODELS
|
|
|
|
|
|
type ItemObject = {
|
|
id: number
|
|
name: string
|
|
teaser: string
|
|
img: string
|
|
description: string
|
|
}
|
|
|
|
type ModalSettings = {
|
|
ctaBtnText: string;
|
|
ctaDisclaimerText: string;
|
|
ctaSaveBtn: string;
|
|
}
|
|
|
|
type ContactModel = {
|
|
product_id: number;
|
|
email: string;
|
|
consent: boolean;
|
|
}
|
|
|
|
type DataModel = {
|
|
logo: {
|
|
src: string,
|
|
width: string
|
|
},
|
|
title: string,
|
|
modalSettings: ModalSettings,
|
|
itemsByLine: number,
|
|
items: Array<ItemObject>
|
|
};
|
|
|
|
declare global {
|
|
type Data = DataModel
|
|
type Item = ItemObject
|
|
type Settings = ModalSettings;
|
|
type Contact = ContactModel;
|
|
|
|
// * App Models
|
|
type TypeApp = AppModel;
|
|
type TypeSettings = SettingsModel;
|
|
type TypeBrand = BrandModel;
|
|
type TypeRange = RangeModel;
|
|
type TypeProduct = ProductModel;
|
|
|
|
|
|
// Nuxt
|
|
type RouteLocation = NRouteLocation;
|
|
|
|
interface Window {
|
|
}
|
|
}
|