Files
web/types/requests/currentBlockPage.ts
2024-05-30 16:07:42 +02:00

50 lines
1.3 KiB
TypeScript

import { BlocksTypenameEnum } from "./utils/typename"
import type { Contact } from "./asides/contact"
import type { PuffAside } from "./asides/puff"
import type { List } from "./blocks/list"
import type { PuffBlock } from "./blocks/puff"
import type { Text } from "./blocks/text"
import type { Hero } from "./hero"
import type { Preamble } from "./preamble"
import type { AllRequestResponseWithTotal } from "./utils/all"
import type { AsideTypenameEnum, Typename } from "./utils/typename"
export type Asides =
| Typename<Contact, AsideTypenameEnum.CurrentBlocksPageAsideContact>
| Typename<PuffAside, AsideTypenameEnum.CurrentBlocksPageAsidePuff>
export type Blocks =
| Typename<List, BlocksTypenameEnum.CurrentBlocksPageBlocksList>
| Typename<PuffBlock, BlocksTypenameEnum.CurrentBlocksPageBlocksPuffs>
| Typename<Text, BlocksTypenameEnum.CurrentBlocksPageBlocksText>
export type Breadcrumb = {
href: string
title: string
}
export type Breadcrumbs = {
parents: Breadcrumb[]
title: string
}
export type BlockPage = {
aside: Asides[]
blocks: Blocks[]
breadcrumbs: Breadcrumbs
hero: Hero
preamble: Preamble
system: {
created_at: string
uid: string
updated_at: string
}
title: string
url: string
}
export type GetCurrentBlockPageData = {
all_current_blocks_page: AllRequestResponseWithTotal<BlockPage>
}