feat(WEB-205, WEB-206): get breadcrumbs for my pages from contentstack
This commit is contained in:
2
types/auth.d.ts
vendored
2
types/auth.d.ts
vendored
@@ -15,7 +15,7 @@ declare module "next-auth" {
|
||||
* The shape of the account object returned in the OAuth providers' `account` callback,
|
||||
* Usually contains information about the provider being used, like OAuth tokens (`access_token`, etc).
|
||||
*/
|
||||
interface Account {}
|
||||
interface Account { }
|
||||
|
||||
/**
|
||||
* Returned by `useSession`, `auth`, contains information about the active session.
|
||||
|
||||
@@ -4,4 +4,4 @@ export interface RequestOptionsWithJSONBody
|
||||
}
|
||||
|
||||
export interface RequestOptionsWithOutBody
|
||||
extends Omit<RequestInit, "body" | "method"> {}
|
||||
extends Omit<RequestInit, "body" | "method"> { }
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,6 @@ type Victory = {
|
||||
* we have to get the values from elsewhere
|
||||
*/
|
||||
export interface User extends z.infer<typeof getUserSchema> {
|
||||
dob: string
|
||||
firstName: string
|
||||
journeys: Journey[]
|
||||
nights: number
|
||||
|
||||
Reference in New Issue
Block a user