From b9d10f46702359d1d11f84eac29d945c18e32b5c Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Wed, 3 May 2023 04:31:34 +0200 Subject: [PATCH] Support for multiple previous/follow-up contents --- public/local-data/websiteInterfaces.json | 25 +- src/components/PostPage.tsx | 26 +- src/components/PreviewLine.tsx | 103 ------- src/components/ThumbnailHeader.tsx | 9 +- .../fragments/relatedContentPreview.graphql | 40 +++ src/graphql/icuParams.ts | 4 +- src/graphql/operations/getContentText.graphql | 59 +--- .../operations/getContentsFolder.graphql | 1 - src/helpers/component.tsx | 4 +- src/pages/api/revalidate.ts | 5 + src/pages/chronicles/[slug]/index.tsx | 1 - src/pages/contents/[slug].tsx | 216 +++++++-------- src/pages/contents/folder/[slug].tsx | 11 - src/pages/dev/showcase/design-system.tsx | 52 ---- .../meilisearch-graphql-typings/generated.ts | 259 +++++++++++++++++- 15 files changed, 454 insertions(+), 361 deletions(-) delete mode 100644 src/components/PreviewLine.tsx create mode 100644 src/graphql/fragments/relatedContentPreview.graphql diff --git a/public/local-data/websiteInterfaces.json b/public/local-data/websiteInterfaces.json index 97a7fa6..a45e05f 100644 --- a/public/local-data/websiteInterfaces.json +++ b/public/local-data/websiteInterfaces.json @@ -118,8 +118,8 @@ "primary_language": "Primary language", "secondary_language": "Secondary languages", "combine_related_contents": "Combine related contents", - "previous_content": "Previous content", - "followup_content": "Follow-up content", + "previous_content": "{ count, plural, =0 {No previous content} one {Previous content} other {Previous contents} }", + "followup_content": "{ count, plural, =0 {No follow-up content} one {Follow-up content} other {Follow-up contents} }", "videos": "Videos", "view_on": "View on", "channel": "Channel", @@ -184,7 +184,8 @@ "weapon": "{ count, plural, =0 {No weapons} one {Weapon} other {Weapons} }", "weapons_description": "A list of all the weapons across all of the games. All distinguished weapons come with an “account.” It’s a document with various details like how the weapon was forged and how it’s been used in the past.", "level_x": "Level {x}", - "story_x": "Story {x}" + "story_x": "Story {x}", + "player_name_tooltip": "Certain in-game texts use the player's name as part of the dialogue/narration. If you want to see your name in the transcript found on this website, feel free to enter your player's name here. If left empty, '(player)' will be used instead." } }, { @@ -367,10 +368,11 @@ "subitem_of_x": "Sous-item de {x}", "variant_of_x": "Variante de {x}", "dark_mode_extension_warning": "Ce site web propose un thème clair et un thème sombre. Si vous utilisez une extension de navigateur qui simule un thème sombre, veillez à la désactiver pour une expérience optimale.", - "weapon": null, - "weapons_description": null, - "level_x": null, - "story_x": null + "weapon": "{ count, plural, =0 {Pas d'arme} one {Arme} other {Armes} }", + "weapons_description": "Une liste de toutes les armes présentes dans tous les jeux. Toutes les armes distinguées sont accompagnées d'un \"compte\". Il s'agit d'un document contenant divers détails tels que la façon dont l'arme a été forgée et comment elle a été utilisée dans le passé.", + "level_x": "Niveau {x}", + "story_x": "Histoire {x}", + "player_name_tooltip": "Certains textes dans les jeux utilisent le nom du joueur dans les dialogue/la narration. Si vous voulez voir votre nom dans les transcriptions se trouvant sur ce site web, n'hésitez pas à entrer votre nom de joueur ici. S'il n'est pas renseigné, '(player)' sera utilisé à la place." } }, { @@ -556,7 +558,8 @@ "weapon": null, "weapons_description": null, "level_x": null, - "story_x": null + "story_x": null, + "player_name_tooltip": null } }, { @@ -742,7 +745,8 @@ "weapon": null, "weapons_description": null, "level_x": null, - "story_x": null + "story_x": null, + "player_name_tooltip": null } }, { @@ -928,7 +932,8 @@ "weapon": null, "weapons_description": null, "level_x": null, - "story_x": null + "story_x": null, + "player_name_tooltip": null } } ] diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx index e0adfa0..1936a54 100644 --- a/src/components/PostPage.tsx +++ b/src/components/PostPage.tsx @@ -16,6 +16,7 @@ import { useFormat } from "hooks/useFormat"; import { useAtomGetter, useAtomSetter } from "helpers/atoms"; import { atoms } from "contexts/atoms"; import { ElementsSeparator } from "helpers/component"; +import { HorizontalLine } from "components/HorizontalLine"; /* * ╭─────────────╮ @@ -129,17 +130,20 @@ export const PostPage = ({ )} {displayThumbnailHeader ? ( - 1 ? ( - - ) : undefined - } - /> + <> + 1 ? ( + + ) : undefined + } + /> + + ) : ( <> {displayLanguageSwitcher && ( diff --git a/src/components/PreviewLine.tsx b/src/components/PreviewLine.tsx deleted file mode 100644 index dcc3fd5..0000000 --- a/src/components/PreviewLine.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { useCallback } from "react"; -import { Chip } from "./Chip"; -import { Img } from "./Img"; -import { UpPressable } from "./Containers/UpPressable"; -import { UploadImageFragment } from "graphql/generated"; -import { ImageQuality } from "helpers/img"; -import { TranslatedProps } from "types/TranslatedProps"; -import { useSmartLanguage } from "hooks/useSmartLanguage"; -import { cIf, cJoin } from "helpers/className"; -import { isDefined } from "helpers/asserts"; - -/* - * ╭─────────────╮ - * ───────────────────────────────────────╯ COMPONENT ╰─────────────────────────────────────────── - */ - -interface Props { - thumbnail?: UploadImageFragment | string | null | undefined; - href: string; - pre_title?: string | null | undefined; - title: string | null | undefined; - subtitle?: string | null | undefined; - topChips?: string[]; - bottomChips?: string[]; - disabled?: boolean; -} - -// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ - -export const PreviewLine = ({ - href, - thumbnail, - pre_title, - title, - subtitle, - topChips, - disabled, - bottomChips, -}: Props): JSX.Element => ( - -
- {thumbnail && ( -
- -
- )} - -
- {topChips && topChips.length > 0 && ( -
- {topChips.map((text, index) => ( - - ))} -
- )} -
- {pre_title &&

{pre_title}

} - {title &&

{title}

} - {subtitle &&

{subtitle}

} -
- {bottomChips && bottomChips.length > 0 && ( -
- {bottomChips.map((text, index) => ( - - ))} -
- )} -
-
-
-); - -/* - * ╭──────────────────────╮ - * ───────────────────────────────────╯ TRANSLATED VARIANT ╰────────────────────────────────────── - */ - -export const TranslatedPreviewLine = ({ - translations, - fallback, - ...otherProps -}: TranslatedProps): JSX.Element => { - const [selectedTranslation] = useSmartLanguage({ - items: translations, - languageExtractor: useCallback((item: { language: string }): string => item.language, []), - }); - return ( - - ); -}; diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx index 8772113..2a6f1c2 100644 --- a/src/components/ThumbnailHeader.tsx +++ b/src/components/ThumbnailHeader.tsx @@ -27,7 +27,7 @@ interface Props { NonNullable["data"][number]["attributes"] >["categories"]; thumbnail?: UploadImageFragment | null | undefined; - + className?: string; languageSwitcher?: JSX.Element; } @@ -42,13 +42,14 @@ export const ThumbnailHeader = ({ categories, description, languageSwitcher, + className, }: Props): JSX.Element => { const { format } = useFormat(); const { showLightBox } = useAtomGetter(atoms.lightBox); return ( - <> -
+
+
{thumbnail ? ( {description && {}} - +
); }; diff --git a/src/graphql/fragments/relatedContentPreview.graphql b/src/graphql/fragments/relatedContentPreview.graphql new file mode 100644 index 0000000..4727b8b --- /dev/null +++ b/src/graphql/fragments/relatedContentPreview.graphql @@ -0,0 +1,40 @@ +fragment relatedContentPreview on Content { + slug + translations(pagination: { limit: -1 }) { + pre_title + title + subtitle + language { + data { + attributes { + code + } + } + } + } + categories(pagination: { limit: -1 }) { + data { + id + attributes { + short + } + } + } + type { + data { + attributes { + slug + titles(filters: { language: { code: { eq: $language_code } } }) { + title + } + } + } + } + thumbnail { + data { + attributes { + ...uploadImage + } + } + } +} diff --git a/src/graphql/icuParams.ts b/src/graphql/icuParams.ts index e0f67f7..7d7744c 100644 --- a/src/graphql/icuParams.ts +++ b/src/graphql/icuParams.ts @@ -113,8 +113,8 @@ export interface ICUParams { primary_language: never; secondary_language: never; combine_related_contents: never; - previous_content: never; - followup_content: never; + previous_content: { count: number }; + followup_content: { count: number }; videos: never; view_on: never; channel: never; diff --git a/src/graphql/operations/getContentText.graphql b/src/graphql/operations/getContentText.graphql index d96c43c..e80ccf8 100644 --- a/src/graphql/operations/getContentText.graphql +++ b/src/graphql/operations/getContentText.graphql @@ -208,51 +208,20 @@ query getContentText($slug: String, $language_code: String) { } title } - sequence - contents(pagination: { limit: -1 }) { - data { - attributes { - slug - translations(pagination: { limit: -1 }) { - pre_title - title - subtitle - language { - data { - attributes { - code - } - } - } - } - categories(pagination: { limit: -1 }) { - data { - id - attributes { - short - } - } - } - type { - data { - attributes { - slug - titles(filters: { language: { code: { eq: $language_code } } }) { - title - } - } - } - } - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - } - } - } + } + } + } + previous_contents(pagination: { limit: -1 }) { + data { + attributes { + ...relatedContentPreview + } + } + } + next_contents(pagination: { limit: -1 }) { + data { + attributes { + ...relatedContentPreview } } } diff --git a/src/graphql/operations/getContentsFolder.graphql b/src/graphql/operations/getContentsFolder.graphql index 4b2cb0c..4e06f5a 100644 --- a/src/graphql/operations/getContentsFolder.graphql +++ b/src/graphql/operations/getContentsFolder.graphql @@ -3,7 +3,6 @@ query getContentsFolder($slug: String, $language_code: String) { data { attributes { slug - sequence titles(pagination: { limit: -1 }) { id language { diff --git a/src/helpers/component.tsx b/src/helpers/component.tsx index b3e97c7..c481254 100644 --- a/src/helpers/component.tsx +++ b/src/helpers/component.tsx @@ -34,11 +34,13 @@ export const ConditionalWrapper = ({ interface ElementsSeparatorProps { children: React.ReactNode[]; separator?: React.ReactNode; + className?: string; } export const ElementsSeparator = ({ children, - separator = , + className, + separator = , }: ElementsSeparatorProps): JSX.Element => ( <>{insertInBetweenArray(children.filter(Boolean), separator)} ); diff --git a/src/pages/api/revalidate.ts b/src/pages/api/revalidate.ts index 035ea33..1648942 100644 --- a/src/pages/api/revalidate.ts +++ b/src/pages/api/revalidate.ts @@ -72,6 +72,8 @@ interface StrapiContent extends StrapiEvent { slug: string; folder?: StrapiRelationalFieldEntry; ranged_contents: StrapiRelationalFieldEntry[]; + next_contents: StrapiRelationalFieldEntry[]; + previous_contents: StrapiRelationalFieldEntry[]; }; } @@ -235,6 +237,9 @@ const Revalidate = async ( } } + body.entry.previous_contents.forEach(({ slug }) => paths.push(`/contents/${slug}`)); + body.entry.next_contents.forEach(({ slug }) => paths.push(`/contents/${slug}`)); + await Promise.all( body.entry.ranged_contents.map(async ({ id }) => { const rangedContent = await sdk.revalidationGetRangedContent({ diff --git a/src/pages/chronicles/[slug]/index.tsx b/src/pages/chronicles/[slug]/index.tsx index 7bee657..7199633 100644 --- a/src/pages/chronicles/[slug]/index.tsx +++ b/src/pages/chronicles/[slug]/index.tsx @@ -16,7 +16,6 @@ import { ReturnButton } from "components/PanelComponents/ReturnButton"; import { getOpenGraph } from "helpers/openGraph"; import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales"; import { getDescription } from "helpers/description"; -import { TranslatedChroniclesList } from "components/Chronicles/ChroniclesList"; import { useScrollTopOnChange } from "hooks/useScrollTopOnChange"; import { Ids } from "types/ids"; import { useFormat } from "hooks/useFormat"; diff --git a/src/pages/contents/[slug].tsx b/src/pages/contents/[slug].tsx index db355ad..f4c4222 100644 --- a/src/pages/contents/[slug].tsx +++ b/src/pages/contents/[slug].tsx @@ -1,14 +1,14 @@ import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next"; -import { Fragment, useCallback } from "react"; -import naturalCompare from "string-natural-compare"; +import { Fragment, useCallback, useState } from "react"; +import Collapsible from "react-collapsible"; import { AppLayout, AppLayoutRequired } from "components/AppLayout"; import { Chip } from "components/Chip"; import { PreviewCardCTAs } from "components/Library/PreviewCardCTAs"; import { getTocFromMarkdawn, Markdawn, TableOfContents } from "components/Markdown/Markdawn"; import { TranslatedReturnButton } from "components/PanelComponents/ReturnButton"; -import { ContentPanel } from "components/Containers/ContentPanel"; +import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel"; import { SubPanel } from "components/Containers/SubPanel"; -import { PreviewCard } from "components/PreviewCard"; +import { PreviewCard, TranslatedPreviewCard } from "components/PreviewCard"; import { RecorderChip } from "components/RecorderChip"; import { ThumbnailHeader } from "components/ThumbnailHeader"; import { ToolTip } from "components/ToolTip"; @@ -27,14 +27,15 @@ import { useSmartLanguage } from "hooks/useSmartLanguage"; import { getOpenGraph } from "helpers/openGraph"; import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales"; import { getDescription } from "helpers/description"; -import { TranslatedPreviewLine } from "components/PreviewLine"; -import { cIf } from "helpers/className"; +import { cIf, cJoin } from "helpers/className"; import { Ids } from "types/ids"; import { atoms } from "contexts/atoms"; import { useAtomGetter, useAtomSetter } from "helpers/atoms"; import { useFormat } from "hooks/useFormat"; import { getFormat } from "helpers/i18n"; import { ElementsSeparator } from "helpers/component"; +import { RelatedContentPreviewFragment } from "graphql/generated"; +import { Button } from "components/Inputs/Button"; /* * ╭────────╮ @@ -46,7 +47,6 @@ interface Props extends AppLayoutRequired { } const Content = ({ content, ...otherProps }: Props): JSX.Element => { - const isContentPanelAtLeast2xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast2xl); const setSubPanelOpened = useAtomSetter(atoms.layout.subPanelOpened); const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout); @@ -64,15 +64,6 @@ const Content = ({ content, ...otherProps }: Props): JSX.Element => { useScrollTopOnChange(Ids.ContentPanel, [selectedTranslation]); - const previousContent = - content.folder?.data?.attributes?.contents && content.folder.data.attributes.sequence - ? getPreviousContent(content.folder.data.attributes.contents.data, content.slug) - : undefined; - const nextContent = - content.folder?.data?.attributes?.contents && content.folder.data.attributes.sequence - ? getNextContent(content.folder.data.attributes.contents.data, content.slug) - : undefined; - const returnButtonProps = { href: content.folder?.data?.attributes ? `/contents/folder/${content.folder.data.attributes.slug}` @@ -255,7 +246,7 @@ const Content = ({ content, ...otherProps }: Props): JSX.Element => { ); const contentPanel = ( - + { />
- + {[ { } />, - previousContent?.attributes && ( - <> -

{format("previous_content")}

- ({ - pre_title: translation.pre_title, - title: translation.title, - subtitle: translation.subtitle, - language: translation.language.data.attributes.code, - }))} - fallback={{ - title: prettySlug(previousContent.attributes.slug), - }} - thumbnail={previousContent.attributes.thumbnail?.data?.attributes} - topChips={ - isContentPanelAtLeast2xl && previousContent.attributes.type?.data?.attributes - ? [ - previousContent.attributes.type.data.attributes.titles?.[0] - ? previousContent.attributes.type.data.attributes.titles[0]?.title - : prettySlug(previousContent.attributes.type.data.attributes.slug), - ] - : undefined - } - bottomChips={ - isContentPanelAtLeast2xl - ? previousContent.attributes.categories?.data.map( - (category) => category.attributes?.short ?? "" - ) - : undefined - } - /> - + content.previous_contents?.data && content.previous_contents.data.length > 0 && ( + attributes + )} + isInitiallyOpened={false} + /> ), selectedTranslation?.text_set?.text && ( - + ), - nextContent?.attributes && ( - <> -

{format("followup_content")}

- ({ - pre_title: translation.pre_title, - title: translation.title, - subtitle: translation.subtitle, - language: translation.language.data.attributes.code, - }))} - fallback={{ title: nextContent.attributes.slug }} - thumbnail={nextContent.attributes.thumbnail?.data?.attributes} - topChips={ - isContentPanelAtLeast2xl && nextContent.attributes.type?.data?.attributes - ? [ - nextContent.attributes.type.data.attributes.titles?.[0] - ? nextContent.attributes.type.data.attributes.titles[0]?.title - : prettySlug(nextContent.attributes.type.data.attributes.slug), - ] - : undefined - } - bottomChips={ - isContentPanelAtLeast2xl - ? nextContent.attributes.categories?.data.map( - (category) => category.attributes?.short ?? "" - ) - : undefined - } - /> - + content.next_contents?.data && content.next_contents.data.length > 0 && ( + attributes + )} + /> ), ]}
@@ -418,12 +357,6 @@ export const getStaticProps: GetStaticProps = async (context) => { const thumbnail = content.contents.data[0].attributes.thumbnail?.data?.attributes; - if (content.contents.data[0].attributes.folder?.data?.attributes?.sequence === false) { - content.contents.data[0].attributes.folder.data.attributes.contents?.data.sort((a, b) => - a.attributes && b.attributes ? naturalCompare(a.attributes.slug, b.attributes.slug) : 0 - ); - } - const props: Props = { content: content.contents.data[0].attributes as ContentWithTranslations, openGraph: getOpenGraph(format, title, description, thumbnail), @@ -454,34 +387,83 @@ export const getStaticPaths: GetStaticPaths = async (context) => { }; /* - * ╭───────────────────╮ - * ─────────────────────────────────────╯ PRIVATE METHODS ╰─────────────────────────────────────── + * ╭──────────────────────╮ + * ───────────────────────────────────╯ PRIVATE COMPONENTS ╰────────────────────────────────────── */ -type FolderContents = NonNullable< - NonNullable< - NonNullable["data"]>["attributes"] - >["contents"] ->["data"]; +interface RelatedContentsSectionProps { + title: string; + contents: RelatedContentPreviewFragment[]; + isInitiallyOpened?: boolean; +} -const getPreviousContent = (contents: FolderContents, currentSlug: string) => { - for (let index = 0; index < contents.length; index++) { - const content = contents[index]; - if (content?.attributes?.slug === currentSlug && index > 0) { - return contents[index - 1]; - } - } - return undefined; +const RelatedContentsSection = ({ + title, + contents, + isInitiallyOpened = true, +}: RelatedContentsSectionProps) => { + const [isOpened, setOpened] = useState(isInitiallyOpened); + + return ( + setOpened(false)} + onOpening={() => setOpened(true)} + trigger={ +
+

{title}

+
+ } + contentInnerClassName={cJoin( + cIf(contents.length > 1, "px-4 py-10", "px-4 py-6"), + "flex w-full flex-wrap place-content-center items-start gap-x-6 gap-y-8" + )} + easing="ease-in-out" + transitionTime={400} + lazyRender + contentHiddenWhenClosed> + {contents.map((relatedContent) => ( + + ))} +
+ ); }; -// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ +const RelatedContentPreview = ({ + slug, + translations, + thumbnail, + categories, + type, +}: RelatedContentPreviewFragment) => { + const isContentPanelAtLeastXl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeastXl); -const getNextContent = (contents: FolderContents, currentSlug: string) => { - for (let index = 0; index < contents.length; index++) { - const content = contents[index]; - if (content?.attributes?.slug === currentSlug && index < contents.length - 1) { - return contents[index + 1]; - } - } - return undefined; + return ( + ({ + pre_title: translation.pre_title, + title: translation.title, + subtitle: translation.subtitle, + language: translation.language.data.attributes.code, + }) + )} + fallback={{ title: slug }} + thumbnail={thumbnail?.data?.attributes} + topChips={ + type?.data?.attributes + ? [ + type.data.attributes.titles?.[0] + ? type.data.attributes.titles[0]?.title + : prettySlug(type.data.attributes.slug), + ] + : undefined + } + bottomChips={categories?.data.map((category) => category.attributes?.short ?? "")} + keepInfoVisible + /> + ); }; diff --git a/src/pages/contents/folder/[slug].tsx b/src/pages/contents/folder/[slug].tsx index caeab2f..2851c28 100644 --- a/src/pages/contents/folder/[slug].tsx +++ b/src/pages/contents/folder/[slug].tsx @@ -1,5 +1,4 @@ import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next"; -import naturalCompare from "string-natural-compare"; import { AppLayout, AppLayoutRequired } from "components/AppLayout"; import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel"; import { getOpenGraph } from "helpers/openGraph"; @@ -218,16 +217,6 @@ export const getStaticProps: GetStaticProps = async (context) => { const folder = contentsFolder.contentsFolders.data[0].attributes; - folder.subfolders?.data.sort((a, b) => - a.attributes && b.attributes ? naturalCompare(a.attributes.slug, b.attributes.slug) : 0 - ); - - if (!folder.sequence) { - folder.contents?.data.sort((a, b) => - a.attributes && b.attributes ? naturalCompare(a.attributes.slug, b.attributes.slug) : 0 - ); - } - const title = (() => { if (slug === "root") { return format("contents"); diff --git a/src/pages/dev/showcase/design-system.tsx b/src/pages/dev/showcase/design-system.tsx index 6ed2452..8837648 100644 --- a/src/pages/dev/showcase/design-system.tsx +++ b/src/pages/dev/showcase/design-system.tsx @@ -14,7 +14,6 @@ import { WithLabel } from "components/Inputs/WithLabel"; import { NavOption } from "components/PanelComponents/NavOption"; import { ButtonGroup } from "components/Inputs/ButtonGroup"; import { PreviewCard } from "components/PreviewCard"; -import { PreviewLine } from "components/PreviewLine"; import { ChroniclePreview } from "components/Chronicles/ChroniclePreview"; import { PreviewFolder } from "components/Contents/PreviewFolder"; import { getFormat } from "helpers/i18n"; @@ -805,57 +804,6 @@ const DesignSystem = (props: Props): JSX.Element => { />
- -

Preview Line

- -
- - - - - - -
-

Folder Card

diff --git a/src/shared/meilisearch-graphql-typings/generated.ts b/src/shared/meilisearch-graphql-typings/generated.ts index b63acf6..0c437d1 100644 --- a/src/shared/meilisearch-graphql-typings/generated.ts +++ b/src/shared/meilisearch-graphql-typings/generated.ts @@ -1497,6 +1497,54 @@ export type ComponentTranslationsPostsInput = { translators?: InputMaybe>>; }; +export type ComponentTranslationsReinCostumes = { + __typename?: "ComponentTranslationsReinCostumes"; + description: Scalars["String"]; + id: Scalars["ID"]; + language?: Maybe; + name: Scalars["String"]; +}; + +export type ComponentTranslationsReinCostumesFiltersInput = { + and?: InputMaybe>>; + description?: InputMaybe; + language?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; +}; + +export type ComponentTranslationsReinCostumesInput = { + description?: InputMaybe; + id?: InputMaybe; + language?: InputMaybe; + name?: InputMaybe; +}; + +export type ComponentTranslationsReinEmblems = { + __typename?: "ComponentTranslationsReinEmblems"; + description: Scalars["String"]; + id: Scalars["ID"]; + language?: Maybe; + name: Scalars["String"]; +}; + +export type ComponentTranslationsReinEmblemsFiltersInput = { + and?: InputMaybe>>; + description?: InputMaybe; + language?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; +}; + +export type ComponentTranslationsReinEmblemsInput = { + description?: InputMaybe; + id?: InputMaybe; + language?: InputMaybe; + name?: InputMaybe; +}; + export type ComponentTranslationsScanSet = { __typename?: "ComponentTranslationsScanSet"; credits: ComponentBasicsCredits; @@ -1840,6 +1888,8 @@ export type Content = { chronicles?: Maybe; createdAt?: Maybe; folder?: Maybe; + next_contents?: Maybe; + previous_contents?: Maybe; ranged_contents?: Maybe; slug: Scalars["String"]; thumbnail?: Maybe; @@ -1860,6 +1910,18 @@ export type ContentChroniclesArgs = { sort?: InputMaybe>>; }; +export type ContentNext_ContentsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type ContentPrevious_ContentsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + export type ContentRanged_ContentsArgs = { filters?: InputMaybe; pagination?: InputMaybe; @@ -1896,8 +1958,10 @@ export type ContentFiltersInput = { createdAt?: InputMaybe; folder?: InputMaybe; id?: InputMaybe; + next_contents?: InputMaybe; not?: InputMaybe; or?: InputMaybe>>; + previous_contents?: InputMaybe; ranged_contents?: InputMaybe; slug?: InputMaybe; translations?: InputMaybe; @@ -1909,6 +1973,8 @@ export type ContentInput = { categories?: InputMaybe>>; chronicles?: InputMaybe>>; folder?: InputMaybe; + next_contents?: InputMaybe>>; + previous_contents?: InputMaybe>>; ranged_contents?: InputMaybe>>; slug?: InputMaybe; thumbnail?: InputMaybe; @@ -1973,7 +2039,6 @@ export type ContentsFolder = { contents?: Maybe; createdAt?: Maybe; parent_folder?: Maybe; - sequence: Scalars["Boolean"]; slug: Scalars["String"]; subfolders?: Maybe; titles: Array>; @@ -2023,7 +2088,6 @@ export type ContentsFolderFiltersInput = { not?: InputMaybe; or?: InputMaybe>>; parent_folder?: InputMaybe; - sequence?: InputMaybe; slug?: InputMaybe; subfolders?: InputMaybe; titles?: InputMaybe; @@ -2033,7 +2097,6 @@ export type ContentsFolderFiltersInput = { export type ContentsFolderInput = { contents?: InputMaybe>>; parent_folder?: InputMaybe; - sequence?: InputMaybe; slug?: InputMaybe; subfolders?: InputMaybe>>; titles?: InputMaybe>>; @@ -2409,6 +2472,8 @@ export type GenericMorph = | ComponentTranslationsLibraryContent | ComponentTranslationsLibraryItems | ComponentTranslationsPosts + | ComponentTranslationsReinCostumes + | ComponentTranslationsReinEmblems | ComponentTranslationsScanSet | ComponentTranslationsSimpleTitle | ComponentTranslationsTextSet @@ -2439,6 +2504,8 @@ export type GenericMorph = | Post | RangedContent | Recorder + | ReinCostume + | ReinEmblem | Source | TextualSubtype | UploadFile @@ -3009,6 +3076,8 @@ export type Mutation = { createPost?: Maybe; createRangedContent?: Maybe; createRecorder?: Maybe; + createReinCostume?: Maybe; + createReinEmblem?: Maybe; createSource?: Maybe; createTextualSubtype?: Maybe; createUploadFile?: Maybe; @@ -3044,6 +3113,8 @@ export type Mutation = { deletePost?: Maybe; deleteRangedContent?: Maybe; deleteRecorder?: Maybe; + deleteReinCostume?: Maybe; + deleteReinEmblem?: Maybe; deleteSource?: Maybe; deleteTextualSubtype?: Maybe; deleteUploadFile?: Maybe; @@ -3082,6 +3153,8 @@ export type Mutation = { updatePost?: Maybe; updateRangedContent?: Maybe; updateRecorder?: Maybe; + updateReinCostume?: Maybe; + updateReinEmblem?: Maybe; updateSource?: Maybe; updateTextualSubtype?: Maybe; updateUploadFile?: Maybe; @@ -3183,6 +3256,14 @@ export type MutationCreateRecorderArgs = { data: RecorderInput; }; +export type MutationCreateReinCostumeArgs = { + data: ReinCostumeInput; +}; + +export type MutationCreateReinEmblemArgs = { + data: ReinEmblemInput; +}; + export type MutationCreateSourceArgs = { data: SourceInput; }; @@ -3323,6 +3404,14 @@ export type MutationDeleteRecorderArgs = { id: Scalars["ID"]; }; +export type MutationDeleteReinCostumeArgs = { + id: Scalars["ID"]; +}; + +export type MutationDeleteReinEmblemArgs = { + id: Scalars["ID"]; +}; + export type MutationDeleteSourceArgs = { id: Scalars["ID"]; }; @@ -3500,6 +3589,16 @@ export type MutationUpdateRecorderArgs = { id: Scalars["ID"]; }; +export type MutationUpdateReinCostumeArgs = { + data: ReinCostumeInput; + id: Scalars["ID"]; +}; + +export type MutationUpdateReinEmblemArgs = { + data: ReinEmblemInput; + id: Scalars["ID"]; +}; + export type MutationUpdateSourceArgs = { data: SourceInput; id: Scalars["ID"]; @@ -3710,6 +3809,10 @@ export type Query = { rangedContents?: Maybe; recorder?: Maybe; recorders?: Maybe; + reinCostume?: Maybe; + reinCostumes?: Maybe; + reinEmblem?: Maybe; + reinEmblems?: Maybe; source?: Maybe; sources?: Maybe; textualSubtype?: Maybe; @@ -3950,6 +4053,26 @@ export type QueryRecordersArgs = { sort?: InputMaybe>>; }; +export type QueryReinCostumeArgs = { + id?: InputMaybe; +}; + +export type QueryReinCostumesArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type QueryReinEmblemArgs = { + id?: InputMaybe; +}; + +export type QueryReinEmblemsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + export type QuerySourceArgs = { id?: InputMaybe; }; @@ -4228,6 +4351,121 @@ export type RecorderRelationResponseCollection = { data: Array; }; +export type ReinCostume = { + __typename?: "ReinCostume"; + createdAt?: Maybe; + emblem?: Maybe; + slug: Scalars["String"]; + sprite?: Maybe; + thumbnail?: Maybe; + translations?: Maybe>>; + updatedAt?: Maybe; +}; + +export type ReinCostumeTranslationsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type ReinCostumeEntity = { + __typename?: "ReinCostumeEntity"; + attributes?: Maybe; + id?: Maybe; +}; + +export type ReinCostumeEntityResponse = { + __typename?: "ReinCostumeEntityResponse"; + data?: Maybe; +}; + +export type ReinCostumeEntityResponseCollection = { + __typename?: "ReinCostumeEntityResponseCollection"; + data: Array; + meta: ResponseCollectionMeta; +}; + +export type ReinCostumeFiltersInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + emblem?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + slug?: InputMaybe; + translations?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type ReinCostumeInput = { + emblem?: InputMaybe; + slug?: InputMaybe; + sprite?: InputMaybe; + thumbnail?: InputMaybe; + translations?: InputMaybe>>; +}; + +export type ReinCostumeRelationResponseCollection = { + __typename?: "ReinCostumeRelationResponseCollection"; + data: Array; +}; + +export type ReinEmblem = { + __typename?: "ReinEmblem"; + costumes?: Maybe; + createdAt?: Maybe; + slug: Scalars["String"]; + translations?: Maybe>>; + updatedAt?: Maybe; +}; + +export type ReinEmblemCostumesArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type ReinEmblemTranslationsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type ReinEmblemEntity = { + __typename?: "ReinEmblemEntity"; + attributes?: Maybe; + id?: Maybe; +}; + +export type ReinEmblemEntityResponse = { + __typename?: "ReinEmblemEntityResponse"; + data?: Maybe; +}; + +export type ReinEmblemEntityResponseCollection = { + __typename?: "ReinEmblemEntityResponseCollection"; + data: Array; + meta: ResponseCollectionMeta; +}; + +export type ReinEmblemFiltersInput = { + and?: InputMaybe>>; + costumes?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + slug?: InputMaybe; + translations?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type ReinEmblemInput = { + costumes?: InputMaybe>>; + slug?: InputMaybe; + translations?: InputMaybe>>; +}; + export type ResponseCollectionMeta = { __typename?: "ResponseCollectionMeta"; pagination: Pagination; @@ -5031,6 +5269,7 @@ export type WebsiteInterface = { least_popular?: Maybe; left_to_right?: Maybe; legality?: Maybe; + level_x?: Maybe; library?: Maybe; library_description?: Maybe; library_short_description?: Maybe; @@ -5065,6 +5304,7 @@ export type WebsiteInterface = { paper_texture?: Maybe; paperback?: Maybe; player_name?: Maybe; + player_name_tooltip?: Maybe; previous_content?: Maybe; price?: Maybe; primary_language?: Maybe; @@ -5111,6 +5351,7 @@ export type WebsiteInterface = { status_draft?: Maybe; status_incomplete?: Maybe; status_review?: Maybe; + story_x?: Maybe; subitem?: Maybe; subitem_of_x?: Maybe; subscribers?: Maybe; @@ -5139,6 +5380,8 @@ export type WebsiteInterface = { view_scans?: Maybe; want_it?: Maybe; watch_content?: Maybe; + weapon?: Maybe; + weapons_description?: Maybe; width?: Maybe; wiki?: Maybe; wiki_description?: Maybe; @@ -5233,6 +5476,7 @@ export type WebsiteInterfaceFiltersInput = { least_popular?: InputMaybe; left_to_right?: InputMaybe; legality?: InputMaybe; + level_x?: InputMaybe; library?: InputMaybe; library_description?: InputMaybe; library_short_description?: InputMaybe; @@ -5269,6 +5513,7 @@ export type WebsiteInterfaceFiltersInput = { paper_texture?: InputMaybe; paperback?: InputMaybe; player_name?: InputMaybe; + player_name_tooltip?: InputMaybe; previous_content?: InputMaybe; price?: InputMaybe; primary_language?: InputMaybe; @@ -5315,6 +5560,7 @@ export type WebsiteInterfaceFiltersInput = { status_draft?: InputMaybe; status_incomplete?: InputMaybe; status_review?: InputMaybe; + story_x?: InputMaybe; subitem?: InputMaybe; subitem_of_x?: InputMaybe; subscribers?: InputMaybe; @@ -5343,6 +5589,8 @@ export type WebsiteInterfaceFiltersInput = { view_scans?: InputMaybe; want_it?: InputMaybe; watch_content?: InputMaybe; + weapon?: InputMaybe; + weapons_description?: InputMaybe; width?: InputMaybe; wiki?: InputMaybe; wiki_description?: InputMaybe; @@ -5417,6 +5665,7 @@ export type WebsiteInterfaceInput = { least_popular?: InputMaybe; left_to_right?: InputMaybe; legality?: InputMaybe; + level_x?: InputMaybe; library?: InputMaybe; library_description?: InputMaybe; library_short_description?: InputMaybe; @@ -5451,6 +5700,7 @@ export type WebsiteInterfaceInput = { paper_texture?: InputMaybe; paperback?: InputMaybe; player_name?: InputMaybe; + player_name_tooltip?: InputMaybe; previous_content?: InputMaybe; price?: InputMaybe; primary_language?: InputMaybe; @@ -5497,6 +5747,7 @@ export type WebsiteInterfaceInput = { status_draft?: InputMaybe; status_incomplete?: InputMaybe; status_review?: InputMaybe; + story_x?: InputMaybe; subitem?: InputMaybe; subitem_of_x?: InputMaybe; subscribers?: InputMaybe; @@ -5524,6 +5775,8 @@ export type WebsiteInterfaceInput = { view_scans?: InputMaybe; want_it?: InputMaybe; watch_content?: InputMaybe; + weapon?: InputMaybe; + weapons_description?: InputMaybe; width?: InputMaybe; wiki?: InputMaybe; wiki_description?: InputMaybe;