fix(WEB-115): alter contact block to allow any version of multiple numbers and addresses
This commit is contained in:
@@ -1,28 +1,75 @@
|
||||
import type { Edges } from "../utils/edges"
|
||||
import type { Lang } from "@/types/lang"
|
||||
import type { Typename } from "../utils/typename"
|
||||
|
||||
export enum Section {
|
||||
ContactBlockSectionsExtraInfo = "ContactBlockSectionsExtraInfo",
|
||||
ContactBlockSectionsMailingAddress = "ContactBlockSectionsMailingAddress",
|
||||
ContactBlockSectionsPhone = "ContactBlockSectionsPhone",
|
||||
ContactBlockSectionsTitle = "ContactBlockSectionsTitle",
|
||||
ContactBlockSectionsVisitingAddress = "ContactBlockSectionsVisitingAddress",
|
||||
}
|
||||
|
||||
type ExtraInfo = Typename<
|
||||
{
|
||||
extra_info: {
|
||||
text: string
|
||||
}
|
||||
},
|
||||
Section.ContactBlockSectionsExtraInfo
|
||||
>
|
||||
|
||||
type MailingAddress = Typename<
|
||||
{
|
||||
mailing_address: {
|
||||
city: string
|
||||
country: string
|
||||
name: string
|
||||
street: string
|
||||
zip: string
|
||||
}
|
||||
},
|
||||
Section.ContactBlockSectionsMailingAddress
|
||||
>
|
||||
|
||||
type Phone = Typename<
|
||||
{
|
||||
phone: {
|
||||
number: number
|
||||
title: string
|
||||
}
|
||||
},
|
||||
Section.ContactBlockSectionsPhone
|
||||
>
|
||||
|
||||
type Title = Typename<
|
||||
{
|
||||
title: {
|
||||
text: string
|
||||
}
|
||||
},
|
||||
Section.ContactBlockSectionsTitle
|
||||
>
|
||||
|
||||
type VisitingAddress = Typename<
|
||||
{
|
||||
visiting_address: {
|
||||
city: string
|
||||
country: string
|
||||
street: string
|
||||
zip: string
|
||||
}
|
||||
},
|
||||
Section.ContactBlockSectionsVisitingAddress
|
||||
>
|
||||
|
||||
type Sections = ExtraInfo | MailingAddress | Phone | Title | VisitingAddress
|
||||
|
||||
export type ContactNode = {
|
||||
mailing_address: {
|
||||
city: string
|
||||
country: string
|
||||
name: string
|
||||
street: string
|
||||
zip: string
|
||||
}
|
||||
sections: Sections[]
|
||||
system: {
|
||||
uid: string
|
||||
locale: Lang
|
||||
}
|
||||
phone: {
|
||||
number: string
|
||||
title: string
|
||||
}
|
||||
title: string
|
||||
visiting_address: {
|
||||
city: string
|
||||
country: string
|
||||
street: string
|
||||
zip: string
|
||||
uid: string
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user