refactor: clean up an reuse code
This commit is contained in:
@@ -11,8 +11,10 @@ type bool = {
|
|||||||
}
|
}
|
||||||
export default async function Breadcrumbs({ b = false }: bool) {
|
export default async function Breadcrumbs({ b = false }: bool) {
|
||||||
let breadcrumbs
|
let breadcrumbs
|
||||||
if (!b) breadcrumbs = await serverClient().contentstack.breadcrumbs.get()
|
if (!b)
|
||||||
else breadcrumbs = await serverClient().contentstack.breadcrumbs.loyalty()
|
breadcrumbs = await serverClient().contentstack.breadcrumbs.getAccountPage()
|
||||||
|
else
|
||||||
|
breadcrumbs = await serverClient().contentstack.breadcrumbs.getLoyaltyPage()
|
||||||
return (
|
return (
|
||||||
<nav className={styles.breadcrumbs}>
|
<nav className={styles.breadcrumbs}>
|
||||||
<ul className={styles.list}>
|
<ul className={styles.list}>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#import "../Fragments/Refs/ContentPage.graphql"
|
#import "../Fragments/Refs/ContentPage.graphql"
|
||||||
#import "../Fragments/Refs/LoyaltyPage.graphql"
|
#import "../Fragments/Refs/LoyaltyPage.graphql"
|
||||||
#import "../Fragments/Refs/System.graphql"
|
#import "../Fragments/Refs/System.graphql"
|
||||||
|
#import "../Fragments/MyPages/Breadcrumbs.graphql"
|
||||||
|
|
||||||
query GetLoyaltyPage($locale: String!, $uid: String!) {
|
query GetLoyaltyPage($locale: String!, $uid: String!) {
|
||||||
loyalty_page(uid: $uid, locale: $locale) {
|
loyalty_page(uid: $uid, locale: $locale) {
|
||||||
@@ -127,6 +128,7 @@ query GetLoyaltyPage($locale: String!, $uid: String!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
...LoyaltyPageBreadcrumbs
|
||||||
system {
|
system {
|
||||||
uid
|
uid
|
||||||
created_at
|
created_at
|
||||||
|
|||||||
@@ -2,68 +2,6 @@ import { z } from "zod"
|
|||||||
|
|
||||||
import { Lang } from "@/constants/languages"
|
import { Lang } from "@/constants/languages"
|
||||||
|
|
||||||
export const validateBreadcrumbsRefsConstenstackSchema = z.object({
|
|
||||||
all_account_page: z.object({
|
|
||||||
items: z.array(
|
|
||||||
z.object({
|
|
||||||
web: z.object({
|
|
||||||
breadcrumbs: z.object({
|
|
||||||
parentsConnection: z.object({
|
|
||||||
edges: z.array(
|
|
||||||
z.object({
|
|
||||||
node: z.object({
|
|
||||||
system: z.object({
|
|
||||||
content_type_uid: z.string(),
|
|
||||||
uid: z.string(),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
system: z.object({
|
|
||||||
content_type_uid: z.string(),
|
|
||||||
uid: z.string(),
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
export const validateBreadcrumbsContenstackSchema = z.object({
|
|
||||||
all_account_page: z.object({
|
|
||||||
items: z.array(
|
|
||||||
z.object({
|
|
||||||
web: z.object({
|
|
||||||
breadcrumbs: z.object({
|
|
||||||
title: z.string(),
|
|
||||||
parentsConnection: z.object({
|
|
||||||
edges: z.array(
|
|
||||||
z.object({
|
|
||||||
node: z.object({
|
|
||||||
breadcrumbs: z.object({
|
|
||||||
title: z.string(),
|
|
||||||
}),
|
|
||||||
system: z.object({
|
|
||||||
locale: z.nativeEnum(Lang),
|
|
||||||
uid: z.string(),
|
|
||||||
}),
|
|
||||||
url: z.string(),
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
system: z.object({
|
|
||||||
uid: z.string(),
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
export const getBreadcrumbsSchema = z.array(
|
export const getBreadcrumbsSchema = z.array(
|
||||||
z.object({
|
z.object({
|
||||||
href: z.string().optional(),
|
href: z.string().optional(),
|
||||||
@@ -72,26 +10,50 @@ export const getBreadcrumbsSchema = z.array(
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
export const validateBreadcrumbsRefsContenstackSchemaLoyalty = z.object({
|
const validateBreadcrumbs = z.object({
|
||||||
all_loyalty_page: z.object({
|
breadcrumbs: z.object({
|
||||||
items: z.array(
|
title: z.string(),
|
||||||
z.object({
|
parentsConnection: z.object({
|
||||||
web: z.object({
|
edges: z.array(
|
||||||
breadcrumbs: z.object({
|
z.object({
|
||||||
parentsConnection: z.object({
|
node: z.object({
|
||||||
edges: z.array(
|
breadcrumbs: z.object({
|
||||||
z.object({
|
title: z.string(),
|
||||||
node: z.object({
|
}),
|
||||||
system: z.object({
|
system: z.object({
|
||||||
content_type_uid: z.string(),
|
locale: z.nativeEnum(Lang),
|
||||||
uid: z.string(),
|
uid: z.string(),
|
||||||
}),
|
}),
|
||||||
}),
|
url: z.string(),
|
||||||
})
|
}),
|
||||||
),
|
})
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
const validateBreadcrumbsRefs = z.object({
|
||||||
|
breadcrumbs: z.object({
|
||||||
|
parentsConnection: z.object({
|
||||||
|
edges: z.array(
|
||||||
|
z.object({
|
||||||
|
node: z.object({
|
||||||
|
system: z.object({
|
||||||
|
content_type_uid: z.string(),
|
||||||
|
uid: z.string(),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
}),
|
})
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
export const validateBreadcrumbsRefsContentstackSchemaAccountPage = z.object({
|
||||||
|
all_account_page: z.object({
|
||||||
|
items: z.array(
|
||||||
|
z.object({
|
||||||
|
web: validateBreadcrumbsRefs,
|
||||||
system: z.object({
|
system: z.object({
|
||||||
content_type_uid: z.string(),
|
content_type_uid: z.string(),
|
||||||
uid: z.string(),
|
uid: z.string(),
|
||||||
@@ -101,31 +63,38 @@ export const validateBreadcrumbsRefsContenstackSchemaLoyalty = z.object({
|
|||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
export const validateBreadcrumbsContenstackSchemaLoyalty = z.object({
|
export const validateBreadcrumbsContentstackSchemaAccountPage = z.object({
|
||||||
all_loyalty_page: z.object({
|
all_account_page: z.object({
|
||||||
items: z.array(
|
items: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
web: z.object({
|
web: validateBreadcrumbs,
|
||||||
breadcrumbs: z.object({
|
system: z.object({
|
||||||
title: z.string(),
|
uid: z.string(),
|
||||||
parentsConnection: z.object({
|
}),
|
||||||
edges: z.array(
|
})
|
||||||
z.object({
|
),
|
||||||
node: z.object({
|
}),
|
||||||
breadcrumbs: z.object({
|
})
|
||||||
title: z.string(),
|
|
||||||
}),
|
export const validateBreadcrumbsRefsContentstackSchemaLoyaltyPage = z.object({
|
||||||
system: z.object({
|
all_loyalty_page: z.object({
|
||||||
locale: z.nativeEnum(Lang),
|
items: z.array(
|
||||||
uid: z.string(),
|
z.object({
|
||||||
}),
|
web: validateBreadcrumbsRefs,
|
||||||
url: z.string(),
|
system: z.object({
|
||||||
}),
|
content_type_uid: z.string(),
|
||||||
})
|
uid: z.string(),
|
||||||
),
|
}),
|
||||||
}),
|
})
|
||||||
}),
|
),
|
||||||
}),
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
export const validateBreadcrumbsContentstackSchemaLoyaltyPage = z.object({
|
||||||
|
all_loyalty_page: z.object({
|
||||||
|
items: z.array(
|
||||||
|
z.object({
|
||||||
|
web: validateBreadcrumbs,
|
||||||
system: z.object({
|
system: z.object({
|
||||||
uid: z.string(),
|
uid: z.string(),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ import { removeMultipleSlashes } from "@/utils/url"
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
getBreadcrumbsSchema,
|
getBreadcrumbsSchema,
|
||||||
validateBreadcrumbsContenstackSchema,
|
validateBreadcrumbsContentstackSchemaAccountPage,
|
||||||
validateBreadcrumbsContenstackSchemaLoyalty,
|
validateBreadcrumbsContentstackSchemaLoyaltyPage,
|
||||||
validateBreadcrumbsRefsConstenstackSchema,
|
validateBreadcrumbsRefsContentstackSchemaAccountPage,
|
||||||
validateBreadcrumbsRefsContenstackSchemaLoyalty,
|
validateBreadcrumbsRefsContentstackSchemaLoyaltyPage,
|
||||||
} from "./output"
|
} from "./output"
|
||||||
import {
|
import {
|
||||||
affix,
|
affix,
|
||||||
getConnections,
|
getConnectionsAccountPage,
|
||||||
getConnectionsLoyalty,
|
getConnectionsLoyaltyPage,
|
||||||
homeBreadcrumbs,
|
homeBreadcrumbs,
|
||||||
} from "./utils"
|
} from "./utils"
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ import type {
|
|||||||
} from "@/types/requests/myPages/breadcrumbs"
|
} from "@/types/requests/myPages/breadcrumbs"
|
||||||
|
|
||||||
export const breadcrumbsQueryRouter = router({
|
export const breadcrumbsQueryRouter = router({
|
||||||
get: contentstackProcedure.query(async ({ ctx }) => {
|
getAccountPage: contentstackProcedure.query(async ({ ctx }) => {
|
||||||
const refsResponse = await request<GetAccountPageBreadcrumbsRefsData>(
|
const refsResponse = await request<GetAccountPageBreadcrumbsRefsData>(
|
||||||
GetAccountPageBreadcrumbsRefs,
|
GetAccountPageBreadcrumbsRefs,
|
||||||
{ locale: ctx.lang, url: ctx.pathname },
|
{ locale: ctx.lang, url: ctx.pathname },
|
||||||
@@ -49,18 +49,19 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
console.log([generateRefsResponseTag(ctx.lang, ctx.pathname, affix)])
|
|
||||||
if (!refsResponse.data) {
|
if (!refsResponse.data) {
|
||||||
throw notFound(refsResponse)
|
throw notFound(refsResponse)
|
||||||
}
|
}
|
||||||
console.log(refsResponse)
|
|
||||||
const validatedRefsData =
|
const validatedRefsData =
|
||||||
validateBreadcrumbsRefsConstenstackSchema.safeParse(refsResponse.data)
|
validateBreadcrumbsRefsContentstackSchemaAccountPage.safeParse(
|
||||||
|
refsResponse.data
|
||||||
|
)
|
||||||
if (!validatedRefsData.success) {
|
if (!validatedRefsData.success) {
|
||||||
throw internalServerError(validatedRefsData.error)
|
throw internalServerError(validatedRefsData.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const connections = getConnections(validatedRefsData.data)
|
const connections = getConnectionsAccountPage(validatedRefsData.data)
|
||||||
const tags = generateTags(ctx.lang, connections)
|
const tags = generateTags(ctx.lang, connections)
|
||||||
const page = validatedRefsData.data.all_account_page.items[0]
|
const page = validatedRefsData.data.all_account_page.items[0]
|
||||||
tags.push(generateTag(ctx.lang, page.system.uid, affix))
|
tags.push(generateTag(ctx.lang, page.system.uid, affix))
|
||||||
@@ -75,7 +76,7 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const validatedBreadcrumbsData =
|
const validatedBreadcrumbsData =
|
||||||
validateBreadcrumbsContenstackSchema.safeParse(response.data)
|
validateBreadcrumbsContentstackSchemaAccountPage.safeParse(response.data)
|
||||||
|
|
||||||
if (!validatedBreadcrumbsData.success) {
|
if (!validatedBreadcrumbsData.success) {
|
||||||
throw internalServerError(validatedBreadcrumbsData.error)
|
throw internalServerError(validatedBreadcrumbsData.error)
|
||||||
@@ -101,7 +102,7 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
uid: breadcrumb.system.uid,
|
uid: breadcrumb.system.uid,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(pageBreadcrumb)
|
|
||||||
const breadcrumbs = [
|
const breadcrumbs = [
|
||||||
homeBreadcrumbs[ctx.lang],
|
homeBreadcrumbs[ctx.lang],
|
||||||
parentBreadcrumbs,
|
parentBreadcrumbs,
|
||||||
@@ -115,7 +116,7 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
|
|
||||||
return validatedBreadcrumbs.data
|
return validatedBreadcrumbs.data
|
||||||
}),
|
}),
|
||||||
loyalty: contentstackProcedure.query(async ({ ctx }) => {
|
getLoyaltyPage: contentstackProcedure.query(async ({ ctx }) => {
|
||||||
const refsResponse = await request<GetLoyaltyPageBreadcrumbsRefsData>(
|
const refsResponse = await request<GetLoyaltyPageBreadcrumbsRefsData>(
|
||||||
GetLoyaltyPageBreadcrumbsRefs,
|
GetLoyaltyPageBreadcrumbsRefs,
|
||||||
{ locale: ctx.lang, url: ctx.pathname },
|
{ locale: ctx.lang, url: ctx.pathname },
|
||||||
@@ -125,14 +126,13 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
console.log(ctx.pathname)
|
|
||||||
console.log(refsResponse)
|
|
||||||
if (!refsResponse.data) {
|
if (!refsResponse.data) {
|
||||||
throw notFound(refsResponse)
|
throw notFound(refsResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
const validatedRefsData =
|
const validatedRefsData =
|
||||||
validateBreadcrumbsRefsContenstackSchemaLoyalty.safeParse(
|
validateBreadcrumbsRefsContentstackSchemaLoyaltyPage.safeParse(
|
||||||
refsResponse.data
|
refsResponse.data
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
throw internalServerError(validatedRefsData.error)
|
throw internalServerError(validatedRefsData.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const connections = getConnectionsLoyalty(validatedRefsData.data)
|
const connections = getConnectionsLoyaltyPage(validatedRefsData.data)
|
||||||
const tags = generateTags(ctx.lang, connections)
|
const tags = generateTags(ctx.lang, connections)
|
||||||
const page = validatedRefsData.data.all_loyalty_page.items[0]
|
const page = validatedRefsData.data.all_loyalty_page.items[0]
|
||||||
tags.push(generateTag(ctx.lang, page.system.uid, affix))
|
tags.push(generateTag(ctx.lang, page.system.uid, affix))
|
||||||
@@ -156,12 +156,12 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const validatedBreadcrumbsData =
|
const validatedBreadcrumbsData =
|
||||||
validateBreadcrumbsContenstackSchemaLoyalty.safeParse(response.data)
|
validateBreadcrumbsContentstackSchemaLoyaltyPage.safeParse(response.data)
|
||||||
|
|
||||||
if (!validatedBreadcrumbsData.success) {
|
if (!validatedBreadcrumbsData.success) {
|
||||||
throw internalServerError(validatedBreadcrumbsData.error)
|
throw internalServerError(validatedBreadcrumbsData.error)
|
||||||
}
|
}
|
||||||
console.log(validatedBreadcrumbsData)
|
|
||||||
const parentBreadcrumbs =
|
const parentBreadcrumbs =
|
||||||
validatedBreadcrumbsData.data.all_loyalty_page.items[0].web.breadcrumbs.parentsConnection.edges.map(
|
validatedBreadcrumbsData.data.all_loyalty_page.items[0].web.breadcrumbs.parentsConnection.edges.map(
|
||||||
(breadcrumb) => {
|
(breadcrumb) => {
|
||||||
@@ -182,18 +182,18 @@ export const breadcrumbsQueryRouter = router({
|
|||||||
uid: breadcrumb.system.uid,
|
uid: breadcrumb.system.uid,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const breadcrumbs = [
|
const breadcrumbs = [
|
||||||
homeBreadcrumbs[ctx.lang],
|
homeBreadcrumbs[ctx.lang],
|
||||||
parentBreadcrumbs,
|
parentBreadcrumbs,
|
||||||
pageBreadcrumb,
|
pageBreadcrumb,
|
||||||
].flat()
|
].flat()
|
||||||
console.log(breadcrumbs)
|
|
||||||
|
|
||||||
const validatedBreadcrumbs = getBreadcrumbsSchema.safeParse(breadcrumbs)
|
const validatedBreadcrumbs = getBreadcrumbsSchema.safeParse(breadcrumbs)
|
||||||
if (!validatedBreadcrumbs.success) {
|
if (!validatedBreadcrumbs.success) {
|
||||||
throw internalServerError(validatedBreadcrumbs.error)
|
throw internalServerError(validatedBreadcrumbs.error)
|
||||||
}
|
}
|
||||||
console.log(validatedBreadcrumbs.data)
|
|
||||||
return validatedBreadcrumbs.data
|
return validatedBreadcrumbs.data
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,24 +7,23 @@ import type {
|
|||||||
import type { Edges } from "@/types/requests/utils/edges"
|
import type { Edges } from "@/types/requests/utils/edges"
|
||||||
import type { NodeRefs } from "@/types/requests/utils/refs"
|
import type { NodeRefs } from "@/types/requests/utils/refs"
|
||||||
|
|
||||||
export function getConnections(refs: GetAccountPageBreadcrumbsRefsData) {
|
export function getConnectionsAccountPage(
|
||||||
|
refs: GetAccountPageBreadcrumbsRefsData
|
||||||
|
) {
|
||||||
const connections: Edges<NodeRefs>[] = []
|
const connections: Edges<NodeRefs>[] = []
|
||||||
refs.all_account_page.items.forEach((ref) => {
|
refs.all_account_page.items.forEach((ref) => {
|
||||||
console.log(ref.web.breadcrumbs)
|
|
||||||
console.log(ref.web.breadcrumbs.parentsConnection)
|
|
||||||
connections.push(ref.web.breadcrumbs.parentsConnection)
|
connections.push(ref.web.breadcrumbs.parentsConnection)
|
||||||
})
|
})
|
||||||
|
|
||||||
return connections
|
return connections
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getConnectionsLoyalty(refs: GetLoyaltyPageBreadcrumbsRefsData) {
|
export function getConnectionsLoyaltyPage(
|
||||||
|
refs: GetLoyaltyPageBreadcrumbsRefsData
|
||||||
|
) {
|
||||||
const connections: Edges<NodeRefs>[] = []
|
const connections: Edges<NodeRefs>[] = []
|
||||||
refs.all_loyalty_page.items.forEach((ref) => {
|
refs.all_loyalty_page.items.forEach((ref) => {
|
||||||
console.log(ref)
|
|
||||||
connections.push(ref.web.breadcrumbs.parentsConnection)
|
connections.push(ref.web.breadcrumbs.parentsConnection)
|
||||||
})
|
})
|
||||||
console.log(connections)
|
|
||||||
return connections
|
return connections
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,27 +4,7 @@ import type { System } from "../system"
|
|||||||
import type { AllRequestResponse } from "../utils/all"
|
import type { AllRequestResponse } from "../utils/all"
|
||||||
import type { Edges } from "../utils/edges"
|
import type { Edges } from "../utils/edges"
|
||||||
|
|
||||||
interface AccountPageBreadcrumbs {
|
interface MyPagesBreadcrumbs {
|
||||||
web: {
|
|
||||||
breadcrumbs: {
|
|
||||||
title: string
|
|
||||||
parentsConnection: Edges<{
|
|
||||||
breadcrumbs: {
|
|
||||||
title: string
|
|
||||||
}
|
|
||||||
system: {
|
|
||||||
locale: Lang
|
|
||||||
uid: string
|
|
||||||
}
|
|
||||||
url: string
|
|
||||||
}>
|
|
||||||
}
|
|
||||||
system: {
|
|
||||||
uid: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
interface LoyaltyPageBreadcrumbs {
|
|
||||||
web: {
|
web: {
|
||||||
breadcrumbs: {
|
breadcrumbs: {
|
||||||
title: string
|
title: string
|
||||||
@@ -45,21 +25,17 @@ interface LoyaltyPageBreadcrumbs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AllAccountPageResponse
|
interface AllPageResponse extends AllRequestResponse<MyPagesBreadcrumbs> {}
|
||||||
extends AllRequestResponse<AccountPageBreadcrumbs> {}
|
|
||||||
|
|
||||||
interface AllLoyaltyPageResponse
|
|
||||||
extends AllRequestResponse<LoyaltyPageBreadcrumbs> {}
|
|
||||||
|
|
||||||
export interface GetAccountPageBreadcrumbsData {
|
export interface GetAccountPageBreadcrumbsData {
|
||||||
all_account_page: AllAccountPageResponse
|
all_account_page: AllPageResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetLoyaltyPageBreadcrumbsData {
|
export interface GetLoyaltyPageBreadcrumbsData {
|
||||||
all_loyalty_page: AllLoyaltyPageResponse
|
all_loyalty_page: AllPageResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AccountPageBreadcrumbRefs extends System {
|
interface MyPagesBreadcrumbRefs extends System {
|
||||||
web: {
|
web: {
|
||||||
breadcrumbs: {
|
breadcrumbs: {
|
||||||
parentsConnection: Edges<System>
|
parentsConnection: Edges<System>
|
||||||
@@ -67,24 +43,13 @@ interface AccountPageBreadcrumbRefs extends System {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LoyaltyPageBreadcrumbRefs extends System {
|
interface AllPageRefsResponse
|
||||||
web: {
|
extends AllRequestResponse<MyPagesBreadcrumbRefs> {}
|
||||||
breadcrumbs: {
|
|
||||||
parentsConnection: Edges<System>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AllAccountPageRefsResponse
|
|
||||||
extends AllRequestResponse<AccountPageBreadcrumbRefs> {}
|
|
||||||
|
|
||||||
interface AllLoyaltyPageRefsResponse
|
|
||||||
extends AllRequestResponse<LoyaltyPageBreadcrumbRefs> {}
|
|
||||||
|
|
||||||
export interface GetAccountPageBreadcrumbsRefsData {
|
export interface GetAccountPageBreadcrumbsRefsData {
|
||||||
all_account_page: AllAccountPageRefsResponse
|
all_account_page: AllPageRefsResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetLoyaltyPageBreadcrumbsRefsData {
|
export interface GetLoyaltyPageBreadcrumbsRefsData {
|
||||||
all_loyalty_page: AllLoyaltyPageRefsResponse
|
all_loyalty_page: AllPageRefsResponse
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user