fix: replace content_type_id with __typename
This commit is contained in:
@@ -8,7 +8,11 @@ import type { PuffBlock } from "./blocks/puff"
|
||||
import type { Preamble } from "./preamble"
|
||||
import type { Text } from "./blocks/text"
|
||||
import type { AllRequestResponse } from "./utils/all"
|
||||
import type { AsideTypenameEnum, Typename } from "./utils/typename"
|
||||
import type {
|
||||
AsideTypenameEnum,
|
||||
Typename,
|
||||
PagesTypenameEnum,
|
||||
} from "./utils/typename"
|
||||
import type { EmbedEnum } from "./utils/embeds"
|
||||
import type { Edges } from "./utils/edges"
|
||||
|
||||
@@ -41,6 +45,7 @@ export type Breadcrumbs = {
|
||||
}
|
||||
|
||||
export type BlockPage = {
|
||||
__typename: PagesTypenameEnum.CurrentBlocksPage
|
||||
aside: Asides[]
|
||||
blocks: Blocks[]
|
||||
breadcrumbs: Breadcrumbs
|
||||
@@ -50,7 +55,6 @@ export type BlockPage = {
|
||||
url: string
|
||||
system: {
|
||||
uid: string
|
||||
content_type_uid: string // should this be locked down to the specific enum?
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ export enum BlocksTypenameEnum {
|
||||
CurrentBlocksPageBlocksText = "CurrentBlocksPageBlocksText",
|
||||
}
|
||||
|
||||
export enum PagesTypenameEnum {
|
||||
CurrentBlocksPage = "CurrentBlocksPage",
|
||||
}
|
||||
|
||||
export type BlocksTypename = keyof typeof BlocksTypenameEnum
|
||||
|
||||
export type Typename<T, K> = T & {
|
||||
|
||||
Reference in New Issue
Block a user