105 lines
2.1 KiB
TypeScript
105 lines
2.1 KiB
TypeScript
import type { AllRequestResponse } from "./utils/all"
|
|
import type { Typename } from "./utils/typename"
|
|
|
|
enum SidebarTypenameEnum {
|
|
LoyaltyPageSidebarLoyaltyJoinContact = "LoyaltyPageSidebarLoyaltyJoinContact",
|
|
LoyaltyPageSidebarContent = "LoyaltyPageSidebarContent",
|
|
}
|
|
|
|
type SidebarContent = {}
|
|
|
|
type JoinContact = {}
|
|
|
|
export type Sidebar =
|
|
| Typename<SidebarContent, SidebarTypenameEnum.LoyaltyPageSidebarContent>
|
|
| Typename<
|
|
JoinContact,
|
|
SidebarTypenameEnum.LoyaltyPageSidebarLoyaltyJoinContact
|
|
>
|
|
|
|
enum ContentBlocks {
|
|
LoyaltyPageContentLoyaltyLevels = "LoyaltyPageContentLoyaltyLevels",
|
|
LoyaltyPageContentCardGrid = "LoyaltyPageContentCardGrid",
|
|
}
|
|
|
|
enum LinkedPageConnection {
|
|
LoyaltyPage = "LoyaltyPage",
|
|
ContentPage = "ContentPage",
|
|
AccountPage = "AccountPage",
|
|
}
|
|
|
|
type ContentPageLink = {
|
|
web: { url: string }
|
|
}
|
|
type LoyaltyPageLink = {
|
|
url: string
|
|
}
|
|
|
|
type AccountPageLink = {
|
|
url: string
|
|
}
|
|
|
|
type LinkedPage =
|
|
| Typename<ContentPageLink, LinkedPageConnection.ContentPage>
|
|
| Typename<LoyaltyPageLink, ContentBlocks.LoyaltyPageContentLoyaltyLevels>
|
|
| Typename<AccountPageLink, ContentBlocks.LoyaltyPageContentLoyaltyLevels>
|
|
|
|
type CardGrid = {
|
|
card_grid: {
|
|
heading: string
|
|
subheading: string
|
|
cards: {
|
|
referenceConnection: {
|
|
edges: {
|
|
node: LinkedPage
|
|
}
|
|
}
|
|
heading: string
|
|
subheading: string
|
|
}
|
|
}
|
|
}
|
|
|
|
type LoyaltyLevels = {
|
|
loyalty_levels: {
|
|
heading: string
|
|
sub_heading?: string
|
|
level_card: {
|
|
loyalty_level: number
|
|
}[]
|
|
}
|
|
}
|
|
|
|
export type Content =
|
|
| Typename<CardGrid, ContentBlocks.LoyaltyPageContentCardGrid>
|
|
| Typename<LoyaltyLevels, ContentBlocks.LoyaltyPageContentLoyaltyLevels>
|
|
|
|
export type Breadcrumb = {
|
|
href: string
|
|
title: string
|
|
}
|
|
|
|
export type Breadcrumbs = {
|
|
parents: Breadcrumb[]
|
|
title: string
|
|
}
|
|
|
|
export type LoyaltyPage = {
|
|
sidebar: Sidebar[]
|
|
content: Content[]
|
|
web: {
|
|
breadcrumbs: Breadcrumbs
|
|
}
|
|
system: {
|
|
created_at: string
|
|
uid: string
|
|
updated_at: string
|
|
}
|
|
title: string
|
|
url: string
|
|
}
|
|
|
|
export type GetLoyaltyPageData = {
|
|
all_loyalty_page: AllRequestResponse<LoyaltyPage>
|
|
}
|