feat: create blocks component for loyalty
This commit is contained in:
@@ -26,18 +26,21 @@ type Contact = {
|
||||
}
|
||||
}
|
||||
|
||||
enum JoinLoyaltyContactTypenameEnum {
|
||||
LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact = "LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact",
|
||||
}
|
||||
|
||||
type JoinLoyaltyContactEnum = Typename<
|
||||
Contact,
|
||||
JoinLoyaltyContactTypenameEnum.LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact
|
||||
>
|
||||
|
||||
export type JoinLoyaltyContact = {
|
||||
join_loyalty_contact: {
|
||||
title: string
|
||||
contact: Typename<
|
||||
Contact,
|
||||
"LoyaltyPageSidebarLoyaltyJoinContactBlockContactContact"
|
||||
>
|
||||
title?: string
|
||||
preamble?: string
|
||||
contact: JoinLoyaltyContactEnum[]
|
||||
login_button_text: string
|
||||
body: {
|
||||
embedded_itemsConnection: Edges<Embeds>
|
||||
json: RTEDocument
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,36 +51,52 @@ export type Sidebar =
|
||||
SidebarTypenameEnum.LoyaltyPageSidebarJoinLoyaltyContact
|
||||
>
|
||||
|
||||
enum ContentBlocks {
|
||||
LoyaltyPageContentLoyaltyLevels = "LoyaltyPageContentLoyaltyLevels",
|
||||
LoyaltyPageContentCardGrid = "LoyaltyPageContentCardGrid",
|
||||
export enum LoyaltyBlocksTypenameEnum {
|
||||
LoyaltyPageBlocksDynamicContent = "LoyaltyPageBlocksDynamicContent",
|
||||
LoyaltyPageBlocksCardGrid = "LoyaltyPageBlocksCardGrid",
|
||||
LoyaltyPageBlocksContent = "LoyaltyPageBlocksContent",
|
||||
}
|
||||
|
||||
type CardGrid = {
|
||||
card_grid: {
|
||||
heading: string
|
||||
subheading: string
|
||||
preamble: string
|
||||
cards: {
|
||||
referenceConnection: Edges<PageLink>
|
||||
heading: string
|
||||
subheading: string
|
||||
preamble: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type LoyaltyLevels = {
|
||||
loyalty_levels: {
|
||||
heading: string
|
||||
sub_heading?: string
|
||||
level_card: {
|
||||
loyalty_level: number
|
||||
}[]
|
||||
type Content = {
|
||||
content: {
|
||||
embedded_itemsConnection: Edges<Embeds>
|
||||
json: RTEDocument
|
||||
}
|
||||
}
|
||||
|
||||
export type Content =
|
||||
| Typename<CardGrid, ContentBlocks.LoyaltyPageContentCardGrid>
|
||||
| Typename<LoyaltyLevels, ContentBlocks.LoyaltyPageContentLoyaltyLevels>
|
||||
type LoyaltyComponent = "loyalty_levels" | "how_it_works" | "overview_table"
|
||||
|
||||
type DynamicContent = {
|
||||
dynamic_content: {
|
||||
title: string
|
||||
preamble?: string
|
||||
component: LoyaltyComponent
|
||||
link: {
|
||||
text?: string
|
||||
page: Edges<PageLink>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Blocks =
|
||||
| Typename<CardGrid, LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksCardGrid>
|
||||
| Typename<
|
||||
DynamicContent,
|
||||
LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksDynamicContent
|
||||
>
|
||||
| Typename<Content, LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksContent>
|
||||
|
||||
export type Breadcrumb = {
|
||||
href: string
|
||||
@@ -91,7 +110,7 @@ export type Breadcrumbs = {
|
||||
|
||||
export type LoyaltyPage = {
|
||||
sidebar: Sidebar[]
|
||||
content: Content[]
|
||||
blocks: Blocks[]
|
||||
web: {
|
||||
breadcrumbs: Breadcrumbs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user