feat(WEB-209): revalidate my pages navigation on demand
This commit is contained in:
committed by
Michael Zetterberg
parent
16634abbbf
commit
1bffbc837e
@@ -1,10 +1,10 @@
|
||||
import type { AllRequestResponse } from "../utils/all"
|
||||
import type { Edges } from "../utils/edges"
|
||||
import type { EdgesWithTotalCount } from "../utils/edges"
|
||||
|
||||
interface AccountPageBreadcrumbs {
|
||||
breadcrumbs: {
|
||||
title: string
|
||||
parents: Edges<{
|
||||
parents: EdgesWithTotalCount<{
|
||||
breadcrumbs: {
|
||||
title: string
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Edges } from "../utils/edges"
|
||||
import type { Image } from "../../image"
|
||||
import type { EdgesWithTotalCount } from "../utils/edges"
|
||||
|
||||
export type LogoQueryData = {
|
||||
all_header: {
|
||||
items: {
|
||||
logoConnection: Edges<Image>
|
||||
logoConnection: EdgesWithTotalCount<Image>
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type { System } from "../system"
|
||||
import type { AllRequestResponse } from "../utils/all"
|
||||
import type { Edges } from "../utils/edges"
|
||||
import type { TypenameInterface } from "../utils/typename"
|
||||
@@ -12,10 +13,10 @@ export enum PageLinkEnum {
|
||||
export type MenuItem = {
|
||||
lang: Lang
|
||||
linkText: string
|
||||
subItems: MenuItem[] | null
|
||||
uid: string
|
||||
url: string
|
||||
originalUrl: string | undefined
|
||||
originalUrl?: string
|
||||
subItems?: MenuItem[]
|
||||
}
|
||||
|
||||
export type SidebarProps = {
|
||||
@@ -27,8 +28,8 @@ interface NavigationLink {
|
||||
locale: Lang
|
||||
uid: string
|
||||
}
|
||||
url: string
|
||||
title: string
|
||||
url: string
|
||||
web?: { original_url: string }
|
||||
}
|
||||
|
||||
@@ -46,16 +47,44 @@ export interface ContentPageLink
|
||||
|
||||
export type PageLink = ContentPageLink | AccountPageLink | LoyaltyPageLink
|
||||
|
||||
export type NavigationItem = {
|
||||
item: {
|
||||
pageConnection: Edges<PageLink>
|
||||
link_text: string
|
||||
sub_items: NavigationItem[] | null
|
||||
}
|
||||
interface Item {
|
||||
link_text: string
|
||||
pageConnection: Edges<PageLink>
|
||||
}
|
||||
|
||||
export type NavigationMyPages = { items: NavigationItem[]; title: string }
|
||||
interface ItemWithSubitem extends Item {
|
||||
sub_items: NavigationItem[]
|
||||
}
|
||||
|
||||
export type NavigationItem = {
|
||||
item: Item | ItemWithSubitem
|
||||
}
|
||||
|
||||
export type NavigationMyPages = {
|
||||
items: NavigationItem[]
|
||||
title: string
|
||||
}
|
||||
|
||||
export type GetNavigationMyPagesData = {
|
||||
all_navigation_my_pages: AllRequestResponse<NavigationMyPages>
|
||||
}
|
||||
|
||||
/** Refs Request */
|
||||
type NavigationItemRef = {
|
||||
item: {
|
||||
pageConnection: Edges<System>
|
||||
sub_items: {
|
||||
item: {
|
||||
pageConnection: Edges<System>
|
||||
}
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
interface NavigationMyPagesRefs extends System {
|
||||
items: NavigationItemRef[]
|
||||
}
|
||||
|
||||
export type GetNavigationMyPagesRefsData = {
|
||||
all_navigation_my_pages: AllRequestResponse<NavigationMyPagesRefs>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user