product page and linter
This commit is contained in:
@ -1,32 +1,32 @@
|
||||
export interface AddressesList {
|
||||
address: {
|
||||
city: string;
|
||||
country_iso: string;
|
||||
name: string;
|
||||
postcode: string;
|
||||
street: string;
|
||||
surname: string;
|
||||
};
|
||||
address_id: number;
|
||||
alias: string;
|
||||
customer_id: number;
|
||||
is_default: boolean;
|
||||
is_official: boolean;
|
||||
city: string
|
||||
country_iso: string
|
||||
name: string
|
||||
postcode: string
|
||||
street: string
|
||||
surname: string
|
||||
}
|
||||
address_id: number
|
||||
alias: string
|
||||
customer_id: number
|
||||
is_default: boolean
|
||||
is_official: boolean
|
||||
}
|
||||
|
||||
export interface UserAddressOfficial {
|
||||
address: {
|
||||
name: string;
|
||||
surname: string;
|
||||
street: string;
|
||||
postcode: string;
|
||||
city: string;
|
||||
name: string
|
||||
surname: string
|
||||
street: string
|
||||
postcode: string
|
||||
city: string
|
||||
country: {
|
||||
country_lang: [
|
||||
{
|
||||
name: string;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
name: string
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +1,26 @@
|
||||
export interface Footer {
|
||||
data: {
|
||||
contact: Contact
|
||||
docs: FooterDoc[]
|
||||
}
|
||||
id: number
|
||||
name: string
|
||||
data: {
|
||||
contact: Contact
|
||||
docs: FooterDoc[]
|
||||
}
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface Contact {
|
||||
header: string
|
||||
ownerAddress: string
|
||||
ownerMail: string
|
||||
header: string
|
||||
ownerAddress: string
|
||||
ownerMail: string
|
||||
}
|
||||
|
||||
export interface FooterDoc {
|
||||
footer_section: string
|
||||
translation: string
|
||||
data: FooterPdf[]
|
||||
footer_section: string
|
||||
translation: string
|
||||
data: FooterPdf[]
|
||||
}
|
||||
|
||||
export interface FooterPdf {
|
||||
name: string
|
||||
translation: string
|
||||
guest_avaliable: boolean
|
||||
}
|
||||
name: string
|
||||
translation: string
|
||||
guest_avaliable: boolean
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ export interface FrontMenuLang {
|
||||
link_rewrite: string
|
||||
}
|
||||
|
||||
|
||||
export interface UIFrontMenu extends FrontMenu {
|
||||
children?: UIFrontMenu[];
|
||||
}
|
||||
children?: UIFrontMenu[]
|
||||
}
|
||||
|
185
types/index.ts
185
types/index.ts
@ -1,71 +1,68 @@
|
||||
import type { DefineComponent } from "vue";
|
||||
import type { FrontSection } from "~/types/frontSection";
|
||||
|
||||
|
||||
import type { DefineComponent } from 'vue'
|
||||
import type { FrontSection } from '~/types/frontSection'
|
||||
|
||||
export type componentsListType = {
|
||||
name: string;
|
||||
component: FrontSection;
|
||||
componentInstance: DefineComponent;
|
||||
};
|
||||
|
||||
export type PartnersList = {
|
||||
country_iso: string;
|
||||
country_name: string;
|
||||
total: number;
|
||||
};
|
||||
|
||||
export type FeatureValue = {
|
||||
parent: number;
|
||||
products_with_value: number;
|
||||
value: string;
|
||||
value_id: number;
|
||||
};
|
||||
|
||||
export type Feature = {
|
||||
feature: string;
|
||||
feature_id: number;
|
||||
feature_values: FeatureValue[];
|
||||
products_with_feature: number;
|
||||
};
|
||||
|
||||
export type ProductType = {
|
||||
applied_tax_rate: number;
|
||||
cover_picture_uuid: string;
|
||||
description: string;
|
||||
formatted_price: string;
|
||||
id: number;
|
||||
in_stock: number;
|
||||
is_sale_active: boolean;
|
||||
link_rewrite: string;
|
||||
name: string;
|
||||
price: number;
|
||||
tax_name: string;
|
||||
cart_item_id?: number;
|
||||
product_id?: number;
|
||||
};
|
||||
|
||||
export interface Country {
|
||||
iso_code: string;
|
||||
currency_iso_code: string;
|
||||
call_prefix: string;
|
||||
need_postcode: boolean;
|
||||
postcode_format: string;
|
||||
is_default: boolean;
|
||||
active: boolean;
|
||||
name: string;
|
||||
name: string
|
||||
component: FrontSection
|
||||
componentInstance: DefineComponent
|
||||
}
|
||||
|
||||
export type PartnersList = {
|
||||
country_iso: string
|
||||
country_name: string
|
||||
total: number
|
||||
}
|
||||
|
||||
export type FeatureValue = {
|
||||
parent: number
|
||||
products_with_value: number
|
||||
value: string
|
||||
value_id: number
|
||||
}
|
||||
|
||||
export type Feature = {
|
||||
feature: string
|
||||
feature_id: number
|
||||
feature_values: FeatureValue[]
|
||||
products_with_feature: number
|
||||
}
|
||||
|
||||
export type ProductType = {
|
||||
applied_tax_rate: number
|
||||
cover_picture_uuid: string
|
||||
description: string
|
||||
formatted_price: string
|
||||
id: number
|
||||
in_stock: number
|
||||
is_sale_active: boolean
|
||||
link_rewrite: string
|
||||
name: string
|
||||
price: number
|
||||
tax_name: string
|
||||
cart_item_id?: number
|
||||
product_id?: number
|
||||
}
|
||||
|
||||
export interface Country {
|
||||
iso_code: string
|
||||
currency_iso_code: string
|
||||
call_prefix: string
|
||||
need_postcode: boolean
|
||||
postcode_format: string
|
||||
is_default: boolean
|
||||
active: boolean
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface Currency {
|
||||
iso_code: string;
|
||||
name: string;
|
||||
UpdatedAt: string;
|
||||
iso_code_num: number;
|
||||
precision: number;
|
||||
sign: string;
|
||||
active: boolean;
|
||||
suffix: boolean;
|
||||
iso_code: string
|
||||
name: string
|
||||
UpdatedAt: string
|
||||
iso_code_num: number
|
||||
precision: number
|
||||
sign: string
|
||||
active: boolean
|
||||
suffix: boolean
|
||||
}
|
||||
|
||||
export interface Language {
|
||||
@ -80,50 +77,54 @@ export interface Language {
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export interface CookieData { country: Country, currency: Currency, language: Language }
|
||||
|
||||
export interface CookieData {
|
||||
country: Country
|
||||
currency: Currency
|
||||
language: Language
|
||||
}
|
||||
|
||||
export interface CartItem {
|
||||
cart_item_id: number;
|
||||
link_rewrite: string;
|
||||
name: string;
|
||||
picture_uuid: string;
|
||||
product_id: number;
|
||||
quantity: number;
|
||||
single_item_price: number;
|
||||
total_price: number;
|
||||
}
|
||||
export interface UserCart {
|
||||
cart_items: CartItem[];
|
||||
id: number;
|
||||
checkout_in_progress: boolean;
|
||||
currency_iso: string;
|
||||
total_value: number;
|
||||
cart_item_id: number
|
||||
link_rewrite: string
|
||||
name: string
|
||||
picture_uuid: string
|
||||
product_id: number
|
||||
quantity: number
|
||||
single_item_price: number
|
||||
total_price: number
|
||||
}
|
||||
|
||||
export interface GenericResponse<Data> {
|
||||
data: Data;
|
||||
message?: string;
|
||||
status: number;
|
||||
data: Data
|
||||
message?: string
|
||||
status: number
|
||||
}
|
||||
|
||||
export interface GenericResponseItems<Data> {
|
||||
data: { items: Data; items_count: number };
|
||||
message?: string;
|
||||
status: number;
|
||||
data: { items: Data, items_count: number }
|
||||
message?: string
|
||||
status: number
|
||||
}
|
||||
|
||||
export interface GenericResponseChildren<Data> {
|
||||
data: { children: Data; items_count: number };
|
||||
message?: string;
|
||||
status: number;
|
||||
data: { children: Data, items_count: number }
|
||||
message?: string
|
||||
status: number
|
||||
}
|
||||
|
||||
export type {
|
||||
InvestmentPiece,
|
||||
PlanPrediction,
|
||||
PeriodToFirstPiece,
|
||||
} from "./planPrediction";
|
||||
export type { Product } from "./product";
|
||||
export type { FrontMenu, FrontMenuLang, UIFrontMenu } from "./frontMenu";
|
||||
export type {Contact, Footer, FooterDoc, FooterPdf} from './footer'
|
||||
} from './planPrediction'
|
||||
export type {
|
||||
Product,
|
||||
ProductItem,
|
||||
CategoryProductItem,
|
||||
FeatureProductItem,
|
||||
RecommendationProductItem,
|
||||
CartProduct,
|
||||
UserCart,
|
||||
} from './product'
|
||||
export type { FrontMenu, FrontMenuLang, UIFrontMenu } from './frontMenu'
|
||||
export type { Contact, Footer, FooterDoc, FooterPdf } from './footer'
|
||||
|
@ -37,4 +37,4 @@ export interface PeriodToFirstPiece {
|
||||
years: number
|
||||
months: number
|
||||
days: number
|
||||
}
|
||||
}
|
||||
|
101
types/product.ts
101
types/product.ts
@ -1,32 +1,85 @@
|
||||
export interface Product {
|
||||
id: number;
|
||||
link_rewrite: string;
|
||||
name: string;
|
||||
cover_picture_uuid: string;
|
||||
description: string;
|
||||
price: number;
|
||||
formatted_price: string;
|
||||
in_stock: number;
|
||||
is_sale_active: boolean;
|
||||
applied_tax_rate: number;
|
||||
tax_name: string;
|
||||
id: number
|
||||
link_rewrite: string
|
||||
name: string
|
||||
cover_picture_uuid: string
|
||||
description: string
|
||||
price: number
|
||||
formatted_price: string
|
||||
in_stock: number
|
||||
is_sale_active: boolean
|
||||
applied_tax_rate: number
|
||||
tax_name: string
|
||||
}
|
||||
|
||||
export interface CartProduct {
|
||||
cart_item_id: number;
|
||||
link_rewrite: string;
|
||||
name: string;
|
||||
picture_uuid: string;
|
||||
product_id: number;
|
||||
quantity: number;
|
||||
single_item_price: number;
|
||||
total_price: number;
|
||||
cart_item_id: number
|
||||
link_rewrite: string
|
||||
name: string
|
||||
picture_uuid: string
|
||||
product_id: number
|
||||
quantity: number
|
||||
single_item_price: number
|
||||
total_price: number
|
||||
}
|
||||
|
||||
export interface UserCart {
|
||||
cart_items: CartProduct[];
|
||||
checkout_in_progress: boolean;
|
||||
currency_iso: string;
|
||||
id: number;
|
||||
total_value: number;
|
||||
cart_items: CartProduct[]
|
||||
checkout_in_progress: boolean
|
||||
currency_iso: string
|
||||
id: number
|
||||
total_value: number
|
||||
}
|
||||
|
||||
export interface ProductItem {
|
||||
id: number
|
||||
cover_picture_uuid: string
|
||||
name: string
|
||||
price: number
|
||||
applied_tax_rate: number
|
||||
tax_name: string
|
||||
buyout_price: number
|
||||
buyout_price_reduction: number
|
||||
sale_active: boolean
|
||||
in_stock: number
|
||||
reference: string
|
||||
description: string
|
||||
description_short: string
|
||||
link_rewrite: string
|
||||
meta_title: string
|
||||
meta_description: string
|
||||
weight: number
|
||||
features: FeatureProductItem[]
|
||||
categories: CategoryProductItem[]
|
||||
picture_uuids: string[]
|
||||
video_uuids: string[]
|
||||
recommendations: RecommendationProductItem[]
|
||||
}
|
||||
|
||||
export interface FeatureProductItem {
|
||||
feature_id: number
|
||||
feature: string
|
||||
value_id: number
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface CategoryProductItem {
|
||||
id: number
|
||||
name: string
|
||||
link_rewrite: string
|
||||
parent_id: number
|
||||
}
|
||||
|
||||
export interface RecommendationProductItem {
|
||||
id: number
|
||||
link_rewrite: string
|
||||
name: string
|
||||
cover_picture_uuid: string
|
||||
description: string
|
||||
price: number
|
||||
formatted_price: string
|
||||
in_stock: number
|
||||
is_sale_active: boolean
|
||||
applied_tax_rate: number
|
||||
tax_name: string
|
||||
}
|
||||
|
@ -1,49 +1,49 @@
|
||||
export interface Customer {
|
||||
active: boolean;
|
||||
agreed_for_newsletter: boolean;
|
||||
active: boolean
|
||||
agreed_for_newsletter: boolean
|
||||
bank_accounts: {
|
||||
bank_currency_iso: string;
|
||||
bank_name: string;
|
||||
customer_id: number;
|
||||
iban: string;
|
||||
swift: string;
|
||||
verified: boolean;
|
||||
}[];
|
||||
birthday_date: string;
|
||||
communication_languag_id: number;
|
||||
document_verified: boolean;
|
||||
bank_currency_iso: string
|
||||
bank_name: string
|
||||
customer_id: number
|
||||
iban: string
|
||||
swift: string
|
||||
verified: boolean
|
||||
}[]
|
||||
birthday_date: string
|
||||
communication_languag_id: number
|
||||
document_verified: boolean
|
||||
documents: {
|
||||
file: string;
|
||||
id: number;
|
||||
name: string;
|
||||
size: number;
|
||||
typ: string;
|
||||
}[];
|
||||
email: string;
|
||||
file: string
|
||||
id: number
|
||||
name: string
|
||||
size: number
|
||||
typ: string
|
||||
}[]
|
||||
email: string
|
||||
entity: {
|
||||
city: string;
|
||||
country_iso: string;
|
||||
customer_id: number;
|
||||
extra_enitity_id: string;
|
||||
name: string;
|
||||
national_court_register_number: string;
|
||||
postcode: string;
|
||||
statistical_number: string;
|
||||
street: string;
|
||||
vat_number: string;
|
||||
web_pages_list: string;
|
||||
}[];
|
||||
first_name: string;
|
||||
is_entity: boolean;
|
||||
is_partner: boolean;
|
||||
is_root: boolean;
|
||||
last_name: string;
|
||||
city: string
|
||||
country_iso: string
|
||||
customer_id: number
|
||||
extra_enitity_id: string
|
||||
name: string
|
||||
national_court_register_number: string
|
||||
postcode: string
|
||||
statistical_number: string
|
||||
street: string
|
||||
vat_number: string
|
||||
web_pages_list: string
|
||||
}[]
|
||||
first_name: string
|
||||
is_entity: boolean
|
||||
is_partner: boolean
|
||||
is_root: boolean
|
||||
last_name: string
|
||||
metadata: {
|
||||
id: number;
|
||||
metadata: string;
|
||||
type: string;
|
||||
}[];
|
||||
partner_code: string;
|
||||
phone_number: string;
|
||||
taxes_country_iso: string;
|
||||
id: number
|
||||
metadata: string
|
||||
type: string
|
||||
}[]
|
||||
partner_code: string
|
||||
phone_number: string
|
||||
taxes_country_iso: string
|
||||
}
|
||||
|
Reference in New Issue
Block a user