From 941ae62099cc94b72cd7ff798ddce405565290d5 Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Thu, 4 Apr 2024 15:10:40 +0200 Subject: [PATCH] Ran precommit --- .../Pages/endpoints/getBySlugEndpoint.ts | 7 ++++- src/types/collections.ts | 28 +++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/collections/Pages/endpoints/getBySlugEndpoint.ts b/src/collections/Pages/endpoints/getBySlugEndpoint.ts index 1da7472..e8e8619 100644 --- a/src/collections/Pages/endpoints/getBySlugEndpoint.ts +++ b/src/collections/Pages/endpoints/getBySlugEndpoint.ts @@ -12,7 +12,12 @@ import { import { createGetByEndpoint } from "../../../endpoints/createGetByEndpoint"; import { EndpointPage, EndpointPagePreview, TableOfContentEntry } from "../../../sdk"; import { Page } from "../../../types/collections"; -import { isNotEmpty, isPayloadArrayType, isPayloadType, isValidPayloadImage } from "../../../utils/asserts"; +import { + isNotEmpty, + isPayloadArrayType, + isPayloadType, + isValidPayloadImage, +} from "../../../utils/asserts"; import { convertTagsToGroups, handleParentPages, handleRecorder } from "../../../utils/endpoints"; export const getBySlugEndpoint = createGetByEndpoint({ diff --git a/src/types/collections.ts b/src/types/collections.ts index 56ea429..39113a9 100644 --- a/src/types/collections.ts +++ b/src/types/collections.ts @@ -15,6 +15,7 @@ export type RecorderBiographies = language: string | Language; biography: { root: { + type: string; children: { type: string; version: number; @@ -23,7 +24,6 @@ export type RecorderBiographies = direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -87,6 +87,7 @@ export interface Page { subtitle?: string | null; summary?: { root: { + type: string; children: { type: string; version: number; @@ -95,13 +96,13 @@ export interface Page { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; } | null; content: { root: { + type: string; children: { type: string; version: number; @@ -110,7 +111,6 @@ export interface Page { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -295,6 +295,7 @@ export interface Folder { name: string; description?: { root: { + type: string; children: { type: string; version: number; @@ -303,7 +304,6 @@ export interface Folder { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -356,6 +356,7 @@ export interface Collectible { subtitle?: string | null; description?: { root: { + type: string; children: { type: string; version: number; @@ -364,7 +365,6 @@ export interface Collectible { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -493,6 +493,7 @@ export interface Collectible { language: string | Language; note: { root: { + type: string; children: { type: string; version: number; @@ -501,7 +502,6 @@ export interface Collectible { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -565,6 +565,7 @@ export interface ChronologyEvent { title?: string | null; description?: { root: { + type: string; children: { type: string; version: number; @@ -573,13 +574,13 @@ export interface ChronologyEvent { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; } | null; notes?: { root: { + type: string; children: { type: string; version: number; @@ -588,7 +589,6 @@ export interface ChronologyEvent { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -669,6 +669,7 @@ export interface Note { id: string; note: { root: { + type: string; children: { type: string; version: number; @@ -677,7 +678,6 @@ export interface Note { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; @@ -780,6 +780,7 @@ export interface HomeFolder { export interface LineBlock { content: { root: { + type: string; children: { type: string; version: number; @@ -788,11 +789,12 @@ export interface LineBlock { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; }; + id?: string | null; + blockName?: string | null; blockType: "lineBlock"; } /** @@ -802,6 +804,7 @@ export interface LineBlock { export interface CueBlock { content: { root: { + type: string; children: { type: string; version: number; @@ -810,11 +813,12 @@ export interface CueBlock { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown; }; + id?: string | null; + blockName?: string | null; blockType: "cueBlock"; } /** @@ -844,6 +848,7 @@ export interface BreakBlock { export interface SectionBlock { content: { root: { + type: string; children: { type: string; version: number; @@ -852,7 +857,6 @@ export interface SectionBlock { direction: ("ltr" | "rtl") | null; format: "left" | "start" | "center" | "right" | "end" | "justify" | ""; indent: number; - type: string; version: number; }; [k: string]: unknown;