feat: graphql client with fetches for initial pages
This commit is contained in:
4
types/requests/utils/all.ts
Normal file
4
types/requests/utils/all.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export type AllRequestResponse<T> = {
|
||||
items: T[]
|
||||
total: number
|
||||
}
|
||||
8
types/requests/utils/asset.ts
Normal file
8
types/requests/utils/asset.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { Typename } from "./typename"
|
||||
|
||||
export type Asset = {
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export type SysAsset = Typename<Asset, "SysAsset">
|
||||
8
types/requests/utils/edges.ts
Normal file
8
types/requests/utils/edges.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type Node<T> = {
|
||||
node: T
|
||||
}
|
||||
|
||||
export type Edges<T> = {
|
||||
edges: Node<T>[]
|
||||
totalCount: number
|
||||
}
|
||||
5
types/requests/utils/externalLink.ts
Normal file
5
types/requests/utils/externalLink.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type ExternalLink = {
|
||||
__typename: "TempPage"
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
5
types/requests/utils/pageLink.ts
Normal file
5
types/requests/utils/pageLink.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type PageLink = {
|
||||
__typename: "CurrentBlocksPage"
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
31
types/requests/utils/typename.ts
Normal file
31
types/requests/utils/typename.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export const AsideTypenames = {
|
||||
CurrentBlocksPageAsideContact: "CurrentBlocksPageAsideContact",
|
||||
CurrentBlocksPageAsidePuff: "CurrentBlocksPageAsidePuff",
|
||||
}
|
||||
|
||||
export enum AsideTypenameEnum {
|
||||
CurrentBlocksPageAsideContact = "CurrentBlocksPageAsideContact",
|
||||
CurrentBlocksPageAsidePuff = "CurrentBlocksPageAsidePuff",
|
||||
}
|
||||
|
||||
export type AsideTypename = keyof typeof AsideTypenameEnum
|
||||
|
||||
export const blocksTypenameEnum = {
|
||||
CurrentBlocksPageBlocksList: "CurrentBlocksPageBlocksList",
|
||||
CurrentBlocksPageBlocksPreamble: "CurrentBlocksPageBlocksPreamble",
|
||||
CurrentBlocksPageBlocksPuffs: "CurrentBlocksPageBlocksPuffs",
|
||||
CurrentBlocksPageBlocksText: "CurrentBlocksPageBlocksText",
|
||||
}
|
||||
|
||||
export type BlocksTypename = keyof typeof blocksTypenameEnum
|
||||
|
||||
export enum BlocksTypenameEnum {
|
||||
CurrentBlocksPageBlocksList = "CurrentBlocksPageBlocksList",
|
||||
CurrentBlocksPageBlocksPreamble = "CurrentBlocksPageBlocksPreamble",
|
||||
CurrentBlocksPageBlocksPuffs = "CurrentBlocksPageBlocksPuffs",
|
||||
CurrentBlocksPageBlocksText = "CurrentBlocksPageBlocksText",
|
||||
}
|
||||
|
||||
export type Typename<T, K> = T & {
|
||||
__typename: K
|
||||
}
|
||||
Reference in New Issue
Block a user