feat(WEB-205, WEB-206): get breadcrumbs for my pages from contentstack
This commit is contained in:
27
types/requests/myPages/breadcrumbs.ts
Normal file
27
types/requests/myPages/breadcrumbs.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { AllRequestResponse } from "../utils/all"
|
||||
import type { Edges } from "../utils/edges"
|
||||
|
||||
interface AccountPageBreadcrumbs {
|
||||
breadcrumbs: {
|
||||
title: string
|
||||
parents: Edges<{
|
||||
breadcrumbs: {
|
||||
title: string
|
||||
}
|
||||
system: {
|
||||
uid: string
|
||||
}
|
||||
url: string
|
||||
}>
|
||||
}
|
||||
system: {
|
||||
uid: string
|
||||
}
|
||||
}
|
||||
|
||||
interface AllAccountPageResponse
|
||||
extends AllRequestResponse<AccountPageBreadcrumbs> {}
|
||||
|
||||
export interface GetMyPagesBreadcrumbsData {
|
||||
all_account_page: AllAccountPageResponse
|
||||
}
|
||||
@@ -26,26 +26,21 @@ interface NavigationLink {
|
||||
locale: Lang
|
||||
uid: string
|
||||
}
|
||||
url: string
|
||||
title: string
|
||||
}
|
||||
|
||||
export interface AccountPageLink
|
||||
extends NavigationLink,
|
||||
TypenameInterface<PageLinkEnum.AccountPage> {
|
||||
url: string
|
||||
}
|
||||
TypenameInterface<PageLinkEnum.AccountPage> { }
|
||||
|
||||
export interface LoyaltyPageLink
|
||||
extends NavigationLink,
|
||||
TypenameInterface<PageLinkEnum.LoyaltyPage> {
|
||||
url: string
|
||||
}
|
||||
TypenameInterface<PageLinkEnum.LoyaltyPage> { }
|
||||
|
||||
export interface ContentPageLink
|
||||
extends NavigationLink,
|
||||
TypenameInterface<PageLinkEnum.ContentPage> {
|
||||
url: string
|
||||
}
|
||||
TypenameInterface<PageLinkEnum.ContentPage> { }
|
||||
|
||||
export type PageLink = ContentPageLink | AccountPageLink | LoyaltyPageLink
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type AllRequestResponse<T> = {
|
||||
export interface AllRequestResponse<T> {
|
||||
items: T[]
|
||||
total: number
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user