type changes
This commit is contained in:
parent
c08635b4c6
commit
fdb2b9b4ed
|
@ -0,0 +1,6 @@
|
|||
export type ImageLinkArgs = {
|
||||
urlOrPublicId: string;
|
||||
h: number;
|
||||
w: number;
|
||||
max?: boolean;
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
export type InstagramPost = {
|
||||
export interface InstagramPost {
|
||||
id: string;
|
||||
media_type: string;
|
||||
media_url: string;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
export interface MarkdownHeading {
|
||||
title: string;
|
||||
slug: string;
|
||||
level: number;
|
||||
children: MarkdownHeading[];
|
||||
}
|
||||
|
||||
export interface MarkdownMetadata {
|
||||
headings: MarkdownHeading[];
|
||||
frontmatter: MarkdownFrontmatter;
|
||||
}
|
||||
|
||||
// Type for markdown frontmatter
|
||||
export interface MarkdownFrontmatter {
|
||||
title: string;
|
||||
date: string;
|
||||
tags: Tag[];
|
||||
published?: boolean;
|
||||
};
|
||||
|
||||
export type Tag = 'PMU' | 'permanentní makeup' | 'vizáž' | 'depilace' | 'vakuslim' | 'ošetření' | 'makeup' | 'pleť' | 'péče' | 'beauty' | 'salon' | 'salón' | 'kosmetika' | '';
|
|
@ -0,0 +1,14 @@
|
|||
export type OGType = "Article" | "Website";
|
||||
export type OGImageType = "image/png" | "image/jpg" | "image/webp" | "image/gif" // fill this out and correct it please
|
||||
export type OGImageHeight = 512
|
||||
export type OGImageWidth = 1024
|
||||
// make the logic so that we have either a image width and heigh a 2:1 or 16:9 ratio , ie choose one or the other
|
||||
// should I declare other properties when they will be defined outside of this type in the component? I guess url will be gotten conditionally
|
||||
export interface OpenGraphMetadata {
|
||||
type: OGType;
|
||||
image: string;
|
||||
imageType: OGImageType;
|
||||
imageWidth: OGImageWidth;
|
||||
imageHeight: OGImageHeight;
|
||||
url: string;
|
||||
};
|
|
@ -1,8 +0,0 @@
|
|||
export type Product = {
|
||||
id: string;
|
||||
name: string;
|
||||
price: number;
|
||||
description: string;
|
||||
image: string;
|
||||
url: string;
|
||||
}
|
|
@ -1,10 +1,24 @@
|
|||
export type Service = {
|
||||
category: string;
|
||||
items: {
|
||||
name: string;
|
||||
import type { MarkdownMetadata } from '$lib/types/mdMetadata';
|
||||
import type { OpenGraphMetadata } from '$lib/types/ogMetadata';
|
||||
|
||||
// Base service item type
|
||||
export interface Service {
|
||||
title: string;
|
||||
description: string;
|
||||
id: string;
|
||||
image: string;
|
||||
price: number | string;
|
||||
duration: number | string;
|
||||
}[];
|
||||
};
|
||||
|
||||
export interface Category {
|
||||
title: string;
|
||||
description: string;
|
||||
id: string;
|
||||
image: string;
|
||||
services: Service[];
|
||||
}
|
||||
|
||||
// Extended service item type with OpenGraph metadata
|
||||
export type ExtendedService = Service & OpenGraphMetadata & MarkdownMetadata;
|
||||
export type ExtendedCategory = Category & OpenGraphMetadata & MarkdownMetadata;
|
||||
|
|
Loading…
Reference in New Issue