diff --git a/.changeset/six-buses-sit.md b/.changeset/six-buses-sit.md new file mode 100644 index 00000000..231a9826 --- /dev/null +++ b/.changeset/six-buses-sit.md @@ -0,0 +1,6 @@ +--- +'@o2s/integrations.contentful-cms': minor +'@o2s/api-harmonization': minor +--- + +feat: added contentful integration diff --git a/apps/api-harmonization/.env.local b/apps/api-harmonization/.env.local index 14a06a30..11c19fce 100644 --- a/apps/api-harmonization/.env.local +++ b/apps/api-harmonization/.env.local @@ -40,3 +40,8 @@ MEDUSAJS_PUBLISHABLE_API_KEY= MEDUSAJS_ADMIN_API_KEY= SEARCH_ARTICLES_INDEX_NAME=mock + +CF_TOKEN= +CF_SPACE_ID= +CF_ENV= +CF_MANAGEMENT_TOKEN= diff --git a/apps/api-harmonization/turbo.json b/apps/api-harmonization/turbo.json index 8883dcca..06609a24 100644 --- a/apps/api-harmonization/turbo.json +++ b/apps/api-harmonization/turbo.json @@ -36,7 +36,12 @@ "MEDUSAJS_ADMIN_API_KEY", "SEARCH_ARTICLES_INDEX_NAME", "TELEMETRY_DISABLED", - "TELEMETRY_BASE_URL" + "TELEMETRY_BASE_URL", + "ALGOLIA_API_KEY", + "CF_TOKEN", + "CF_SPACE_ID", + "CF_ENV", + "CF_MANAGEMENT_TOKEN" ] } } diff --git a/apps/frontend/.env.development b/apps/frontend/.env.development index 80c08ba9..a1c00ad8 100644 --- a/apps/frontend/.env.development +++ b/apps/frontend/.env.development @@ -9,7 +9,7 @@ NEXT_PUBLIC_LOG_FORMAT=text NEXT_PUBLIC_SUPPORTED_LOCALES=en,de,pl NEXT_PUBLIC_DEFAULT_LOCALE=en -NEXT_PUBLIC_BASE_URL=http://localhost:3000 +NEXT_PUBLIC_BASE_URL=https://localhost:3000 NEXT_PUBLIC_API_URL=http://localhost:3001/api NEXT_PUBLIC_API_URL_INTERNAL=http://localhost:3001/api @@ -25,3 +25,5 @@ AUTH_GITHUB_SECRET={GITHUB_ID} AUTH_DATABASE_URL=file:./dev.db AUTH_DEFAULT_USER_ROLE=selfservice_user + +CF_PREVIEW_SECRET=q1AuSoM39k3Mymx7mYOvdsrmQBlAPaGA diff --git a/apps/frontend/next.config.ts b/apps/frontend/next.config.ts index d7bc6874..1d8eb386 100644 --- a/apps/frontend/next.config.ts +++ b/apps/frontend/next.config.ts @@ -62,6 +62,23 @@ const nextConfig: NextConfig = { return config; }, + async headers() { + return [ + { + source: '/:path*', + headers: [ + { + key: 'X-Frame-Options', + value: 'SAMEORIGIN', + }, + { + key: 'Content-Security-Policy', + value: `frame-ancestors 'self' https://app.contentful.com`, + }, + ], + }, + ]; + }, }; export default withPlugins([withBundleAnalyzer, withNextIntl], nextConfig); diff --git a/apps/frontend/package.json b/apps/frontend/package.json index b78a1285..f60678bc 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -3,8 +3,8 @@ "version": "1.10.0", "private": true, "scripts": { - "dev": "next dev --turbopack", - "dev:https": "next dev --turbopack --experimental-https", + "dev1": "next dev --turbopack", + "dev": "next dev --turbopack --experimental-https", "build": "next build", "postbuild": "cp -r public .next/standalone/apps/frontend && cp -r .next/static .next/standalone/apps/frontend/.next/", "start": "node .next/standalone/apps/frontend/server.js", @@ -13,10 +13,34 @@ "generate:component": "turbo gen web-component" }, "dependencies": { + "@contentful/live-preview": "^4.6.52", "@o2s/api-harmonization": "*", + "@o2s/blocks.article": "*", + "@o2s/blocks.article-list": "*", + "@o2s/blocks.article-search": "*", + "@o2s/blocks.category": "*", + "@o2s/blocks.category-list": "*", + "@o2s/blocks.faq": "*", + "@o2s/blocks.featured-service-list": "*", + "@o2s/blocks.invoice-list": "*", + "@o2s/blocks.notification-details": "*", + "@o2s/blocks.notification-list": "*", + "@o2s/blocks.order-details": "*", + "@o2s/blocks.order-list": "*", + "@o2s/blocks.orders-summary": "*", + "@o2s/blocks.payments-history": "*", + "@o2s/blocks.payments-summary": "*", + "@o2s/blocks.quick-links": "*", + "@o2s/blocks.service-details": "*", + "@o2s/blocks.service-list": "*", + "@o2s/blocks.surveyjs-form": "*", + "@o2s/blocks.ticket-details": "*", + "@o2s/blocks.ticket-list": "*", + "@o2s/blocks.ticket-recent": "*", + "@o2s/blocks.user-account": "*", "@o2s/framework": "*", - "@o2s/ui": "*", "@o2s/integrations.mocked": "*", + "@o2s/ui": "*", "@o2s/utils.api-harmonization": "*", "@o2s/utils.frontend": "*", "class-variance-authority": "^0.7.1", @@ -34,30 +58,7 @@ "react-string-replace": "^1.1.1", "string-template": "^1.0.0", "yup": "^1.7.1", - "zod": "^4.1.12", - "@o2s/blocks.faq": "*", - "@o2s/blocks.invoice-list": "*", - "@o2s/blocks.notification-list": "*", - "@o2s/blocks.quick-links": "*", - "@o2s/blocks.ticket-details": "*", - "@o2s/blocks.ticket-list": "*", - "@o2s/blocks.ticket-recent": "*", - "@o2s/blocks.user-account": "*", - "@o2s/blocks.payments-history": "*", - "@o2s/blocks.payments-summary": "*", - "@o2s/blocks.orders-summary": "*", - "@o2s/blocks.order-details": "*", - "@o2s/blocks.order-list": "*", - "@o2s/blocks.service-details": "*", - "@o2s/blocks.service-list": "*", - "@o2s/blocks.featured-service-list": "*", - "@o2s/blocks.article": "*", - "@o2s/blocks.article-list": "*", - "@o2s/blocks.category-list": "*", - "@o2s/blocks.article-search": "*", - "@o2s/blocks.category": "*", - "@o2s/blocks.notification-details": "*", - "@o2s/blocks.surveyjs-form": "*" + "zod": "^4.1.12" }, "devDependencies": { "@next/bundle-analyzer": "^15.5.6", diff --git a/apps/frontend/src/app/[locale]/layout.tsx b/apps/frontend/src/app/[locale]/layout.tsx index 3776165f..0c1620b3 100644 --- a/apps/frontend/src/app/[locale]/layout.tsx +++ b/apps/frontend/src/app/[locale]/layout.tsx @@ -1,7 +1,9 @@ +import { LivePreview } from '@o2s/configs.integrations/live-preview'; import { SessionProvider } from 'next-auth/react'; import { NextIntlClientProvider } from 'next-intl'; import { getMessages, setRequestLocale } from 'next-intl/server'; import { Inter } from 'next/font/google'; +import { draftMode } from 'next/headers'; import { notFound } from 'next/navigation'; import React from 'react'; @@ -28,6 +30,7 @@ interface Props { export default async function RootLayout({ children, params }: Props) { const session = await auth(); + const { isEnabled: isDraftModeEnabled } = await draftMode(); const { locale } = await params; @@ -40,20 +43,26 @@ export default async function RootLayout({ children, params }: Props) { const messages = await getMessages(); return ( - - - - - - - - - {/*@see https://github.com/nextauthjs/next-auth/issues/9504#issuecomment-2516665386*/} - - - {children} - - - + + + + + + + + + + {/*@see https://github.com/nextauthjs/next-auth/issues/9504#issuecomment-2516665386*/} + + + {children} + + + + ); } diff --git a/apps/frontend/src/app/api/disable-draft/route.ts b/apps/frontend/src/app/api/disable-draft/route.ts new file mode 100644 index 00000000..c47d71cb --- /dev/null +++ b/apps/frontend/src/app/api/disable-draft/route.ts @@ -0,0 +1,6 @@ +import { draftMode } from 'next/headers'; + +export async function GET() { + (await draftMode()).disable(); + return new Response('Draft mode is disabled'); +} diff --git a/apps/frontend/src/app/api/enable-draft/route.ts b/apps/frontend/src/app/api/enable-draft/route.ts new file mode 100644 index 00000000..311be73d --- /dev/null +++ b/apps/frontend/src/app/api/enable-draft/route.ts @@ -0,0 +1,35 @@ +import { draftMode, cookies } from 'next/headers'; +import { redirect } from 'next/navigation'; +import { NextRequest } from 'next/server'; + +export async function GET(request: NextRequest) { + const { searchParams } = new URL(request.url); + const secret = searchParams.get('secret'); + const slug = searchParams.get('slug'); + const locale = searchParams.get('locale'); + + if (!secret || !slug || !locale) { + return new Response('Missing parameters', { status: 400 }); + } + + if (secret !== process.env.CF_PREVIEW_SECRET) { + return new Response('Invalid token', { status: 401 }); + } + + (await draftMode()).enable(); + + // Override cookie header for draft mode for usage in live-preview + // https://github.com/vercel/next.js/issues/49927 + const cookieStore = await cookies(); + const cookie = cookieStore.get('__prerender_bypass')!; + cookieStore.set({ + name: '__prerender_bypass', + value: cookie?.value, + httpOnly: true, + path: '/', + secure: true, + sameSite: 'none', + }); + + redirect(`/${locale}/${slug}`); +} diff --git a/apps/frontend/src/auth/auth.ts b/apps/frontend/src/auth/auth.ts index aa4c4203..82ee952a 100644 --- a/apps/frontend/src/auth/auth.ts +++ b/apps/frontend/src/auth/auth.ts @@ -32,6 +32,76 @@ export const nextAuthResult = NextAuth({ // Handle sign out }, }, + cookies: { + sessionToken: { + name: `authjs.session-token`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + }, + }, + callbackUrl: { + name: `authjs.callback-url`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + }, + }, + csrfToken: { + // Default to __Host- for CSRF token for additional protection if using useSecureCookies + // NB: The `__Host-` prefix is stricter than the `__Secure-` prefix. + name: `authjs.csrf-token`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + }, + }, + pkceCodeVerifier: { + name: `authjs.pkce.code_verifier`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + maxAge: 60 * 15, // 15 minutes in seconds + }, + }, + state: { + name: `authjs.state`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + maxAge: 60 * 15, // 15 minutes in seconds + }, + }, + nonce: { + name: `authjs.nonce`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + }, + }, + webauthnChallenge: { + name: `authjs.challenge`, + options: { + httpOnly: true, + sameSite: 'none', + path: '/', + secure: true, + maxAge: 60 * 15, // 15 minutes in seconds + }, + }, + }, }); export const { handlers, signIn, signOut } = nextAuthResult; diff --git a/apps/frontend/src/blocks/renderBlocks.tsx b/apps/frontend/src/blocks/renderBlocks.tsx index 0976f0ae..a3f6702a 100644 --- a/apps/frontend/src/blocks/renderBlocks.tsx +++ b/apps/frontend/src/blocks/renderBlocks.tsx @@ -25,6 +25,7 @@ import * as TicketList from '@o2s/blocks.ticket-list/frontend'; import * as TickeRecent from '@o2s/blocks.ticket-recent/frontend'; import * as UserAccount from '@o2s/blocks.user-account/frontend'; import { getLocale } from 'next-intl/server'; +import { draftMode } from 'next/headers'; import React from 'react'; import { CMS } from '@o2s/framework/modules'; @@ -46,11 +47,13 @@ interface BlockProps { userId: string | undefined; routing: typeof routing; hasPriority?: boolean; + isDraftModeEnabled?: boolean; } export const renderBlocks = async (blocks: CMS.Model.Page.SlotBlock[], slug: string[]) => { const session = await auth(); const locale = await getLocale(); + const { isEnabled: isDraftModeEnabled } = await draftMode(); return blocks.map((block, index) => { // decides whether the block is above the fold, @@ -65,6 +68,7 @@ export const renderBlocks = async (blocks: CMS.Model.Page.SlotBlock[], slug: str userId: session?.user?.id, routing: routing, hasPriority, + isDraftModeEnabled: isDraftModeEnabled, }; return ( diff --git a/package-lock.json b/package-lock.json index c45e1b4a..28501a78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -332,7 +332,6 @@ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -405,7 +404,6 @@ "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "readdirp": "^4.0.1" }, @@ -777,6 +775,7 @@ "name": "@o2s/frontend", "version": "1.10.0", "dependencies": { + "@contentful/live-preview": "^4.6.52", "@o2s/api-harmonization": "*", "@o2s/blocks.article": "*", "@o2s/blocks.article-list": "*", @@ -1239,7 +1238,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.42.0.tgz", "integrity": "sha512-NZR7yyHj2WzK6D5X8gn+/KOxPdzYEXOqVdSaK/biU8QfYUpUuEA0sCWg/XlO05tPVEcJelF/oLrrNY3UjRbOww==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "5.42.0", "@algolia/requester-browser-xhr": "5.42.0", @@ -4413,7 +4411,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -4688,6 +4685,59 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/@contentful/content-source-maps": { + "version": "0.11.39", + "resolved": "https://registry.npmjs.org/@contentful/content-source-maps/-/content-source-maps-0.11.39.tgz", + "integrity": "sha512-fVhvAubuQRID3NeMJI11NXXMnOaLUDJ+yuqlyfJynfsFfvT2PNmiRzThgumjNuaSP344SceRzZPsonVzxI4qzg==", + "license": "MIT", + "dependencies": { + "@vercel/stega": "^0.1.2", + "json-pointer": "^0.6.2" + } + }, + "node_modules/@contentful/live-preview": { + "version": "4.6.52", + "resolved": "https://registry.npmjs.org/@contentful/live-preview/-/live-preview-4.6.52.tgz", + "integrity": "sha512-TSEyQLJ4BSxW7v90wi9FGoN66QdDTzjtVu/iSOPlwLI8LHK1Of7HGIXgP2QrdmJX1iDe86Enub4pOySWEjnD0g==", + "license": "MIT", + "dependencies": { + "@contentful/content-source-maps": "^0.11.39", + "@contentful/rich-text-types": "^17.0.0", + "flatted": "^3.2.9", + "graphql-tag": "^2.12.6", + "json-pointer": "^0.6.2", + "lodash.isequal": "^4.5.0" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@contentful/rich-text-types": { + "version": "17.2.4", + "resolved": "https://registry.npmjs.org/@contentful/rich-text-types/-/rich-text-types-17.2.4.tgz", + "integrity": "sha512-3y456l+x5aPzqcvjpG6L66sIkfH66rBl1QtGKexgJ3Nvd6k4ORvpAJ6gMDBz3WMAYvXGrVZMyhlFE0e6UdHngA==", + "license": "MIT", + "dependencies": { + "@lingui/core": "^5.4.1", + "is-plain-obj": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@contentful/rich-text-types/node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -4815,7 +4865,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -4838,7 +4887,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -6356,7 +6404,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -6585,7 +6632,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.9.2.tgz", "integrity": "sha512-IGUsArG5hhekXd7RDb11v94ycpJpFdJPkLnt10fFQWOVxAtq5/D7hT6lzc2fhyQKaaCE62qVajOMKL7OiAFAIA==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -6626,7 +6672,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.9.2.tgz", "integrity": "sha512-6c4DAbR6n6nPbnZhY2V3tzpnKnGL+6aOsLvFL26VRqhlczli9eWG0VDUNoCQEPnGwDMhPS42UhSAnz5pThm5Ag==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/mdx-loader": "3.9.2", "@docusaurus/module-type-aliases": "3.9.2", @@ -11587,6 +11632,44 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" }, + "node_modules/@lingui/core": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@lingui/core/-/core-5.5.2.tgz", + "integrity": "sha512-YhKdfXOSEr64mEsPL7DbgGhoXJhI+DSysZHA43K9ZuG322JEql+luvRZpH/NobLBMiM1SjoLVWazEsqIkGuPDQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@lingui/message-utils": "5.5.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@lingui/babel-plugin-lingui-macro": "5.5.2", + "babel-plugin-macros": "2 || 3" + }, + "peerDependenciesMeta": { + "@lingui/babel-plugin-lingui-macro": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/@lingui/message-utils": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@lingui/message-utils/-/message-utils-5.5.2.tgz", + "integrity": "sha512-0/xu0nAzYm4ZLUHAdowkTLcP2iM+UOuFEpIsJ40iOIYgHeub1idtn8EFnliCiN83rfrcMaPK63MgGKmyTI4Umg==", + "license": "MIT", + "dependencies": { + "@messageformat/parser": "^5.0.0", + "js-sha256": "^0.10.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@lukeed/csprng": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", @@ -11797,7 +11880,6 @@ "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "license": "MIT", - "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -11856,6 +11938,15 @@ "langium": "3.3.1" } }, + "node_modules/@messageformat/parser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.1.1.tgz", + "integrity": "sha512-3p0YRGCcTUCYvBKLIxtDDyrJ0YijGIwrTRu1DT8gIviIDZru8H23+FkY6MJBzM1n9n20CiM4VeDYuBsrrwnLjg==", + "license": "MIT", + "dependencies": { + "moo": "^0.5.1" + } + }, "node_modules/@napi-rs/wasm-runtime": { "version": "0.2.12", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", @@ -11873,7 +11964,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-4.0.1.tgz", "integrity": "sha512-68pFJgu+/AZbWkGu65Z3r55bTsCPlgyKaV4BSG8yUAD72q1PPuyVRgUwFv6BxdnibTUHlyxm06FmYWNC+bjN7A==", "license": "MIT", - "peer": true, "peerDependencies": { "@nestjs/common": "^10.0.0 || ^11.0.0", "axios": "^1.3.1", @@ -11885,7 +11975,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.8.tgz", "integrity": "sha512-bbsOqwld/GdBfiRNc4nnjyWWENDEicq4SH+R5AuYatvf++vf1x5JIsHB1i1KtfZMD3eRte0D4K9WXuAYil6XAg==", "license": "MIT", - "peer": true, "dependencies": { "file-type": "21.0.0", "iterare": "1.2.1", @@ -11917,7 +12006,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-4.0.2.tgz", "integrity": "sha512-McMW6EXtpc8+CwTUwFdg6h7dYcBUpH5iUILCclAsa+MbCEvC9ZKu4dCHRlJqALuhjLw97pbQu62l4+wRwGeZqA==", "license": "MIT", - "peer": true, "dependencies": { "dotenv": "16.4.7", "dotenv-expand": "12.0.1", @@ -11961,7 +12049,6 @@ "integrity": "sha512-7riWfmTmMhCJHZ5ZiaG+crj4t85IPCq/wLRuOUSigBYyFT2JZj0lVHtAdf4Davp9ouNI8GINBDt9h9b5Gz9nTw==", "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@nuxt/opencollective": "0.4.1", "fast-safe-stringify": "2.1.1", @@ -12012,7 +12099,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.8.tgz", "integrity": "sha512-rL6pZH9BW7BnL5X2eWbJMtt86uloAKjFgyY5+L2UkizgfEp7rgAs0+Z1z0BcW2Pgu5+q8O7RKPNyHJ/9ZNz/ZQ==", "license": "MIT", - "peer": true, "dependencies": { "cors": "2.8.5", "express": "5.1.0", @@ -13257,6 +13343,10 @@ "resolved": "packages/integrations/algolia", "link": true }, + "node_modules/@o2s/integrations.contentful-cms": { + "resolved": "packages/integrations/contentful-cms", + "link": true + }, "node_modules/@o2s/integrations.medusajs": { "resolved": "packages/integrations/medusajs", "link": true @@ -13381,266 +13471,6 @@ "@noble/hashes": "^1.1.5" } }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", - "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", - "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", - "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", - "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", - "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", - "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", - "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", - "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", - "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", - "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", - "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", - "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", - "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -13720,7 +13550,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -13830,7 +13659,6 @@ "integrity": "sha512-zL58jbLzYamjnNnmNA51IOZdbk5ci03KviXCuB0Tydc9btH2kDWsi1pQm2VecviRTM7jGia0OPPkgpGnT3nKvw==", "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=18.18" }, @@ -16145,7 +15973,6 @@ "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.8.3.tgz", "integrity": "sha512-MZVUE+l7LmMIYlIjubPosruJ9ltSLGFmJqsXApTqPLyHLjsJUSAbAJb/A3N34fEqean4ddiDkdWzNu4ZKPvRUg==", "license": "MIT", - "peer": true, "dependencies": { "cluster-key-slot": "1.1.2" }, @@ -16393,7 +16220,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -17056,7 +16882,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", - "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -17573,6 +17398,7 @@ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -17593,6 +17419,7 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -17606,6 +17433,7 @@ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "dequal": "^2.0.3" } @@ -17616,6 +17444,7 @@ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -17630,7 +17459,8 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@testing-library/jest-dom": { "version": "6.8.0", @@ -18013,7 +17843,8 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -18436,7 +18267,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -18470,7 +18300,6 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "license": "MIT", - "peer": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -18717,7 +18546,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.2.tgz", "integrity": "sha512-/NbVmcGTP+lj5oa4yiYxxeBjRivKQ5Ns1eSZeB99ExsEQ6rX5XYU1Zy/gGxY/ilqtD4Etx9mKyrPxZRetiahhA==", "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.14.0" } @@ -18767,7 +18595,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -18787,7 +18614,6 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.2.tgz", "integrity": "sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==", "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -19192,7 +19018,6 @@ "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.46.2", "@typescript-eslint/types": "8.46.2", @@ -19725,6 +19550,12 @@ } } }, + "node_modules/@vercel/stega": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@vercel/stega/-/stega-0.1.2.tgz", + "integrity": "sha512-P7mafQXjkrsoyTRppnt0N21udKS9wUmLXHRyP9saLXLHw32j/FgUJ3FscSWgvSqRs4cj7wKZtwqJEvWJ2jbGmA==", + "license": "MPL-2.0" + }, "node_modules/@vitest/expect": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", @@ -20046,7 +19877,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -20132,7 +19962,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -20193,7 +20022,6 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.42.0.tgz", "integrity": "sha512-X5+PtWc9EJIPafT/cj8ZG+6IU3cjRRnlHGtqMHK/9gsiupQbAyYlH5y7qt/FtsAhfX5AICHffZy69ZAsVrxWkQ==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/abtesting": "1.8.0", "@algolia/client-abtesting": "5.42.0", @@ -20748,7 +20576,6 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.1.tgz", "integrity": "sha512-hU4EGxxt+j7TQijx1oYdAjw4xuIp1wRQSsbMFwSthCWeBQur1eF+qJ5iQ5sN3Tw8YRzQNKb8jszgBdMDVqwJcw==", "license": "MIT", - "peer": true, "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", @@ -20808,7 +20635,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -21630,7 +21456,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.9", "caniuse-lite": "^1.0.30001746", @@ -22395,7 +22220,6 @@ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.0.3", "@chevrotain/gast": "11.0.3", @@ -23374,7 +23198,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -23820,7 +23643,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -24100,7 +23922,6 @@ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10" } @@ -24515,7 +24336,6 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", - "peer": true, "engines": { "node": ">=12" } @@ -24714,8 +24534,7 @@ "version": "1.11.19", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/debounce": { "version": "1.2.1", @@ -25235,7 +25054,8 @@ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/dom-converter": { "version": "0.2.0", @@ -25637,7 +25457,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "peer": true, "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -25910,7 +25729,6 @@ "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", "dev": true, "hasInstallScript": true, - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -25951,7 +25769,6 @@ "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "debug": "^4.3.4" }, @@ -26019,7 +25836,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -26117,7 +25933,6 @@ "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -26228,7 +26043,6 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.8", @@ -27632,6 +27446,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "license": "MIT" + }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -28399,7 +28219,6 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.11.0.tgz", "integrity": "sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==", "license": "MIT", - "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -28449,7 +28268,6 @@ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-7.3.1.tgz", "integrity": "sha512-GdinBsBVYrWzwEvOlzadrV5j8mdOc9ZT8In9QyRIZaxbhkTL08j35yNbPp96jAacYzjeD/hKKy2E2RGI7c7Yug==", "license": "MIT", - "peer": true, "dependencies": { "@graphql-typed-document-node/core": "^3.2.0" }, @@ -28461,7 +28279,6 @@ "version": "2.12.6", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", - "peer": true, "dependencies": { "tslib": "^2.1.0" }, @@ -32695,6 +32512,12 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/js-sha256": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.10.1.tgz", + "integrity": "sha512-5obBtsz9301ULlsgggLg542s/jqtddfOpV5KJc4hajc9JV8GeY2gZHSVpYBn4nWqAUTJ9v+xwtbJ1mIBgIH5Vw==", + "license": "MIT" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -32738,6 +32561,15 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -32829,7 +32661,6 @@ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "license": "MIT", - "peer": true, "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -33564,6 +33395,13 @@ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "license": "MIT" + }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", @@ -33955,6 +33793,7 @@ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "license": "MIT", + "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -36412,7 +36251,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -36545,6 +36383,12 @@ "pathe": "^2.0.1" } }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "license": "BSD-3-Clause" + }, "node_modules/motion-dom": { "version": "12.23.23", "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.23.tgz", @@ -36710,7 +36554,6 @@ "resolved": "https://registry.npmjs.org/next/-/next-15.5.6.tgz", "integrity": "sha512-zTxsnI3LQo3c9HSdSf91O1jMNsEzIXDShXd4wVdg9y5shwLqBXi4ZtUUJyB86KGVSJLZx0PFONvO54aheGX8QQ==", "license": "MIT", - "peer": true, "dependencies": { "@next/env": "15.5.6", "@swc/helpers": "0.5.15", @@ -36763,7 +36606,6 @@ "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.29.tgz", "integrity": "sha512-Ukpnuk3NMc/LiOl32njZPySk7pABEzbjhMUFd5/n10I0ZNC7NCuVv8IY2JgbDek2t/PUOifQEoUiOOTLy4os5A==", "license": "ISC", - "peer": true, "dependencies": { "@auth/core": "0.40.0" }, @@ -36802,7 +36644,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "^0.5.4", "negotiator": "^1.0.0", @@ -36877,13 +36718,6 @@ "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", "dev": true }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT", - "optional": true - }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -38363,7 +38197,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -39605,7 +39438,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -39695,7 +39527,6 @@ "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz", "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==", "license": "MIT", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -39725,7 +39556,6 @@ "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -39839,7 +39669,6 @@ "integrity": "sha512-ac6h0sM1Tg3zu8NInY+qhP/S9KhENVaw9n1BrGKQVFu05JT5yT5Qqqmb8tMRIE3ZXvVj4xcRA5yfrsy4X7Yy5g==", "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@prisma/config": "6.17.1", "@prisma/engines": "6.17.1" @@ -40204,7 +40033,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -40283,7 +40111,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -40359,7 +40186,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", - "peer": true, "dependencies": { "@types/react": "*" }, @@ -40388,7 +40214,6 @@ "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -40442,7 +40267,6 @@ "version": "5.3.4", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", - "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -40834,8 +40658,7 @@ "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", - "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", - "peer": true + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", @@ -41609,7 +41432,6 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "tslib": "^2.1.0" } @@ -41706,7 +41528,6 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.93.2.tgz", "integrity": "sha512-t+YPtOQHpGW1QWsh1CHQ5cPIr9lbbGZLZnbihP/D/qZj/yuV68m8qarcV17nvkOX81BCrvzAlq2klCQFZghyTg==", "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -42916,7 +42737,6 @@ "integrity": "sha512-339U14K6l46EFyRvaPS2ZlL7v7Pb+LlcXT8KAETrGPxq8v1sAjj2HAOB6zrlAK3M+0+ricssfAwsLCwt7Eg8TQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@storybook/global": "^5.0.0", "@testing-library/jest-dom": "^6.6.3", @@ -43484,8 +43304,7 @@ "version": "2.3.13", "resolved": "https://registry.npmjs.org/survey-core/-/survey-core-2.3.13.tgz", "integrity": "sha512-0sWWkgu2zsG8QSNOYG6QcGiGSX/O7hhOLcf0iXASaUiJxhFQ+O+iDDYCBflmSA7QPYZjFT4LobUCGKYnDqvZdw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/survey-react-ui": { "version": "2.3.13", @@ -43768,8 +43587,7 @@ "version": "4.1.16", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.16.tgz", "integrity": "sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/tailwindcss-animate": { "version": "1.0.7", @@ -43854,7 +43672,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -44402,7 +44219,6 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -44528,8 +44344,7 @@ "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "peer": true + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsx": { "version": "4.20.6", @@ -44564,7 +44379,6 @@ "integrity": "sha512-5c9Fdsr9qfpT3hA0EyYSFRZj1dVVsb6KIWubA9JBYZ/9ZEAijgUEae0BBR/Xl/wekt4w65/lYLTFaP3JmwSO8w==", "dev": true, "license": "MIT", - "peer": true, "bin": { "turbo": "bin/turbo" }, @@ -44697,7 +44511,6 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "peer": true, "engines": { "node": ">=10" }, @@ -44813,7 +44626,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -45966,7 +45778,6 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.100.2.tgz", "integrity": "sha512-QaNKAvGCDRh3wW1dsDjeMdDXwZm2vqq3zn6Pvq4rHOEOGSaUMgOOjG2Y9ZbIGzpfkJk9ZYTHpDqgDfeBDcnLaw==", "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -46092,7 +45903,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46253,7 +46063,6 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46363,7 +46172,6 @@ "integrity": "sha512-khZGfAeJx6I8K9zKohEWWYN6KDlVw2DHownoe+6Vtwj1LP9WFgegXnVMSkZ/dBEBtXFwrkkydsaPFlB7f8wU2A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", @@ -46413,7 +46221,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46877,7 +46684,6 @@ "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "peer": true, "engines": { "node": ">=8.3.0" }, @@ -47091,7 +46897,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -54569,6 +54374,56 @@ "node": "*" } }, + "packages/integrations/contentful-cms": { + "name": "@o2s/integrations.contentful-cms", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@contentful/live-preview": "^4.6.52", + "@o2s/framework": "*", + "@o2s/utils.logger": "*", + "flatted": "^3.3.3", + "graphql": "16.11.0", + "graphql-request": "7.3.0", + "graphql-tag": "2.12.6" + }, + "devDependencies": { + "@graphql-codegen/add": "^5.0.3", + "@graphql-codegen/cli": "^5.0.7", + "@graphql-codegen/introspection": "^4.0.3", + "@graphql-codegen/typescript": "^4.1.6", + "@graphql-codegen/typescript-graphql-request": "^6.3.0", + "@graphql-codegen/typescript-operations": "^4.6.1", + "@graphql-codegen/typescript-resolvers": "^4.5.2", + "@o2s/eslint-config": "*", + "@o2s/prettier-config": "*", + "@o2s/typescript-config": "*", + "concurrently": "^9.1.2", + "eslint": "^8.57.0", + "prettier": "^3.5.3", + "tsc-alias": "^1.8.13", + "typescript": "^5.8.2" + }, + "peerDependencies": { + "@nestjs/axios": "^4.0.1", + "@nestjs/common": "^11.0.16", + "@nestjs/config": "^4.0.2", + "@nestjs/core": "^11", + "rxjs": "^7" + } + }, + "packages/integrations/contentful-cms/node_modules/graphql-request": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-7.3.0.tgz", + "integrity": "sha512-cxmQfa/ZknSNtuJpgPpr4CQTwPjSP57EYzOyNoyhPakXqr1yvTtOXNFbxQYaz4DMQ801i2DjnwUkifGLjtXhSQ==", + "license": "MIT", + "dependencies": { + "@graphql-typed-document-node/core": "^3.2.0" + }, + "peerDependencies": { + "graphql": "14 - 16" + } + }, "packages/integrations/medusajs": { "name": "@o2s/integrations.medusajs", "version": "1.6.0", diff --git a/packages/blocks/faq/src/api-harmonization/faq.mapper.ts b/packages/blocks/faq/src/api-harmonization/faq.mapper.ts index 65f088fb..8271f4df 100644 --- a/packages/blocks/faq/src/api-harmonization/faq.mapper.ts +++ b/packages/blocks/faq/src/api-harmonization/faq.mapper.ts @@ -10,5 +10,6 @@ export const mapFaq = (cms: CMS.Model.FaqBlock.FaqBlock): FaqBlock => { subtitle: cms.subtitle, items: cms.items, banner: cms.banner, + meta: cms.meta, }; }; diff --git a/packages/blocks/faq/src/api-harmonization/faq.model.ts b/packages/blocks/faq/src/api-harmonization/faq.model.ts index fa6140c7..b20fb914 100644 --- a/packages/blocks/faq/src/api-harmonization/faq.model.ts +++ b/packages/blocks/faq/src/api-harmonization/faq.model.ts @@ -8,4 +8,5 @@ export class FaqBlock extends Models.Block.Block { subtitle?: CMS.Model.FaqBlock.FaqBlock['subtitle']; items!: CMS.Model.FaqBlock.FaqBlock['items']; banner?: CMS.Model.FaqBlock.FaqBoxWithButton; + meta?: CMS.Model.FaqBlock.FaqBlock['meta']; } diff --git a/packages/blocks/faq/src/api-harmonization/faq.request.ts b/packages/blocks/faq/src/api-harmonization/faq.request.ts index eced3a66..e419ec72 100644 --- a/packages/blocks/faq/src/api-harmonization/faq.request.ts +++ b/packages/blocks/faq/src/api-harmonization/faq.request.ts @@ -2,4 +2,5 @@ import { CMS } from '@o2s/framework/modules'; export class GetFaqBlockQuery implements Omit { id!: string; + preview?: boolean; } diff --git a/packages/blocks/faq/src/frontend/Faq.client.tsx b/packages/blocks/faq/src/frontend/Faq.client.tsx index fef4147c..c057509a 100644 --- a/packages/blocks/faq/src/frontend/Faq.client.tsx +++ b/packages/blocks/faq/src/frontend/Faq.client.tsx @@ -1,5 +1,6 @@ 'use client'; +import { LivePreview } from '@o2s/configs.integrations/live-preview'; import { createNavigation } from 'next-intl/navigation'; import React from 'react'; @@ -15,7 +16,7 @@ import { FaqPureProps } from './Faq.types'; export const FaqPure: React.FC = ({ locale, accessToken, routing, ...component }) => { const { Link: LinkComponent } = createNavigation(routing); - const { title, subtitle, items, banner } = component; + const { title, subtitle, items, banner, meta } = component; return ( @@ -23,11 +24,15 @@ export const FaqPure: React.FC = ({ locale, accessToken, routing, {title && (
-

{title}

+

{title}

{subtitle && ( - + {subtitle} )} @@ -36,9 +41,15 @@ export const FaqPure: React.FC = ({ locale, accessToken, routing, {items.map((item, index) => ( - {item.title} + + {item.title} + - + ))} @@ -50,13 +61,24 @@ export const FaqPure: React.FC = ({ locale, accessToken, routing,
-

{banner?.title}

+

+ {banner?.title} +

- +
{banner?.button && ( )}
diff --git a/packages/blocks/faq/src/frontend/Faq.renderer.tsx b/packages/blocks/faq/src/frontend/Faq.renderer.tsx index b20c44e9..b9e3677c 100644 --- a/packages/blocks/faq/src/frontend/Faq.renderer.tsx +++ b/packages/blocks/faq/src/frontend/Faq.renderer.tsx @@ -7,7 +7,13 @@ import { Loading } from '@o2s/ui/components/Loading'; import { Faq } from './Faq.server'; import { FaqRendererProps } from './Faq.types'; -export const FaqRenderer: React.FC = ({ id, accessToken, routing, hasPriority }) => { +export const FaqRenderer: React.FC = ({ + id, + accessToken, + routing, + hasPriority, + isDraftModeEnabled, +}) => { const locale = useLocale(); return ( @@ -19,7 +25,14 @@ export const FaqRenderer: React.FC = ({ id, accessToken, routi } > - + ); }; diff --git a/packages/blocks/faq/src/frontend/Faq.server.tsx b/packages/blocks/faq/src/frontend/Faq.server.tsx index 85344037..e8aaf5af 100644 --- a/packages/blocks/faq/src/frontend/Faq.server.tsx +++ b/packages/blocks/faq/src/frontend/Faq.server.tsx @@ -7,11 +7,19 @@ import { FaqProps } from './Faq.types'; export const FaqDynamic = dynamic(() => import('./Faq.client').then((module) => module.FaqPure)); -export const Faq: React.FC = async ({ id, accessToken, locale, routing, hasPriority }) => { +export const Faq: React.FC = async ({ + id, + accessToken, + locale, + routing, + hasPriority, + isDraftModeEnabled, +}) => { try { const data = await sdk.blocks.getFaq( { id, + preview: isDraftModeEnabled, }, { 'x-locale': locale }, accessToken, diff --git a/packages/blocks/faq/src/frontend/Faq.types.ts b/packages/blocks/faq/src/frontend/Faq.types.ts index c1df6e86..6a80a553 100644 --- a/packages/blocks/faq/src/frontend/Faq.types.ts +++ b/packages/blocks/faq/src/frontend/Faq.types.ts @@ -8,6 +8,7 @@ export interface FaqProps { locale: string; routing: ReturnType; hasPriority?: boolean; + isDraftModeEnabled?: boolean; } export type FaqPureProps = FaqProps & Model.FaqBlock; diff --git a/packages/blocks/ticket-list/src/api-harmonization/ticket-list.mapper.ts b/packages/blocks/ticket-list/src/api-harmonization/ticket-list.mapper.ts index 066ef72c..f5235e08 100644 --- a/packages/blocks/ticket-list/src/api-harmonization/ticket-list.mapper.ts +++ b/packages/blocks/ticket-list/src/api-harmonization/ticket-list.mapper.ts @@ -26,6 +26,7 @@ export const mapTicketList = ( }, forms: cms.forms, labels: cms.labels, + meta: cms.meta, }; }; diff --git a/packages/blocks/ticket-list/src/api-harmonization/ticket-list.model.ts b/packages/blocks/ticket-list/src/api-harmonization/ticket-list.model.ts index a73fc03b..5c9608aa 100644 --- a/packages/blocks/ticket-list/src/api-harmonization/ticket-list.model.ts +++ b/packages/blocks/ticket-list/src/api-harmonization/ticket-list.model.ts @@ -1,4 +1,4 @@ -import { Tickets } from '@o2s/configs.integrations'; +import { CMS, Tickets } from '@o2s/configs.integrations'; import { Models as ApiModels } from '@o2s/utils.api-harmonization'; @@ -24,6 +24,7 @@ export class TicketListBlock extends ApiModels.Block.Block { showMore: string; clickToSelect: string; }; + meta?: CMS.Model.TicketListBlock.TicketListBlock['meta']; } export class Ticket { diff --git a/packages/blocks/ticket-list/src/api-harmonization/ticket-list.request.ts b/packages/blocks/ticket-list/src/api-harmonization/ticket-list.request.ts index efdf6392..0546a952 100644 --- a/packages/blocks/ticket-list/src/api-harmonization/ticket-list.request.ts +++ b/packages/blocks/ticket-list/src/api-harmonization/ticket-list.request.ts @@ -6,4 +6,5 @@ export class GetTicketListBlockQuery id!: string; offset?: number; limit?: number; + preview?: boolean; } diff --git a/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx b/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx index 2d4ac3b9..fead47c3 100644 --- a/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx +++ b/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx @@ -1,5 +1,6 @@ 'use client'; +import { LivePreview } from '@o2s/configs.integrations/live-preview'; import { ArrowRight } from 'lucide-react'; import { createNavigation } from 'next-intl/navigation'; import React, { useState, useTransition } from 'react'; @@ -7,8 +8,8 @@ import React, { useState, useTransition } from 'react'; import { Mappings } from '@o2s/utils.frontend'; import { ActionList } from '@o2s/ui/components/ActionList'; -import { DataList } from '@o2s/ui/components/DataList'; import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; +import { DataList } from '@o2s/ui/components/DataList'; import { DynamicIcon } from '@o2s/ui/components/DynamicIcon'; import { FiltersSection } from '@o2s/ui/components/Filters'; import { NoResults } from '@o2s/ui/components/NoResults'; @@ -24,7 +25,7 @@ import { sdk } from '../sdk'; import { TicketListPureProps } from './TicketList.types'; -export const TicketListPure: React.FC = ({ locale, accessToken, routing, ...component }) => { +export const TicketListPure: React.FC = ({ locale, accessToken, routing, meta, ...component }) => { const { Link: LinkComponent } = createNavigation(routing); const initialFilters: Request.GetTicketListBlockQuery = { @@ -107,7 +108,7 @@ export const TicketListPure: React.FC = ({ locale, accessTo
-

{data.title}

+

{data.title}

{data.forms && ( diff --git a/packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx b/packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx index cd3dd19c..1c2253fd 100644 --- a/packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx +++ b/packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx @@ -6,7 +6,13 @@ import { Loading } from '@o2s/ui/components/Loading'; import { TicketListServer } from './TicketList.server'; import { TicketListRendererProps } from './TicketList.types'; -export const TicketListRenderer: React.FC = ({ id, accessToken, routing, hasPriority }) => { +export const TicketListRenderer: React.FC = ({ + id, + accessToken, + routing, + hasPriority, + isDraftModeEnabled, +}) => { const locale = useLocale(); return ( @@ -25,6 +31,7 @@ export const TicketListRenderer: React.FC = ({ id, acce locale={locale} routing={routing} hasPriority={hasPriority} + isDraftModeEnabled={isDraftModeEnabled} /> ); diff --git a/packages/blocks/ticket-list/src/frontend/TicketList.server.tsx b/packages/blocks/ticket-list/src/frontend/TicketList.server.tsx index 0c8287a9..8998128f 100644 --- a/packages/blocks/ticket-list/src/frontend/TicketList.server.tsx +++ b/packages/blocks/ticket-list/src/frontend/TicketList.server.tsx @@ -13,11 +13,13 @@ export const TicketListServer: React.FC = async ({ locale, routing, hasPriority, + isDraftModeEnabled, }) => { try { const data = await sdk.blocks.getTicketList( { id, + preview: isDraftModeEnabled, }, { 'x-locale': locale }, accessToken, diff --git a/packages/blocks/ticket-list/src/frontend/TicketList.types.ts b/packages/blocks/ticket-list/src/frontend/TicketList.types.ts index 18385b50..62c2a7c1 100644 --- a/packages/blocks/ticket-list/src/frontend/TicketList.types.ts +++ b/packages/blocks/ticket-list/src/frontend/TicketList.types.ts @@ -8,6 +8,7 @@ export interface TicketListProps { locale: string; routing: ReturnType; hasPriority?: boolean; + isDraftModeEnabled?: boolean; } export type TicketListPureProps = TicketListProps & Model.TicketListBlock; diff --git a/packages/configs/integrations/package.json b/packages/configs/integrations/package.json index 92dd3056..2aa808a6 100644 --- a/packages/configs/integrations/package.json +++ b/packages/configs/integrations/package.json @@ -4,7 +4,8 @@ "private": true, "license": "MIT", "exports": { - ".": "./dist/src/models/index.js" + ".": "./dist/src/models/index.js", + "./live-preview": "./dist/src/models/live-preview.js" }, "files": [ "dist" diff --git a/packages/configs/integrations/src/models/cms.ts b/packages/configs/integrations/src/models/cms.ts index 0051b2e5..2119e3a4 100644 --- a/packages/configs/integrations/src/models/cms.ts +++ b/packages/configs/integrations/src/models/cms.ts @@ -1,4 +1,4 @@ -import { Config, Integration } from '@o2s/integrations.mocked/integration'; +import { Config, Integration } from '@o2s/integrations.contentful-cms/integration'; import { ApiConfig } from '@o2s/framework/modules'; diff --git a/packages/configs/integrations/src/models/live-preview.ts b/packages/configs/integrations/src/models/live-preview.ts new file mode 100644 index 00000000..f9332d50 --- /dev/null +++ b/packages/configs/integrations/src/models/live-preview.ts @@ -0,0 +1 @@ +export * as LivePreview from '@o2s/integrations.contentful-cms/live-preview'; diff --git a/packages/framework/src/modules/cms/cms.request.ts b/packages/framework/src/modules/cms/cms.request.ts index 8182b470..654294c3 100644 --- a/packages/framework/src/modules/cms/cms.request.ts +++ b/packages/framework/src/modules/cms/cms.request.ts @@ -1,9 +1,13 @@ -export class GetCmsEntryParams { +export class GetCmsParams { + preview?: boolean; +} + +export class GetCmsEntryParams extends GetCmsParams { id!: string; locale!: string; } -export class GetCmsEntriesParams { +export class GetCmsEntriesParams extends GetCmsParams { locale!: string; type!: string; filters?: { @@ -11,45 +15,45 @@ export class GetCmsEntriesParams { }; } -export class GetCmsPageParams { +export class GetCmsPageParams extends GetCmsParams { slug!: string; locale!: string; } -export class GetCmsPagesParams { +export class GetCmsPagesParams extends GetCmsParams { locale!: string; } -export class GetCmsAlternativePagesParams { +export class GetCmsAlternativePagesParams extends GetCmsParams { id!: string; slug!: string; locale!: string; } -export class GetCmsLoginPageParams { +export class GetCmsLoginPageParams extends GetCmsParams { locale!: string; } -export class GetCmsNotFoundPageParams { +export class GetCmsNotFoundPageParams extends GetCmsParams { locale!: string; } -export class GetCmsHeaderParams { +export class GetCmsHeaderParams extends GetCmsParams { id!: string; locale!: string; } -export class GetCmsFooterParams { +export class GetCmsFooterParams extends GetCmsParams { id!: string; locale!: string; } -export class GetCmsAppConfigParams { +export class GetCmsAppConfigParams extends GetCmsParams { referrer?: string; locale!: string; } -export class GetCmsOrganizationListParams { +export class GetCmsOrganizationListParams extends GetCmsParams { locale!: string; } -export class GetCmsSurveyParams { +export class GetCmsSurveyParams extends GetCmsParams { code!: string; } diff --git a/packages/framework/src/modules/cms/models/blocks/faq.model.ts b/packages/framework/src/modules/cms/models/blocks/faq.model.ts index 8fcd816b..84979546 100644 --- a/packages/framework/src/modules/cms/models/blocks/faq.model.ts +++ b/packages/framework/src/modules/cms/models/blocks/faq.model.ts @@ -1,6 +1,6 @@ import { Block, Link, RichText } from '@/utils/models'; -export class FaqBlock extends Block.Block { +export class FaqBlock extends Block.Block { title?: string; subtitle?: string; items?: FaqItem[]; @@ -17,3 +17,20 @@ export class FaqBoxWithButton { description?: RichText.RichText; button?: Link.Link; } + +export class Meta { + __id!: string; + title!: string; + subtitle!: string; + items?: { + __id: string; + title: string; + content: string; + }[]; + banner?: { + __id: string; + title: string; + description: string; + button: string; + }; +} diff --git a/packages/framework/src/modules/cms/models/blocks/ticket-list.model.ts b/packages/framework/src/modules/cms/models/blocks/ticket-list.model.ts index 35029385..fc2d3b95 100644 --- a/packages/framework/src/modules/cms/models/blocks/ticket-list.model.ts +++ b/packages/framework/src/modules/cms/models/blocks/ticket-list.model.ts @@ -3,7 +3,7 @@ import { Ticket } from '@/modules/tickets/tickets.model'; import { Block, DataTable, Filters, Mapping, Pagination } from '@/utils/models'; import { Link } from '@/utils/models/link'; -export class TicketListBlock extends Block.Block { +export class TicketListBlock extends Block.Block { title?: string; subtitle?: string; table!: DataTable.DataTable; @@ -23,3 +23,27 @@ export class TicketListBlock extends Block.Block { detailsUrl!: string; forms?: Link[]; } + +export class Meta { + __id!: string; + title!: string; + subtitle!: string; + table!: DataTable.DataTableMeta; + fieldMapping!: Mapping.MappingMeta; + // pagination!: string; + // filters!: string; + noResults!: { + __id: string; + title: string; + description: string; + }; + labels!: { + __id: string; + today: string; + yesterday: string; + showMore: string; + clickToSelect: string; + }; + detailsUrl!: string; + // forms!: string; +} diff --git a/packages/framework/src/utils/models/block.ts b/packages/framework/src/utils/models/block.ts index 95a73141..426ea534 100644 --- a/packages/framework/src/utils/models/block.ts +++ b/packages/framework/src/utils/models/block.ts @@ -1,3 +1,4 @@ -export class Block { +export class Block { id!: string; + meta?: T; } diff --git a/packages/framework/src/utils/models/data-table.ts b/packages/framework/src/utils/models/data-table.ts index edf05c72..24dc1e71 100644 --- a/packages/framework/src/utils/models/data-table.ts +++ b/packages/framework/src/utils/models/data-table.ts @@ -12,3 +12,17 @@ export class DataTableActions { title!: string; label?: string; } + +export class DataTableMeta { + __id!: string; + columns!: { + __id: string; + id: string; + title: string; + }[]; + actions?: { + __id: string; + title: string; + label: string; + }; +} diff --git a/packages/framework/src/utils/models/mapping.ts b/packages/framework/src/utils/models/mapping.ts index e7526310..5f19e90e 100644 --- a/packages/framework/src/utils/models/mapping.ts +++ b/packages/framework/src/utils/models/mapping.ts @@ -3,3 +3,14 @@ export type Mapping = { [key: string]: string; }; }; + +export type MappingMeta = { + [key in keyof T]?: { + [key: string]: { + __id: string; + value: string; + }; + } & { + __id: string; + }; +}; diff --git a/packages/integrations/contentful-cms/.gitignore b/packages/integrations/contentful-cms/.gitignore new file mode 100644 index 00000000..dee1fd82 --- /dev/null +++ b/packages/integrations/contentful-cms/.gitignore @@ -0,0 +1,57 @@ + +# compiled output +/dist +/node_modules +/build +/graphql.schema.json + +# Logs +logs +*.log +npm-debug.log* +pnpm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# OS +.DS_Store + +# Tests +/coverage +/.nyc_output + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local + +# temp directory +.temp +.tmp + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/packages/integrations/contentful-cms/.prettierrc.mjs b/packages/integrations/contentful-cms/.prettierrc.mjs new file mode 100644 index 00000000..4280c046 --- /dev/null +++ b/packages/integrations/contentful-cms/.prettierrc.mjs @@ -0,0 +1,11 @@ +import apiConfig from '@o2s/prettier-config/api.mjs'; + +/** + * @see https://prettier.io/docs/en/configuration.html + * @type {import("prettier").Config} + */ +const config = { + ...apiConfig, +}; + +export default config; diff --git a/packages/integrations/contentful-cms/CHANGELOG.md b/packages/integrations/contentful-cms/CHANGELOG.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/integrations/contentful-cms/codegen.ts b/packages/integrations/contentful-cms/codegen.ts new file mode 100644 index 00000000..dc6894d3 --- /dev/null +++ b/packages/integrations/contentful-cms/codegen.ts @@ -0,0 +1,38 @@ +import { CodegenConfig } from '@graphql-codegen/cli'; + +if (!process.env.CF_SPACE_ID || !process.env.CF_ENV || !process.env.CF_TOKEN) { + throw new Error('CF_SPACE_ID, CF_ENV, CF_TOKEN environment variables are not set'); +} + +const config: CodegenConfig = { + overwrite: true, + schema: `https://graphql.contentful.com/content/v1/spaces/${process.env.CF_SPACE_ID}/environments/${process.env.CF_ENV}?access_token=${process.env.CF_TOKEN}`, + documents: './src/**/*.graphql', + verbose: true, + generates: { + 'generated/contentful.ts': { + plugins: [ + 'typescript', + 'typescript-resolvers', + 'typescript-operations', + 'typescript-graphql-request', + { + add: { + content: '/* eslint-disable */', + }, + }, + ], + config: { + skipTypename: true, + rawRequest: true, + maybeValue: 'T', + avoidOptionals: false, + }, + }, + './graphql.schema.json': { + plugins: ['introspection'], + }, + }, +}; + +export default config; diff --git a/packages/integrations/contentful-cms/eslint.config.mjs b/packages/integrations/contentful-cms/eslint.config.mjs new file mode 100644 index 00000000..93b00e9d --- /dev/null +++ b/packages/integrations/contentful-cms/eslint.config.mjs @@ -0,0 +1,4 @@ +import { config } from '@o2s/eslint-config/api'; + +/** @type {import("eslint").Linter.Config} */ +export default config; diff --git a/packages/integrations/contentful-cms/generated/contentful.ts b/packages/integrations/contentful-cms/generated/contentful.ts new file mode 100644 index 00000000..56a0a6d0 --- /dev/null +++ b/packages/integrations/contentful-cms/generated/contentful.ts @@ -0,0 +1,6566 @@ +/* eslint-disable */ +import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; +import { GraphQLError, print } from 'graphql'; +import { GraphQLClient, RequestOptions } from 'graphql-request'; +import gql from 'graphql-tag'; + +export type Maybe = T; +export type InputMaybe = T; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +export type Omit = Pick>; +export type RequireFields = Omit & { [P in K]-?: NonNullable }; +type GraphQLClientRequestHeaders = RequestOptions['requestHeaders']; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + DateTime: { input: any; output: any }; + Dimension: { input: any; output: any }; + HexColor: { input: any; output: any }; + JSON: { input: any; output: any }; + Quality: { input: any; output: any }; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type Asset = { + contentType?: Maybe; + contentfulMetadata: ContentfulMetadata; + description?: Maybe; + fileName?: Maybe; + height?: Maybe; + linkedFrom?: Maybe; + size?: Maybe; + sys: Sys; + title?: Maybe; + url?: Maybe; + width?: Maybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetContentTypeArgs = { + locale?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetDescriptionArgs = { + locale?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetFileNameArgs = { + locale?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetHeightArgs = { + locale?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetSizeArgs = { + locale?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetTitleArgs = { + locale?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetUrlArgs = { + locale?: InputMaybe; + transform?: InputMaybe; +}; + +/** Represents a binary file in a space. An asset can be any file type. */ +export type AssetWidthArgs = { + locale?: InputMaybe; +}; + +export type AssetCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type AssetFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentType?: InputMaybe; + contentType_contains?: InputMaybe; + contentType_exists?: InputMaybe; + contentType_in?: InputMaybe>>; + contentType_not?: InputMaybe; + contentType_not_contains?: InputMaybe; + contentType_not_in?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + fileName?: InputMaybe; + fileName_contains?: InputMaybe; + fileName_exists?: InputMaybe; + fileName_in?: InputMaybe>>; + fileName_not?: InputMaybe; + fileName_not_contains?: InputMaybe; + fileName_not_in?: InputMaybe>>; + height?: InputMaybe; + height_exists?: InputMaybe; + height_gt?: InputMaybe; + height_gte?: InputMaybe; + height_in?: InputMaybe>>; + height_lt?: InputMaybe; + height_lte?: InputMaybe; + height_not?: InputMaybe; + height_not_in?: InputMaybe>>; + size?: InputMaybe; + size_exists?: InputMaybe; + size_gt?: InputMaybe; + size_gte?: InputMaybe; + size_in?: InputMaybe>>; + size_lt?: InputMaybe; + size_lte?: InputMaybe; + size_not?: InputMaybe; + size_not_in?: InputMaybe>>; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; + url?: InputMaybe; + url_contains?: InputMaybe; + url_exists?: InputMaybe; + url_in?: InputMaybe>>; + url_not?: InputMaybe; + url_not_contains?: InputMaybe; + url_not_in?: InputMaybe>>; + width?: InputMaybe; + width_exists?: InputMaybe; + width_gt?: InputMaybe; + width_gte?: InputMaybe; + width_in?: InputMaybe>>; + width_lt?: InputMaybe; + width_lte?: InputMaybe; + width_not?: InputMaybe; + width_not_in?: InputMaybe>>; +}; + +export type AssetLinkingCollections = { + entryCollection?: Maybe; +}; + +export type AssetLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum AssetOrder { + ContentTypeAsc = 'contentType_ASC', + ContentTypeDesc = 'contentType_DESC', + FileNameAsc = 'fileName_ASC', + FileNameDesc = 'fileName_DESC', + HeightAsc = 'height_ASC', + HeightDesc = 'height_DESC', + SizeAsc = 'size_ASC', + SizeDesc = 'size_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + UrlAsc = 'url_ASC', + UrlDesc = 'url_DESC', + WidthAsc = 'width_ASC', + WidthDesc = 'width_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/block) */ +export type Block = Entry & + _Node & { + _id: Scalars['ID']['output']; + content?: Maybe; + contentfulMetadata: ContentfulMetadata; + linkedFrom?: Maybe; + name?: Maybe; + spacing?: Maybe; + sys: Sys; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/block) */ +export type BlockContentArgs = { + locale?: InputMaybe; + preview?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/block) */ +export type BlockLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/block) */ +export type BlockNameArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/block) */ +export type BlockSpacingArgs = { + locale?: InputMaybe; +}; + +export type BlockCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type BlockContent = BlockFaq | BlockTicketList; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockFaq) */ +export type BlockFaq = Entry & + _Node & { + _id: Scalars['ID']['output']; + banner?: Maybe; + contentfulMetadata: ContentfulMetadata; + itemsCollection?: Maybe; + linkedFrom?: Maybe; + subtitle?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockFaq) */ +export type BlockFaqBannerArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockFaq) */ +export type BlockFaqItemsCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockFaq) */ +export type BlockFaqLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockFaq) */ +export type BlockFaqSubtitleArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockFaq) */ +export type BlockFaqTitleArgs = { + locale?: InputMaybe; +}; + +export type BlockFaqCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type BlockFaqFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + banner?: InputMaybe; + banner_exists?: InputMaybe; + contentfulMetadata?: InputMaybe; + items?: InputMaybe; + itemsCollection_exists?: InputMaybe; + subtitle?: InputMaybe; + subtitle_contains?: InputMaybe; + subtitle_exists?: InputMaybe; + subtitle_in?: InputMaybe>>; + subtitle_not?: InputMaybe; + subtitle_not_contains?: InputMaybe; + subtitle_not_in?: InputMaybe>>; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type BlockFaqItemsCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export enum BlockFaqItemsCollectionOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export type BlockFaqLinkingCollections = { + blockCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type BlockFaqLinkingCollectionsBlockCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type BlockFaqLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum BlockFaqLinkingCollectionsBlockCollectionOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SpacingAsc = 'spacing_ASC', + SpacingDesc = 'spacing_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum BlockFaqOrder { + SubtitleAsc = 'subtitle_ASC', + SubtitleDesc = 'subtitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export type BlockFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + content_exists?: InputMaybe; + contentfulMetadata?: InputMaybe; + name?: InputMaybe; + name_contains?: InputMaybe; + name_exists?: InputMaybe; + name_in?: InputMaybe>>; + name_not?: InputMaybe; + name_not_contains?: InputMaybe; + name_not_in?: InputMaybe>>; + spacing?: InputMaybe; + spacing_contains?: InputMaybe; + spacing_exists?: InputMaybe; + spacing_in?: InputMaybe>>; + spacing_not?: InputMaybe; + spacing_not_contains?: InputMaybe; + spacing_not_in?: InputMaybe>>; + sys?: InputMaybe; +}; + +export type BlockLinkingCollections = { + entryCollection?: Maybe; + pageOneColumnTemplateCollection?: Maybe; +}; + +export type BlockLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type BlockLinkingCollectionsPageOneColumnTemplateCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum BlockLinkingCollectionsPageOneColumnTemplateCollectionOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum BlockOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SpacingAsc = 'spacing_ASC', + SpacingDesc = 'spacing_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketList = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + detailsUrl?: Maybe; + fieldsCollection?: Maybe; + labels?: Maybe; + linkedFrom?: Maybe; + noResults?: Maybe; + pagination?: Maybe; + subTitle?: Maybe; + sys: Sys; + table?: Maybe; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListDetailsUrlArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListFieldsCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListLabelsArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListNoResultsArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListPaginationArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListSubTitleArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListTableArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/blockTicketList) */ +export type BlockTicketListTitleArgs = { + locale?: InputMaybe; +}; + +export type BlockTicketListCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type BlockTicketListFieldsCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export enum BlockTicketListFieldsCollectionOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export type BlockTicketListFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + detailsUrl?: InputMaybe; + detailsUrl_contains?: InputMaybe; + detailsUrl_exists?: InputMaybe; + detailsUrl_in?: InputMaybe>>; + detailsUrl_not?: InputMaybe; + detailsUrl_not_contains?: InputMaybe; + detailsUrl_not_in?: InputMaybe>>; + fields?: InputMaybe; + fieldsCollection_exists?: InputMaybe; + labels?: InputMaybe; + labels_exists?: InputMaybe; + noResults?: InputMaybe; + noResults_exists?: InputMaybe; + pagination?: InputMaybe; + pagination_exists?: InputMaybe; + subTitle?: InputMaybe; + subTitle_contains?: InputMaybe; + subTitle_exists?: InputMaybe; + subTitle_in?: InputMaybe>>; + subTitle_not?: InputMaybe; + subTitle_not_contains?: InputMaybe; + subTitle_not_in?: InputMaybe>>; + sys?: InputMaybe; + table?: InputMaybe; + table_exists?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type BlockTicketListLinkingCollections = { + blockCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type BlockTicketListLinkingCollectionsBlockCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type BlockTicketListLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum BlockTicketListLinkingCollectionsBlockCollectionOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SpacingAsc = 'spacing_ASC', + SpacingDesc = 'spacing_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum BlockTicketListOrder { + DetailsUrlAsc = 'detailsUrl_ASC', + DetailsUrlDesc = 'detailsUrl_DESC', + SubTitleAsc = 'subTitle_ASC', + SubTitleDesc = 'subTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentBanner) */ +export type ComponentBanner = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + description?: Maybe; + link?: Maybe; + linkedFrom?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentBanner) */ +export type ComponentBannerDescriptionArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentBanner) */ +export type ComponentBannerLinkArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentBanner) */ +export type ComponentBannerLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentBanner) */ +export type ComponentBannerTitleArgs = { + locale?: InputMaybe; +}; + +export type ComponentBannerCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentBannerFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + link?: InputMaybe; + link_exists?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type ComponentBannerLinkingCollections = { + blockFaqCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentBannerLinkingCollectionsBlockFaqCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentBannerLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentBannerLinkingCollectionsBlockFaqCollectionOrder { + SubtitleAsc = 'subtitle_ASC', + SubtitleDesc = 'subtitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentBannerOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFaqItem) */ +export type ComponentFaqItem = Entry & + _Node & { + _id: Scalars['ID']['output']; + content?: Maybe; + contentfulMetadata: ContentfulMetadata; + linkedFrom?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFaqItem) */ +export type ComponentFaqItemContentArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFaqItem) */ +export type ComponentFaqItemLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFaqItem) */ +export type ComponentFaqItemTitleArgs = { + locale?: InputMaybe; +}; + +export type ComponentFaqItemCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentFaqItemFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + content?: InputMaybe; + content_contains?: InputMaybe; + content_exists?: InputMaybe; + content_in?: InputMaybe>>; + content_not?: InputMaybe; + content_not_contains?: InputMaybe; + content_not_in?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type ComponentFaqItemLinkingCollections = { + blockFaqCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentFaqItemLinkingCollectionsBlockFaqCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentFaqItemLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentFaqItemLinkingCollectionsBlockFaqCollectionOrder { + SubtitleAsc = 'subtitle_ASC', + SubtitleDesc = 'subtitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentFaqItemOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFieldMapping) */ +export type ComponentFieldMapping = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + linkedFrom?: Maybe; + name?: Maybe; + sys: Sys; + valuesCollection?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFieldMapping) */ +export type ComponentFieldMappingLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFieldMapping) */ +export type ComponentFieldMappingNameArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentFieldMapping) */ +export type ComponentFieldMappingValuesCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type ComponentFieldMappingCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentFieldMappingFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + name?: InputMaybe; + name_contains?: InputMaybe; + name_exists?: InputMaybe; + name_in?: InputMaybe>>; + name_not?: InputMaybe; + name_not_contains?: InputMaybe; + name_not_in?: InputMaybe>>; + sys?: InputMaybe; + values?: InputMaybe; + valuesCollection_exists?: InputMaybe; +}; + +export type ComponentFieldMappingLinkingCollections = { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentFieldMappingLinkingCollectionsBlockTicketListCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentFieldMappingLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentFieldMappingLinkingCollectionsBlockTicketListCollectionOrder { + DetailsUrlAsc = 'detailsUrl_ASC', + DetailsUrlDesc = 'detailsUrl_DESC', + SubTitleAsc = 'subTitle_ASC', + SubTitleDesc = 'subTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentFieldMappingOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export type ComponentFieldMappingValuesCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export enum ComponentFieldMappingValuesCollectionOrder { + KeyAsc = 'key_ASC', + KeyDesc = 'key_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + ValueAsc = 'value_ASC', + ValueDesc = 'value_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentKeyValue) */ +export type ComponentKeyValue = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + key?: Maybe; + linkedFrom?: Maybe; + sys: Sys; + value?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentKeyValue) */ +export type ComponentKeyValueKeyArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentKeyValue) */ +export type ComponentKeyValueLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentKeyValue) */ +export type ComponentKeyValueValueArgs = { + locale?: InputMaybe; +}; + +export type ComponentKeyValueCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentKeyValueFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + key?: InputMaybe; + key_contains?: InputMaybe; + key_exists?: InputMaybe; + key_in?: InputMaybe>>; + key_not?: InputMaybe; + key_not_contains?: InputMaybe; + key_not_in?: InputMaybe>>; + sys?: InputMaybe; + value?: InputMaybe; + value_contains?: InputMaybe; + value_exists?: InputMaybe; + value_in?: InputMaybe>>; + value_not?: InputMaybe; + value_not_contains?: InputMaybe; + value_not_in?: InputMaybe>>; +}; + +export type ComponentKeyValueLinkingCollections = { + componentFieldMappingCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentKeyValueLinkingCollectionsComponentFieldMappingCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentKeyValueLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentKeyValueLinkingCollectionsComponentFieldMappingCollectionOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum ComponentKeyValueOrder { + KeyAsc = 'key_ASC', + KeyDesc = 'key_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + ValueAsc = 'value_ASC', + ValueDesc = 'value_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentLink) */ +export type ComponentLink = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + label?: Maybe; + linkedFrom?: Maybe; + page?: Maybe; + sys: Sys; + url?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentLink) */ +export type ComponentLinkLabelArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentLink) */ +export type ComponentLinkLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentLink) */ +export type ComponentLinkPageArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentLink) */ +export type ComponentLinkUrlArgs = { + locale?: InputMaybe; +}; + +export type ComponentLinkCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentLinkFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + label?: InputMaybe; + label_contains?: InputMaybe; + label_exists?: InputMaybe; + label_in?: InputMaybe>>; + label_not?: InputMaybe; + label_not_contains?: InputMaybe; + label_not_in?: InputMaybe>>; + page?: InputMaybe; + page_exists?: InputMaybe; + sys?: InputMaybe; + url?: InputMaybe; + url_contains?: InputMaybe; + url_exists?: InputMaybe; + url_in?: InputMaybe>>; + url_not?: InputMaybe; + url_not_contains?: InputMaybe; + url_not_in?: InputMaybe>>; +}; + +export type ComponentLinkLinkingCollections = { + componentBannerCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentLinkLinkingCollectionsComponentBannerCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentLinkLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentLinkLinkingCollectionsComponentBannerCollectionOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentLinkOrder { + LabelAsc = 'label_ASC', + LabelDesc = 'label_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + UrlAsc = 'url_ASC', + UrlDesc = 'url_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentNoResult) */ +export type ComponentNoResult = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + description?: Maybe; + linkedFrom?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentNoResult) */ +export type ComponentNoResultDescriptionArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentNoResult) */ +export type ComponentNoResultLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentNoResult) */ +export type ComponentNoResultTitleArgs = { + locale?: InputMaybe; +}; + +export type ComponentNoResultCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentNoResultFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type ComponentNoResultLinkingCollections = { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentNoResultLinkingCollectionsBlockTicketListCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentNoResultLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentNoResultLinkingCollectionsBlockTicketListCollectionOrder { + DetailsUrlAsc = 'detailsUrl_ASC', + DetailsUrlDesc = 'detailsUrl_DESC', + SubTitleAsc = 'subTitle_ASC', + SubTitleDesc = 'subTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentNoResultOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPagination = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + description?: Maybe; + linkedFrom?: Maybe; + nextLabel?: Maybe; + perPage?: Maybe; + previousLabel?: Maybe; + selectPageLabel?: Maybe; + sys: Sys; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPaginationDescriptionArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPaginationLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPaginationNextLabelArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPaginationPerPageArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPaginationPreviousLabelArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentPagination) */ +export type ComponentPaginationSelectPageLabelArgs = { + locale?: InputMaybe; +}; + +export type ComponentPaginationCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentPaginationFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + nextLabel?: InputMaybe; + nextLabel_contains?: InputMaybe; + nextLabel_exists?: InputMaybe; + nextLabel_in?: InputMaybe>>; + nextLabel_not?: InputMaybe; + nextLabel_not_contains?: InputMaybe; + nextLabel_not_in?: InputMaybe>>; + perPage?: InputMaybe; + perPage_exists?: InputMaybe; + perPage_gt?: InputMaybe; + perPage_gte?: InputMaybe; + perPage_in?: InputMaybe>>; + perPage_lt?: InputMaybe; + perPage_lte?: InputMaybe; + perPage_not?: InputMaybe; + perPage_not_in?: InputMaybe>>; + previousLabel?: InputMaybe; + previousLabel_contains?: InputMaybe; + previousLabel_exists?: InputMaybe; + previousLabel_in?: InputMaybe>>; + previousLabel_not?: InputMaybe; + previousLabel_not_contains?: InputMaybe; + previousLabel_not_in?: InputMaybe>>; + selectPageLabel?: InputMaybe; + selectPageLabel_contains?: InputMaybe; + selectPageLabel_exists?: InputMaybe; + selectPageLabel_in?: InputMaybe>>; + selectPageLabel_not?: InputMaybe; + selectPageLabel_not_contains?: InputMaybe; + selectPageLabel_not_in?: InputMaybe>>; + sys?: InputMaybe; +}; + +export type ComponentPaginationLinkingCollections = { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentPaginationLinkingCollectionsBlockTicketListCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentPaginationLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentPaginationLinkingCollectionsBlockTicketListCollectionOrder { + DetailsUrlAsc = 'detailsUrl_ASC', + DetailsUrlDesc = 'detailsUrl_DESC', + SubTitleAsc = 'subTitle_ASC', + SubTitleDesc = 'subTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentPaginationOrder { + DescriptionAsc = 'description_ASC', + DescriptionDesc = 'description_DESC', + NextLabelAsc = 'nextLabel_ASC', + NextLabelDesc = 'nextLabel_DESC', + PerPageAsc = 'perPage_ASC', + PerPageDesc = 'perPage_DESC', + PreviousLabelAsc = 'previousLabel_ASC', + PreviousLabelDesc = 'previousLabel_DESC', + SelectPageLabelAsc = 'selectPageLabel_ASC', + SelectPageLabelDesc = 'selectPageLabel_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTable) */ +export type ComponentTable = Entry & + _Node & { + _id: Scalars['ID']['output']; + actionsLabel?: Maybe; + actionsTitle?: Maybe; + columnsCollection?: Maybe; + contentfulMetadata: ContentfulMetadata; + linkedFrom?: Maybe; + sys: Sys; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTable) */ +export type ComponentTableActionsLabelArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTable) */ +export type ComponentTableActionsTitleArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTable) */ +export type ComponentTableColumnsCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTable) */ +export type ComponentTableLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +export type ComponentTableCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTableColumn) */ +export type ComponentTableColumn = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + field?: Maybe; + linkedFrom?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTableColumn) */ +export type ComponentTableColumnFieldArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTableColumn) */ +export type ComponentTableColumnLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/componentTableColumn) */ +export type ComponentTableColumnTitleArgs = { + locale?: InputMaybe; +}; + +export type ComponentTableColumnCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type ComponentTableColumnFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + field?: InputMaybe; + field_contains?: InputMaybe; + field_exists?: InputMaybe; + field_in?: InputMaybe>>; + field_not?: InputMaybe; + field_not_contains?: InputMaybe; + field_not_in?: InputMaybe>>; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type ComponentTableColumnLinkingCollections = { + componentTableCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentTableColumnLinkingCollectionsComponentTableCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentTableColumnLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentTableColumnLinkingCollectionsComponentTableCollectionOrder { + ActionsLabelAsc = 'actionsLabel_ASC', + ActionsLabelDesc = 'actionsLabel_DESC', + ActionsTitleAsc = 'actionsTitle_ASC', + ActionsTitleDesc = 'actionsTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum ComponentTableColumnOrder { + FieldAsc = 'field_ASC', + FieldDesc = 'field_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export type ComponentTableColumnsCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export enum ComponentTableColumnsCollectionOrder { + FieldAsc = 'field_ASC', + FieldDesc = 'field_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export type ComponentTableFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + actionsLabel?: InputMaybe; + actionsLabel_contains?: InputMaybe; + actionsLabel_exists?: InputMaybe; + actionsLabel_in?: InputMaybe>>; + actionsLabel_not?: InputMaybe; + actionsLabel_not_contains?: InputMaybe; + actionsLabel_not_in?: InputMaybe>>; + actionsTitle?: InputMaybe; + actionsTitle_contains?: InputMaybe; + actionsTitle_exists?: InputMaybe; + actionsTitle_in?: InputMaybe>>; + actionsTitle_not?: InputMaybe; + actionsTitle_not_contains?: InputMaybe; + actionsTitle_not_in?: InputMaybe>>; + columns?: InputMaybe; + columnsCollection_exists?: InputMaybe; + contentfulMetadata?: InputMaybe; + sys?: InputMaybe; +}; + +export type ComponentTableLinkingCollections = { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type ComponentTableLinkingCollectionsBlockTicketListCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type ComponentTableLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum ComponentTableLinkingCollectionsBlockTicketListCollectionOrder { + DetailsUrlAsc = 'detailsUrl_ASC', + DetailsUrlDesc = 'detailsUrl_DESC', + SubTitleAsc = 'subTitle_ASC', + SubTitleDesc = 'subTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum ComponentTableOrder { + ActionsLabelAsc = 'actionsLabel_ASC', + ActionsLabelDesc = 'actionsLabel_DESC', + ActionsTitleAsc = 'actionsTitle_ASC', + ActionsTitleDesc = 'actionsTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export type ContentfulMetadata = { + concepts: Array>; + tags: Array>; +}; + +export type ContentfulMetadataConceptsDescendantsFilter = { + id_contains_all?: InputMaybe>>; + id_contains_none?: InputMaybe>>; + id_contains_some?: InputMaybe>>; +}; + +export type ContentfulMetadataConceptsFilter = { + descendants?: InputMaybe; + id_contains_all?: InputMaybe>>; + id_contains_none?: InputMaybe>>; + id_contains_some?: InputMaybe>>; +}; + +export type ContentfulMetadataFilter = { + concepts?: InputMaybe; + concepts_exists?: InputMaybe; + tags?: InputMaybe; + tags_exists?: InputMaybe; +}; + +export type ContentfulMetadataTagsFilter = { + id_contains_all?: InputMaybe>>; + id_contains_none?: InputMaybe>>; + id_contains_some?: InputMaybe>>; +}; + +/** + * Represents a tag entity for finding and organizing content easily. + * Find out more here: https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-tags + */ +export type ContentfulTag = { + id?: Maybe; + name?: Maybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTexts = Entry & + _Node & { + _id: Scalars['ID']['output']; + apply?: Maybe; + cancel?: Maybe; + clear?: Maybe; + contentfulMetadata: ContentfulMetadata; + delete?: Maybe; + edit?: Maybe; + hide?: Maybe; + linkedFrom?: Maybe; + logIn?: Maybe; + logOut?: Maybe; + renew?: Maybe; + save?: Maybe; + settings?: Maybe; + show?: Maybe; + showLess?: Maybe; + showMore?: Maybe; + sys: Sys; + today?: Maybe; + yesterday?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsApplyArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsCancelArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsClearArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsDeleteArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsEditArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsHideArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsLogInArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsLogOutArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsRenewArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsSaveArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsSettingsArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsShowArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsShowLessArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsShowMoreArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsTodayArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/dataConfigurableTexts) */ +export type DataConfigurableTextsYesterdayArgs = { + locale?: InputMaybe; +}; + +export type DataConfigurableTextsCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type DataConfigurableTextsFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + apply?: InputMaybe; + apply_contains?: InputMaybe; + apply_exists?: InputMaybe; + apply_in?: InputMaybe>>; + apply_not?: InputMaybe; + apply_not_contains?: InputMaybe; + apply_not_in?: InputMaybe>>; + cancel?: InputMaybe; + cancel_contains?: InputMaybe; + cancel_exists?: InputMaybe; + cancel_in?: InputMaybe>>; + cancel_not?: InputMaybe; + cancel_not_contains?: InputMaybe; + cancel_not_in?: InputMaybe>>; + clear?: InputMaybe; + clear_contains?: InputMaybe; + clear_exists?: InputMaybe; + clear_in?: InputMaybe>>; + clear_not?: InputMaybe; + clear_not_contains?: InputMaybe; + clear_not_in?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + delete?: InputMaybe; + delete_contains?: InputMaybe; + delete_exists?: InputMaybe; + delete_in?: InputMaybe>>; + delete_not?: InputMaybe; + delete_not_contains?: InputMaybe; + delete_not_in?: InputMaybe>>; + edit?: InputMaybe; + edit_contains?: InputMaybe; + edit_exists?: InputMaybe; + edit_in?: InputMaybe>>; + edit_not?: InputMaybe; + edit_not_contains?: InputMaybe; + edit_not_in?: InputMaybe>>; + hide?: InputMaybe; + hide_contains?: InputMaybe; + hide_exists?: InputMaybe; + hide_in?: InputMaybe>>; + hide_not?: InputMaybe; + hide_not_contains?: InputMaybe; + hide_not_in?: InputMaybe>>; + logIn?: InputMaybe; + logIn_contains?: InputMaybe; + logIn_exists?: InputMaybe; + logIn_in?: InputMaybe>>; + logIn_not?: InputMaybe; + logIn_not_contains?: InputMaybe; + logIn_not_in?: InputMaybe>>; + logOut?: InputMaybe; + logOut_contains?: InputMaybe; + logOut_exists?: InputMaybe; + logOut_in?: InputMaybe>>; + logOut_not?: InputMaybe; + logOut_not_contains?: InputMaybe; + logOut_not_in?: InputMaybe>>; + renew?: InputMaybe; + renew_contains?: InputMaybe; + renew_exists?: InputMaybe; + renew_in?: InputMaybe>>; + renew_not?: InputMaybe; + renew_not_contains?: InputMaybe; + renew_not_in?: InputMaybe>>; + save?: InputMaybe; + save_contains?: InputMaybe; + save_exists?: InputMaybe; + save_in?: InputMaybe>>; + save_not?: InputMaybe; + save_not_contains?: InputMaybe; + save_not_in?: InputMaybe>>; + settings?: InputMaybe; + settings_contains?: InputMaybe; + settings_exists?: InputMaybe; + settings_in?: InputMaybe>>; + settings_not?: InputMaybe; + settings_not_contains?: InputMaybe; + settings_not_in?: InputMaybe>>; + show?: InputMaybe; + showLess?: InputMaybe; + showLess_contains?: InputMaybe; + showLess_exists?: InputMaybe; + showLess_in?: InputMaybe>>; + showLess_not?: InputMaybe; + showLess_not_contains?: InputMaybe; + showLess_not_in?: InputMaybe>>; + showMore?: InputMaybe; + showMore_contains?: InputMaybe; + showMore_exists?: InputMaybe; + showMore_in?: InputMaybe>>; + showMore_not?: InputMaybe; + showMore_not_contains?: InputMaybe; + showMore_not_in?: InputMaybe>>; + show_contains?: InputMaybe; + show_exists?: InputMaybe; + show_in?: InputMaybe>>; + show_not?: InputMaybe; + show_not_contains?: InputMaybe; + show_not_in?: InputMaybe>>; + sys?: InputMaybe; + today?: InputMaybe; + today_contains?: InputMaybe; + today_exists?: InputMaybe; + today_in?: InputMaybe>>; + today_not?: InputMaybe; + today_not_contains?: InputMaybe; + today_not_in?: InputMaybe>>; + yesterday?: InputMaybe; + yesterday_contains?: InputMaybe; + yesterday_exists?: InputMaybe; + yesterday_in?: InputMaybe>>; + yesterday_not?: InputMaybe; + yesterday_not_contains?: InputMaybe; + yesterday_not_in?: InputMaybe>>; +}; + +export type DataConfigurableTextsLinkingCollections = { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; +}; + +export type DataConfigurableTextsLinkingCollectionsBlockTicketListCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type DataConfigurableTextsLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum DataConfigurableTextsLinkingCollectionsBlockTicketListCollectionOrder { + DetailsUrlAsc = 'detailsUrl_ASC', + DetailsUrlDesc = 'detailsUrl_DESC', + SubTitleAsc = 'subTitle_ASC', + SubTitleDesc = 'subTitle_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum DataConfigurableTextsOrder { + ApplyAsc = 'apply_ASC', + ApplyDesc = 'apply_DESC', + CancelAsc = 'cancel_ASC', + CancelDesc = 'cancel_DESC', + ClearAsc = 'clear_ASC', + ClearDesc = 'clear_DESC', + DeleteAsc = 'delete_ASC', + DeleteDesc = 'delete_DESC', + EditAsc = 'edit_ASC', + EditDesc = 'edit_DESC', + HideAsc = 'hide_ASC', + HideDesc = 'hide_DESC', + LogInAsc = 'logIn_ASC', + LogInDesc = 'logIn_DESC', + LogOutAsc = 'logOut_ASC', + LogOutDesc = 'logOut_DESC', + RenewAsc = 'renew_ASC', + RenewDesc = 'renew_DESC', + SaveAsc = 'save_ASC', + SaveDesc = 'save_DESC', + SettingsAsc = 'settings_ASC', + SettingsDesc = 'settings_DESC', + ShowLessAsc = 'showLess_ASC', + ShowLessDesc = 'showLess_DESC', + ShowMoreAsc = 'showMore_ASC', + ShowMoreDesc = 'showMore_DESC', + ShowAsc = 'show_ASC', + ShowDesc = 'show_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TodayAsc = 'today_ASC', + TodayDesc = 'today_DESC', + YesterdayAsc = 'yesterday_ASC', + YesterdayDesc = 'yesterday_DESC', +} + +export type Entry = { + contentfulMetadata: ContentfulMetadata; + sys: Sys; +}; + +export type EntryCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type EntryFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + sys?: InputMaybe; +}; + +export enum EntryOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum ImageFormat { + /** AVIF image format. */ + Avif = 'AVIF', + /** JPG image format. */ + Jpg = 'JPG', + /** + * Progressive JPG format stores multiple passes of an image in progressively higher detail. + * When a progressive image is loading, the viewer will first see a lower quality pixelated version which + * will gradually improve in detail, until the image is fully downloaded. This is to display an image as + * early as possible to make the layout look as designed. + */ + JpgProgressive = 'JPG_PROGRESSIVE', + /** PNG image format */ + Png = 'PNG', + /** + * 8-bit PNG images support up to 256 colors and weigh less than the standard 24-bit PNG equivalent. + * The 8-bit PNG format is mostly used for simple images, such as icons or logos. + */ + Png8 = 'PNG8', + /** WebP image format. */ + Webp = 'WEBP', +} + +export enum ImageResizeFocus { + /** Focus the resizing on the bottom. */ + Bottom = 'BOTTOM', + /** Focus the resizing on the bottom left. */ + BottomLeft = 'BOTTOM_LEFT', + /** Focus the resizing on the bottom right. */ + BottomRight = 'BOTTOM_RIGHT', + /** Focus the resizing on the center. */ + Center = 'CENTER', + /** Focus the resizing on the largest face. */ + Face = 'FACE', + /** Focus the resizing on the area containing all the faces. */ + Faces = 'FACES', + /** Focus the resizing on the left. */ + Left = 'LEFT', + /** Focus the resizing on the right. */ + Right = 'RIGHT', + /** Focus the resizing on the top. */ + Top = 'TOP', + /** Focus the resizing on the top left. */ + TopLeft = 'TOP_LEFT', + /** Focus the resizing on the top right. */ + TopRight = 'TOP_RIGHT', +} + +export enum ImageResizeStrategy { + /** Crops a part of the original image to fit into the specified dimensions. */ + Crop = 'CROP', + /** Resizes the image to the specified dimensions, cropping the image if needed. */ + Fill = 'FILL', + /** Resizes the image to fit into the specified dimensions. */ + Fit = 'FIT', + /** + * Resizes the image to the specified dimensions, padding the image if needed. + * Uses desired background color as padding color. + */ + Pad = 'PAD', + /** Resizes the image to the specified dimensions, changing the original aspect ratio if needed. */ + Scale = 'SCALE', + /** Creates a thumbnail from the image. */ + Thumb = 'THUMB', +} + +export type ImageTransformOptions = { + /** + * Desired background color, used with corner radius or `PAD` resize strategy. + * Defaults to transparent (for `PNG`, `PNG8` and `WEBP`) or white (for `JPG` and `JPG_PROGRESSIVE`). + */ + backgroundColor?: InputMaybe; + /** + * Desired corner radius in pixels. + * Results in an image with rounded corners (pass `-1` for a full circle/ellipse). + * Defaults to `0`. Uses desired background color as padding color, + * unless the format is `JPG` or `JPG_PROGRESSIVE` and resize strategy is `PAD`, then defaults to white. + */ + cornerRadius?: InputMaybe; + /** Desired image format. Defaults to the original image format. */ + format?: InputMaybe; + /** Desired height in pixels. Defaults to the original image height. */ + height?: InputMaybe; + /** + * Desired quality of the image in percents. + * Used for `PNG8`, `JPG`, `JPG_PROGRESSIVE` and `WEBP` formats. + */ + quality?: InputMaybe; + /** Desired resize focus area. Defaults to `CENTER`. */ + resizeFocus?: InputMaybe; + /** Desired resize strategy. Defaults to `FIT`. */ + resizeStrategy?: InputMaybe; + /** Desired width in pixels. Defaults to the original image width. */ + width?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type Page = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + hasOwnTitle?: Maybe; + linkedFrom?: Maybe; + parent?: Maybe; + seo?: Maybe; + slug?: Maybe; + sys: Sys; + template?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type PageHasOwnTitleArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type PageLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type PageParentArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type PageSeoArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type PageSlugArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/page) */ +export type PageTemplateArgs = { + locale?: InputMaybe; + preview?: InputMaybe; + where?: InputMaybe; +}; + +export type PageCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type PageFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + hasOwnTitle?: InputMaybe; + hasOwnTitle_exists?: InputMaybe; + hasOwnTitle_not?: InputMaybe; + parent?: InputMaybe; + parent_exists?: InputMaybe; + seo?: InputMaybe; + seo_exists?: InputMaybe; + slug?: InputMaybe; + slug_contains?: InputMaybe; + slug_exists?: InputMaybe; + slug_in?: InputMaybe>>; + slug_not?: InputMaybe; + slug_not_contains?: InputMaybe; + slug_not_in?: InputMaybe>>; + sys?: InputMaybe; + template?: InputMaybe; + template_exists?: InputMaybe; +}; + +export type PageLinkingCollections = { + componentLinkCollection?: Maybe; + entryCollection?: Maybe; + pageCollection?: Maybe; +}; + +export type PageLinkingCollectionsComponentLinkCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type PageLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type PageLinkingCollectionsPageCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum PageLinkingCollectionsComponentLinkCollectionOrder { + LabelAsc = 'label_ASC', + LabelDesc = 'label_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + UrlAsc = 'url_ASC', + UrlDesc = 'url_DESC', +} + +export enum PageLinkingCollectionsPageCollectionOrder { + HasOwnTitleAsc = 'hasOwnTitle_ASC', + HasOwnTitleDesc = 'hasOwnTitle_DESC', + SlugAsc = 'slug_ASC', + SlugDesc = 'slug_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageOneColumnTemplate) */ +export type PageOneColumnTemplate = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + linkedFrom?: Maybe; + mainSlotCollection?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageOneColumnTemplate) */ +export type PageOneColumnTemplateLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageOneColumnTemplate) */ +export type PageOneColumnTemplateMainSlotCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageOneColumnTemplate) */ +export type PageOneColumnTemplateTitleArgs = { + locale?: InputMaybe; +}; + +export type PageOneColumnTemplateCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type PageOneColumnTemplateFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + mainSlot?: InputMaybe; + mainSlotCollection_exists?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type PageOneColumnTemplateLinkingCollections = { + entryCollection?: Maybe; + pageCollection?: Maybe; +}; + +export type PageOneColumnTemplateLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type PageOneColumnTemplateLinkingCollectionsPageCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum PageOneColumnTemplateLinkingCollectionsPageCollectionOrder { + HasOwnTitleAsc = 'hasOwnTitle_ASC', + HasOwnTitleDesc = 'hasOwnTitle_DESC', + SlugAsc = 'slug_ASC', + SlugDesc = 'slug_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export type PageOneColumnTemplateMainSlotCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export enum PageOneColumnTemplateMainSlotCollectionOrder { + NameAsc = 'name_ASC', + NameDesc = 'name_DESC', + SpacingAsc = 'spacing_ASC', + SpacingDesc = 'spacing_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum PageOneColumnTemplateOrder { + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export enum PageOrder { + HasOwnTitleAsc = 'hasOwnTitle_ASC', + HasOwnTitleDesc = 'hasOwnTitle_DESC', + SlugAsc = 'slug_ASC', + SlugDesc = 'slug_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeo = Entry & + _Node & { + _id: Scalars['ID']['output']; + contentfulMetadata: ContentfulMetadata; + description?: Maybe; + keywords?: Maybe>>; + linkedFrom?: Maybe; + noFollow?: Maybe; + noIndex?: Maybe; + sys: Sys; + title?: Maybe; + }; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeoDescriptionArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeoKeywordsArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeoLinkedFromArgs = { + allowedLocales?: InputMaybe>>; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeoNoFollowArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeoNoIndexArgs = { + locale?: InputMaybe; +}; + +/** [See type definition](https://app.contentful.com/spaces/x7lexi1yira0/content_types/pageSeo) */ +export type PageSeoTitleArgs = { + locale?: InputMaybe; +}; + +export type PageSeoCollection = { + items: Array>; + limit: Scalars['Int']['output']; + skip: Scalars['Int']['output']; + total: Scalars['Int']['output']; +}; + +export type PageSeoFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + keywords_contains_all?: InputMaybe>>; + keywords_contains_none?: InputMaybe>>; + keywords_contains_some?: InputMaybe>>; + keywords_exists?: InputMaybe; + noFollow?: InputMaybe; + noFollow_exists?: InputMaybe; + noFollow_not?: InputMaybe; + noIndex?: InputMaybe; + noIndex_exists?: InputMaybe; + noIndex_not?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type PageSeoLinkingCollections = { + entryCollection?: Maybe; + pageCollection?: Maybe; +}; + +export type PageSeoLinkingCollectionsEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export type PageSeoLinkingCollectionsPageCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; +}; + +export enum PageSeoLinkingCollectionsPageCollectionOrder { + HasOwnTitleAsc = 'hasOwnTitle_ASC', + HasOwnTitleDesc = 'hasOwnTitle_DESC', + SlugAsc = 'slug_ASC', + SlugDesc = 'slug_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', +} + +export enum PageSeoOrder { + NoFollowAsc = 'noFollow_ASC', + NoFollowDesc = 'noFollow_DESC', + NoIndexAsc = 'noIndex_ASC', + NoIndexDesc = 'noIndex_DESC', + SysFirstPublishedAtAsc = 'sys_firstPublishedAt_ASC', + SysFirstPublishedAtDesc = 'sys_firstPublishedAt_DESC', + SysIdAsc = 'sys_id_ASC', + SysIdDesc = 'sys_id_DESC', + SysPublishedAtAsc = 'sys_publishedAt_ASC', + SysPublishedAtDesc = 'sys_publishedAt_DESC', + SysPublishedVersionAsc = 'sys_publishedVersion_ASC', + SysPublishedVersionDesc = 'sys_publishedVersion_DESC', + TitleAsc = 'title_ASC', + TitleDesc = 'title_DESC', +} + +export type Query = { + _node?: Maybe<_Node>; + _nodes: Array>; + asset?: Maybe; + assetCollection?: Maybe; + block?: Maybe; + blockCollection?: Maybe; + blockFaq?: Maybe; + blockFaqCollection?: Maybe; + blockTicketList?: Maybe; + blockTicketListCollection?: Maybe; + componentBanner?: Maybe; + componentBannerCollection?: Maybe; + componentFaqItem?: Maybe; + componentFaqItemCollection?: Maybe; + componentFieldMapping?: Maybe; + componentFieldMappingCollection?: Maybe; + componentKeyValue?: Maybe; + componentKeyValueCollection?: Maybe; + componentLink?: Maybe; + componentLinkCollection?: Maybe; + componentNoResult?: Maybe; + componentNoResultCollection?: Maybe; + componentPagination?: Maybe; + componentPaginationCollection?: Maybe; + componentTable?: Maybe; + componentTableCollection?: Maybe; + componentTableColumn?: Maybe; + componentTableColumnCollection?: Maybe; + dataConfigurableTexts?: Maybe; + dataConfigurableTextsCollection?: Maybe; + entryCollection?: Maybe; + page?: Maybe; + pageCollection?: Maybe; + pageOneColumnTemplate?: Maybe; + pageOneColumnTemplateCollection?: Maybe; + pageSeo?: Maybe; + pageSeoCollection?: Maybe; +}; + +export type Query_NodeArgs = { + id: Scalars['ID']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type Query_NodesArgs = { + ids: Array; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryAssetArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryAssetCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryBlockArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryBlockCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryBlockFaqArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryBlockFaqCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryBlockTicketListArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryBlockTicketListCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentBannerArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentBannerCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentFaqItemArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentFaqItemCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentFieldMappingArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentFieldMappingCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentKeyValueArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentKeyValueCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentLinkArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentLinkCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentNoResultArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentNoResultCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentPaginationArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentPaginationCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentTableArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentTableCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryComponentTableColumnArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryComponentTableColumnCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryDataConfigurableTextsArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryDataConfigurableTextsCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryEntryCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryPageArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryPageCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryPageOneColumnTemplateArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryPageOneColumnTemplateCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryPageSeoArgs = { + id: Scalars['String']['input']; + locale?: InputMaybe; + preview?: InputMaybe; +}; + +export type QueryPageSeoCollectionArgs = { + limit?: InputMaybe; + locale?: InputMaybe; + order?: InputMaybe>>; + preview?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type Sys = { + environmentId: Scalars['String']['output']; + firstPublishedAt?: Maybe; + id: Scalars['String']['output']; + /** The locale that was requested. */ + locale?: Maybe; + publishedAt?: Maybe; + publishedVersion?: Maybe; + spaceId: Scalars['String']['output']; +}; + +export type SysFilter = { + firstPublishedAt?: InputMaybe; + firstPublishedAt_exists?: InputMaybe; + firstPublishedAt_gt?: InputMaybe; + firstPublishedAt_gte?: InputMaybe; + firstPublishedAt_in?: InputMaybe>>; + firstPublishedAt_lt?: InputMaybe; + firstPublishedAt_lte?: InputMaybe; + firstPublishedAt_not?: InputMaybe; + firstPublishedAt_not_in?: InputMaybe>>; + id?: InputMaybe; + id_contains?: InputMaybe; + id_exists?: InputMaybe; + id_in?: InputMaybe>>; + id_not?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_in?: InputMaybe>>; + publishedAt?: InputMaybe; + publishedAt_exists?: InputMaybe; + publishedAt_gt?: InputMaybe; + publishedAt_gte?: InputMaybe; + publishedAt_in?: InputMaybe>>; + publishedAt_lt?: InputMaybe; + publishedAt_lte?: InputMaybe; + publishedAt_not?: InputMaybe; + publishedAt_not_in?: InputMaybe>>; + publishedVersion?: InputMaybe; + publishedVersion_exists?: InputMaybe; + publishedVersion_gt?: InputMaybe; + publishedVersion_gte?: InputMaybe; + publishedVersion_in?: InputMaybe>>; + publishedVersion_lt?: InputMaybe; + publishedVersion_lte?: InputMaybe; + publishedVersion_not?: InputMaybe; + publishedVersion_not_in?: InputMaybe>>; +}; + +/** + * Represents a taxonomy concept entity for finding and organizing content easily. + * Find out more here: https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-concepts + */ +export type TaxonomyConcept = { + id?: Maybe; +}; + +export type TimelineFilterInput = { + /** Preview content starting from a given release date */ + release_lte?: InputMaybe; + /** Preview content starting from a given timestamp */ + timestamp_lte?: InputMaybe; +}; + +export type _Node = { + _id: Scalars['ID']['output']; +}; + +export type CfBlockNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + content_exists?: InputMaybe; + contentfulMetadata?: InputMaybe; + name?: InputMaybe; + name_contains?: InputMaybe; + name_exists?: InputMaybe; + name_in?: InputMaybe>>; + name_not?: InputMaybe; + name_not_contains?: InputMaybe; + name_not_in?: InputMaybe>>; + spacing?: InputMaybe; + spacing_contains?: InputMaybe; + spacing_exists?: InputMaybe; + spacing_in?: InputMaybe>>; + spacing_not?: InputMaybe; + spacing_not_contains?: InputMaybe; + spacing_not_in?: InputMaybe>>; + sys?: InputMaybe; +}; + +export type CfComponentBannerNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + link_exists?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type CfComponentFaqItemNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + content?: InputMaybe; + content_contains?: InputMaybe; + content_exists?: InputMaybe; + content_in?: InputMaybe>>; + content_not?: InputMaybe; + content_not_contains?: InputMaybe; + content_not_in?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type CfComponentFieldMappingNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + name?: InputMaybe; + name_contains?: InputMaybe; + name_exists?: InputMaybe; + name_in?: InputMaybe>>; + name_not?: InputMaybe; + name_not_contains?: InputMaybe; + name_not_in?: InputMaybe>>; + sys?: InputMaybe; + valuesCollection_exists?: InputMaybe; +}; + +export type CfComponentKeyValueNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + key?: InputMaybe; + key_contains?: InputMaybe; + key_exists?: InputMaybe; + key_in?: InputMaybe>>; + key_not?: InputMaybe; + key_not_contains?: InputMaybe; + key_not_in?: InputMaybe>>; + sys?: InputMaybe; + value?: InputMaybe; + value_contains?: InputMaybe; + value_exists?: InputMaybe; + value_in?: InputMaybe>>; + value_not?: InputMaybe; + value_not_contains?: InputMaybe; + value_not_in?: InputMaybe>>; +}; + +export type CfComponentLinkNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + label?: InputMaybe; + label_contains?: InputMaybe; + label_exists?: InputMaybe; + label_in?: InputMaybe>>; + label_not?: InputMaybe; + label_not_contains?: InputMaybe; + label_not_in?: InputMaybe>>; + page_exists?: InputMaybe; + sys?: InputMaybe; + url?: InputMaybe; + url_contains?: InputMaybe; + url_exists?: InputMaybe; + url_in?: InputMaybe>>; + url_not?: InputMaybe; + url_not_contains?: InputMaybe; + url_not_in?: InputMaybe>>; +}; + +export type CfComponentNoResultNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type CfComponentPaginationNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + nextLabel?: InputMaybe; + nextLabel_contains?: InputMaybe; + nextLabel_exists?: InputMaybe; + nextLabel_in?: InputMaybe>>; + nextLabel_not?: InputMaybe; + nextLabel_not_contains?: InputMaybe; + nextLabel_not_in?: InputMaybe>>; + perPage?: InputMaybe; + perPage_exists?: InputMaybe; + perPage_gt?: InputMaybe; + perPage_gte?: InputMaybe; + perPage_in?: InputMaybe>>; + perPage_lt?: InputMaybe; + perPage_lte?: InputMaybe; + perPage_not?: InputMaybe; + perPage_not_in?: InputMaybe>>; + previousLabel?: InputMaybe; + previousLabel_contains?: InputMaybe; + previousLabel_exists?: InputMaybe; + previousLabel_in?: InputMaybe>>; + previousLabel_not?: InputMaybe; + previousLabel_not_contains?: InputMaybe; + previousLabel_not_in?: InputMaybe>>; + selectPageLabel?: InputMaybe; + selectPageLabel_contains?: InputMaybe; + selectPageLabel_exists?: InputMaybe; + selectPageLabel_in?: InputMaybe>>; + selectPageLabel_not?: InputMaybe; + selectPageLabel_not_contains?: InputMaybe; + selectPageLabel_not_in?: InputMaybe>>; + sys?: InputMaybe; +}; + +export type CfComponentTableColumnNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + field?: InputMaybe; + field_contains?: InputMaybe; + field_exists?: InputMaybe; + field_in?: InputMaybe>>; + field_not?: InputMaybe; + field_not_contains?: InputMaybe; + field_not_in?: InputMaybe>>; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type CfComponentTableNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + actionsLabel?: InputMaybe; + actionsLabel_contains?: InputMaybe; + actionsLabel_exists?: InputMaybe; + actionsLabel_in?: InputMaybe>>; + actionsLabel_not?: InputMaybe; + actionsLabel_not_contains?: InputMaybe; + actionsLabel_not_in?: InputMaybe>>; + actionsTitle?: InputMaybe; + actionsTitle_contains?: InputMaybe; + actionsTitle_exists?: InputMaybe; + actionsTitle_in?: InputMaybe>>; + actionsTitle_not?: InputMaybe; + actionsTitle_not_contains?: InputMaybe; + actionsTitle_not_in?: InputMaybe>>; + columnsCollection_exists?: InputMaybe; + contentfulMetadata?: InputMaybe; + sys?: InputMaybe; +}; + +export type CfDataConfigurableTextsNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + apply?: InputMaybe; + apply_contains?: InputMaybe; + apply_exists?: InputMaybe; + apply_in?: InputMaybe>>; + apply_not?: InputMaybe; + apply_not_contains?: InputMaybe; + apply_not_in?: InputMaybe>>; + cancel?: InputMaybe; + cancel_contains?: InputMaybe; + cancel_exists?: InputMaybe; + cancel_in?: InputMaybe>>; + cancel_not?: InputMaybe; + cancel_not_contains?: InputMaybe; + cancel_not_in?: InputMaybe>>; + clear?: InputMaybe; + clear_contains?: InputMaybe; + clear_exists?: InputMaybe; + clear_in?: InputMaybe>>; + clear_not?: InputMaybe; + clear_not_contains?: InputMaybe; + clear_not_in?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + delete?: InputMaybe; + delete_contains?: InputMaybe; + delete_exists?: InputMaybe; + delete_in?: InputMaybe>>; + delete_not?: InputMaybe; + delete_not_contains?: InputMaybe; + delete_not_in?: InputMaybe>>; + edit?: InputMaybe; + edit_contains?: InputMaybe; + edit_exists?: InputMaybe; + edit_in?: InputMaybe>>; + edit_not?: InputMaybe; + edit_not_contains?: InputMaybe; + edit_not_in?: InputMaybe>>; + hide?: InputMaybe; + hide_contains?: InputMaybe; + hide_exists?: InputMaybe; + hide_in?: InputMaybe>>; + hide_not?: InputMaybe; + hide_not_contains?: InputMaybe; + hide_not_in?: InputMaybe>>; + logIn?: InputMaybe; + logIn_contains?: InputMaybe; + logIn_exists?: InputMaybe; + logIn_in?: InputMaybe>>; + logIn_not?: InputMaybe; + logIn_not_contains?: InputMaybe; + logIn_not_in?: InputMaybe>>; + logOut?: InputMaybe; + logOut_contains?: InputMaybe; + logOut_exists?: InputMaybe; + logOut_in?: InputMaybe>>; + logOut_not?: InputMaybe; + logOut_not_contains?: InputMaybe; + logOut_not_in?: InputMaybe>>; + renew?: InputMaybe; + renew_contains?: InputMaybe; + renew_exists?: InputMaybe; + renew_in?: InputMaybe>>; + renew_not?: InputMaybe; + renew_not_contains?: InputMaybe; + renew_not_in?: InputMaybe>>; + save?: InputMaybe; + save_contains?: InputMaybe; + save_exists?: InputMaybe; + save_in?: InputMaybe>>; + save_not?: InputMaybe; + save_not_contains?: InputMaybe; + save_not_in?: InputMaybe>>; + settings?: InputMaybe; + settings_contains?: InputMaybe; + settings_exists?: InputMaybe; + settings_in?: InputMaybe>>; + settings_not?: InputMaybe; + settings_not_contains?: InputMaybe; + settings_not_in?: InputMaybe>>; + show?: InputMaybe; + showLess?: InputMaybe; + showLess_contains?: InputMaybe; + showLess_exists?: InputMaybe; + showLess_in?: InputMaybe>>; + showLess_not?: InputMaybe; + showLess_not_contains?: InputMaybe; + showLess_not_in?: InputMaybe>>; + showMore?: InputMaybe; + showMore_contains?: InputMaybe; + showMore_exists?: InputMaybe; + showMore_in?: InputMaybe>>; + showMore_not?: InputMaybe; + showMore_not_contains?: InputMaybe; + showMore_not_in?: InputMaybe>>; + show_contains?: InputMaybe; + show_exists?: InputMaybe; + show_in?: InputMaybe>>; + show_not?: InputMaybe; + show_not_contains?: InputMaybe; + show_not_in?: InputMaybe>>; + sys?: InputMaybe; + today?: InputMaybe; + today_contains?: InputMaybe; + today_exists?: InputMaybe; + today_in?: InputMaybe>>; + today_not?: InputMaybe; + today_not_contains?: InputMaybe; + today_not_in?: InputMaybe>>; + yesterday?: InputMaybe; + yesterday_contains?: InputMaybe; + yesterday_exists?: InputMaybe; + yesterday_in?: InputMaybe>>; + yesterday_not?: InputMaybe; + yesterday_not_contains?: InputMaybe; + yesterday_not_in?: InputMaybe>>; +}; + +export type CfPageNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + hasOwnTitle?: InputMaybe; + hasOwnTitle_exists?: InputMaybe; + hasOwnTitle_not?: InputMaybe; + parent_exists?: InputMaybe; + seo_exists?: InputMaybe; + slug?: InputMaybe; + slug_contains?: InputMaybe; + slug_exists?: InputMaybe; + slug_in?: InputMaybe>>; + slug_not?: InputMaybe; + slug_not_contains?: InputMaybe; + slug_not_in?: InputMaybe>>; + sys?: InputMaybe; + template_exists?: InputMaybe; +}; + +export type CfPageOneColumnTemplateNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + mainSlotCollection_exists?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type CfPageSeoNestedFilter = { + AND?: InputMaybe>>; + OR?: InputMaybe>>; + contentfulMetadata?: InputMaybe; + description?: InputMaybe; + description_contains?: InputMaybe; + description_exists?: InputMaybe; + description_in?: InputMaybe>>; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_in?: InputMaybe>>; + keywords_contains_all?: InputMaybe>>; + keywords_contains_none?: InputMaybe>>; + keywords_contains_some?: InputMaybe>>; + keywords_exists?: InputMaybe; + noFollow?: InputMaybe; + noFollow_exists?: InputMaybe; + noFollow_not?: InputMaybe; + noIndex?: InputMaybe; + noIndex_exists?: InputMaybe; + noIndex_not?: InputMaybe; + sys?: InputMaybe; + title?: InputMaybe; + title_contains?: InputMaybe; + title_exists?: InputMaybe; + title_in?: InputMaybe>>; + title_not?: InputMaybe; + title_not_contains?: InputMaybe; + title_not_in?: InputMaybe>>; +}; + +export type ResolverTypeWrapper = Promise | T; + +export type ResolverWithResolve = { + resolve: ResolverFn; +}; +export type Resolver = + | ResolverFn + | ResolverWithResolve; + +export type ResolverFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo, +) => Promise | TResult; + +export type SubscriptionSubscribeFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo, +) => AsyncIterable | Promise>; + +export type SubscriptionResolveFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo, +) => TResult | Promise; + +export interface SubscriptionSubscriberObject { + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; + resolve?: SubscriptionResolveFn; +} + +export interface SubscriptionResolverObject { + subscribe: SubscriptionSubscribeFn; + resolve: SubscriptionResolveFn; +} + +export type SubscriptionObject = + | SubscriptionSubscriberObject + | SubscriptionResolverObject; + +export type SubscriptionResolver = + | ((...args: any[]) => SubscriptionObject) + | SubscriptionObject; + +export type TypeResolveFn = ( + parent: TParent, + context: TContext, + info: GraphQLResolveInfo, +) => Maybe | Promise>; + +export type IsTypeOfResolverFn = ( + obj: T, + context: TContext, + info: GraphQLResolveInfo, +) => boolean | Promise; + +export type NextResolverFn = () => Promise; + +export type DirectiveResolverFn = ( + next: NextResolverFn, + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo, +) => TResult | Promise; + +/** Mapping of union types */ +export type ResolversUnionTypes<_RefType extends Record> = { + BlockContent: + | (Omit & { + banner?: Maybe<_RefType['ComponentBanner']>; + itemsCollection?: Maybe<_RefType['BlockFaqItemsCollection']>; + linkedFrom?: Maybe<_RefType['BlockFaqLinkingCollections']>; + }) + | (Omit< + BlockTicketList, + 'fieldsCollection' | 'labels' | 'linkedFrom' | 'noResults' | 'pagination' | 'table' + > & { + fieldsCollection?: Maybe<_RefType['BlockTicketListFieldsCollection']>; + labels?: Maybe<_RefType['DataConfigurableTexts']>; + linkedFrom?: Maybe<_RefType['BlockTicketListLinkingCollections']>; + noResults?: Maybe<_RefType['ComponentNoResult']>; + pagination?: Maybe<_RefType['ComponentPagination']>; + table?: Maybe<_RefType['ComponentTable']>; + }); +}; + +/** Mapping of interface types */ +export type ResolversInterfaceTypes<_RefType extends Record> = { + Entry: + | (Omit & { + content?: Maybe<_RefType['BlockContent']>; + linkedFrom?: Maybe<_RefType['BlockLinkingCollections']>; + }) + | (Omit & { + banner?: Maybe<_RefType['ComponentBanner']>; + itemsCollection?: Maybe<_RefType['BlockFaqItemsCollection']>; + linkedFrom?: Maybe<_RefType['BlockFaqLinkingCollections']>; + }) + | (Omit< + BlockTicketList, + 'fieldsCollection' | 'labels' | 'linkedFrom' | 'noResults' | 'pagination' | 'table' + > & { + fieldsCollection?: Maybe<_RefType['BlockTicketListFieldsCollection']>; + labels?: Maybe<_RefType['DataConfigurableTexts']>; + linkedFrom?: Maybe<_RefType['BlockTicketListLinkingCollections']>; + noResults?: Maybe<_RefType['ComponentNoResult']>; + pagination?: Maybe<_RefType['ComponentPagination']>; + table?: Maybe<_RefType['ComponentTable']>; + }) + | (Omit & { + link?: Maybe<_RefType['ComponentLink']>; + linkedFrom?: Maybe<_RefType['ComponentBannerLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentFaqItemLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentFieldMappingLinkingCollections']>; + valuesCollection?: Maybe<_RefType['ComponentFieldMappingValuesCollection']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentKeyValueLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentLinkLinkingCollections']>; + page?: Maybe<_RefType['Page']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentNoResultLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentPaginationLinkingCollections']>; + }) + | (Omit & { + columnsCollection?: Maybe<_RefType['ComponentTableColumnsCollection']>; + linkedFrom?: Maybe<_RefType['ComponentTableLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentTableColumnLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['DataConfigurableTextsLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['PageLinkingCollections']>; + parent?: Maybe<_RefType['Page']>; + seo?: Maybe<_RefType['PageSeo']>; + template?: Maybe<_RefType['PageOneColumnTemplate']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['PageOneColumnTemplateLinkingCollections']>; + mainSlotCollection?: Maybe<_RefType['PageOneColumnTemplateMainSlotCollection']>; + }) + | (Omit & { linkedFrom?: Maybe<_RefType['PageSeoLinkingCollections']> }); + _Node: + | (Omit & { + content?: Maybe<_RefType['BlockContent']>; + linkedFrom?: Maybe<_RefType['BlockLinkingCollections']>; + }) + | (Omit & { + banner?: Maybe<_RefType['ComponentBanner']>; + itemsCollection?: Maybe<_RefType['BlockFaqItemsCollection']>; + linkedFrom?: Maybe<_RefType['BlockFaqLinkingCollections']>; + }) + | (Omit< + BlockTicketList, + 'fieldsCollection' | 'labels' | 'linkedFrom' | 'noResults' | 'pagination' | 'table' + > & { + fieldsCollection?: Maybe<_RefType['BlockTicketListFieldsCollection']>; + labels?: Maybe<_RefType['DataConfigurableTexts']>; + linkedFrom?: Maybe<_RefType['BlockTicketListLinkingCollections']>; + noResults?: Maybe<_RefType['ComponentNoResult']>; + pagination?: Maybe<_RefType['ComponentPagination']>; + table?: Maybe<_RefType['ComponentTable']>; + }) + | (Omit & { + link?: Maybe<_RefType['ComponentLink']>; + linkedFrom?: Maybe<_RefType['ComponentBannerLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentFaqItemLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentFieldMappingLinkingCollections']>; + valuesCollection?: Maybe<_RefType['ComponentFieldMappingValuesCollection']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentKeyValueLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentLinkLinkingCollections']>; + page?: Maybe<_RefType['Page']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentNoResultLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentPaginationLinkingCollections']>; + }) + | (Omit & { + columnsCollection?: Maybe<_RefType['ComponentTableColumnsCollection']>; + linkedFrom?: Maybe<_RefType['ComponentTableLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['ComponentTableColumnLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['DataConfigurableTextsLinkingCollections']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['PageLinkingCollections']>; + parent?: Maybe<_RefType['Page']>; + seo?: Maybe<_RefType['PageSeo']>; + template?: Maybe<_RefType['PageOneColumnTemplate']>; + }) + | (Omit & { + linkedFrom?: Maybe<_RefType['PageOneColumnTemplateLinkingCollections']>; + mainSlotCollection?: Maybe<_RefType['PageOneColumnTemplateMainSlotCollection']>; + }) + | (Omit & { linkedFrom?: Maybe<_RefType['PageSeoLinkingCollections']> }); +}; + +/** Mapping between all available schema types and the resolvers types */ +export type ResolversTypes = { + Asset: ResolverTypeWrapper< + Omit & { linkedFrom?: Maybe } + >; + AssetCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + AssetFilter: AssetFilter; + AssetLinkingCollections: ResolverTypeWrapper< + Omit & { + entryCollection?: Maybe; + } + >; + AssetOrder: AssetOrder; + Block: ResolverTypeWrapper< + Omit & { + content?: Maybe; + linkedFrom?: Maybe; + } + >; + BlockCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + BlockContent: ResolverTypeWrapper['BlockContent']>; + BlockFaq: ResolverTypeWrapper< + Omit & { + banner?: Maybe; + itemsCollection?: Maybe; + linkedFrom?: Maybe; + } + >; + BlockFaqCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + BlockFaqFilter: BlockFaqFilter; + BlockFaqItemsCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + BlockFaqItemsCollectionOrder: BlockFaqItemsCollectionOrder; + BlockFaqLinkingCollections: ResolverTypeWrapper< + Omit & { + blockCollection?: Maybe; + entryCollection?: Maybe; + } + >; + BlockFaqLinkingCollectionsBlockCollectionOrder: BlockFaqLinkingCollectionsBlockCollectionOrder; + BlockFaqOrder: BlockFaqOrder; + BlockFilter: BlockFilter; + BlockLinkingCollections: ResolverTypeWrapper< + Omit & { + entryCollection?: Maybe; + pageOneColumnTemplateCollection?: Maybe; + } + >; + BlockLinkingCollectionsPageOneColumnTemplateCollectionOrder: BlockLinkingCollectionsPageOneColumnTemplateCollectionOrder; + BlockOrder: BlockOrder; + BlockTicketList: ResolverTypeWrapper< + Omit & { + fieldsCollection?: Maybe; + labels?: Maybe; + linkedFrom?: Maybe; + noResults?: Maybe; + pagination?: Maybe; + table?: Maybe; + } + >; + BlockTicketListCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + BlockTicketListFieldsCollection: ResolverTypeWrapper< + Omit & { + items: Array>; + } + >; + BlockTicketListFieldsCollectionOrder: BlockTicketListFieldsCollectionOrder; + BlockTicketListFilter: BlockTicketListFilter; + BlockTicketListLinkingCollections: ResolverTypeWrapper< + Omit & { + blockCollection?: Maybe; + entryCollection?: Maybe; + } + >; + BlockTicketListLinkingCollectionsBlockCollectionOrder: BlockTicketListLinkingCollectionsBlockCollectionOrder; + BlockTicketListOrder: BlockTicketListOrder; + Boolean: ResolverTypeWrapper; + ComponentBanner: ResolverTypeWrapper< + Omit & { + link?: Maybe; + linkedFrom?: Maybe; + } + >; + ComponentBannerCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentBannerFilter: ComponentBannerFilter; + ComponentBannerLinkingCollections: ResolverTypeWrapper< + Omit & { + blockFaqCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentBannerLinkingCollectionsBlockFaqCollectionOrder: ComponentBannerLinkingCollectionsBlockFaqCollectionOrder; + ComponentBannerOrder: ComponentBannerOrder; + ComponentFaqItem: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + } + >; + ComponentFaqItemCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentFaqItemFilter: ComponentFaqItemFilter; + ComponentFaqItemLinkingCollections: ResolverTypeWrapper< + Omit & { + blockFaqCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentFaqItemLinkingCollectionsBlockFaqCollectionOrder: ComponentFaqItemLinkingCollectionsBlockFaqCollectionOrder; + ComponentFaqItemOrder: ComponentFaqItemOrder; + ComponentFieldMapping: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + valuesCollection?: Maybe; + } + >; + ComponentFieldMappingCollection: ResolverTypeWrapper< + Omit & { + items: Array>; + } + >; + ComponentFieldMappingFilter: ComponentFieldMappingFilter; + ComponentFieldMappingLinkingCollections: ResolverTypeWrapper< + Omit & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentFieldMappingLinkingCollectionsBlockTicketListCollectionOrder: ComponentFieldMappingLinkingCollectionsBlockTicketListCollectionOrder; + ComponentFieldMappingOrder: ComponentFieldMappingOrder; + ComponentFieldMappingValuesCollection: ResolverTypeWrapper< + Omit & { + items: Array>; + } + >; + ComponentFieldMappingValuesCollectionOrder: ComponentFieldMappingValuesCollectionOrder; + ComponentKeyValue: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + } + >; + ComponentKeyValueCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentKeyValueFilter: ComponentKeyValueFilter; + ComponentKeyValueLinkingCollections: ResolverTypeWrapper< + Omit & { + componentFieldMappingCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentKeyValueLinkingCollectionsComponentFieldMappingCollectionOrder: ComponentKeyValueLinkingCollectionsComponentFieldMappingCollectionOrder; + ComponentKeyValueOrder: ComponentKeyValueOrder; + ComponentLink: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + page?: Maybe; + } + >; + ComponentLinkCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentLinkFilter: ComponentLinkFilter; + ComponentLinkLinkingCollections: ResolverTypeWrapper< + Omit & { + componentBannerCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentLinkLinkingCollectionsComponentBannerCollectionOrder: ComponentLinkLinkingCollectionsComponentBannerCollectionOrder; + ComponentLinkOrder: ComponentLinkOrder; + ComponentNoResult: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + } + >; + ComponentNoResultCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentNoResultFilter: ComponentNoResultFilter; + ComponentNoResultLinkingCollections: ResolverTypeWrapper< + Omit & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentNoResultLinkingCollectionsBlockTicketListCollectionOrder: ComponentNoResultLinkingCollectionsBlockTicketListCollectionOrder; + ComponentNoResultOrder: ComponentNoResultOrder; + ComponentPagination: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + } + >; + ComponentPaginationCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentPaginationFilter: ComponentPaginationFilter; + ComponentPaginationLinkingCollections: ResolverTypeWrapper< + Omit & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentPaginationLinkingCollectionsBlockTicketListCollectionOrder: ComponentPaginationLinkingCollectionsBlockTicketListCollectionOrder; + ComponentPaginationOrder: ComponentPaginationOrder; + ComponentTable: ResolverTypeWrapper< + Omit & { + columnsCollection?: Maybe; + linkedFrom?: Maybe; + } + >; + ComponentTableCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentTableColumn: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + } + >; + ComponentTableColumnCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentTableColumnFilter: ComponentTableColumnFilter; + ComponentTableColumnLinkingCollections: ResolverTypeWrapper< + Omit & { + componentTableCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentTableColumnLinkingCollectionsComponentTableCollectionOrder: ComponentTableColumnLinkingCollectionsComponentTableCollectionOrder; + ComponentTableColumnOrder: ComponentTableColumnOrder; + ComponentTableColumnsCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + ComponentTableColumnsCollectionOrder: ComponentTableColumnsCollectionOrder; + ComponentTableFilter: ComponentTableFilter; + ComponentTableLinkingCollections: ResolverTypeWrapper< + Omit & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + } + >; + ComponentTableLinkingCollectionsBlockTicketListCollectionOrder: ComponentTableLinkingCollectionsBlockTicketListCollectionOrder; + ComponentTableOrder: ComponentTableOrder; + ContentfulMetadata: ResolverTypeWrapper; + ContentfulMetadataConceptsDescendantsFilter: ContentfulMetadataConceptsDescendantsFilter; + ContentfulMetadataConceptsFilter: ContentfulMetadataConceptsFilter; + ContentfulMetadataFilter: ContentfulMetadataFilter; + ContentfulMetadataTagsFilter: ContentfulMetadataTagsFilter; + ContentfulTag: ResolverTypeWrapper; + DataConfigurableTexts: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + } + >; + DataConfigurableTextsCollection: ResolverTypeWrapper< + Omit & { + items: Array>; + } + >; + DataConfigurableTextsFilter: DataConfigurableTextsFilter; + DataConfigurableTextsLinkingCollections: ResolverTypeWrapper< + Omit & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + } + >; + DataConfigurableTextsLinkingCollectionsBlockTicketListCollectionOrder: DataConfigurableTextsLinkingCollectionsBlockTicketListCollectionOrder; + DataConfigurableTextsOrder: DataConfigurableTextsOrder; + DateTime: ResolverTypeWrapper; + Dimension: ResolverTypeWrapper; + Entry: ResolverTypeWrapper['Entry']>; + EntryCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + EntryFilter: EntryFilter; + EntryOrder: EntryOrder; + Float: ResolverTypeWrapper; + HexColor: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + ImageFormat: ImageFormat; + ImageResizeFocus: ImageResizeFocus; + ImageResizeStrategy: ImageResizeStrategy; + ImageTransformOptions: ImageTransformOptions; + Int: ResolverTypeWrapper; + JSON: ResolverTypeWrapper; + Page: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + parent?: Maybe; + seo?: Maybe; + template?: Maybe; + } + >; + PageCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + PageFilter: PageFilter; + PageLinkingCollections: ResolverTypeWrapper< + Omit & { + componentLinkCollection?: Maybe; + entryCollection?: Maybe; + pageCollection?: Maybe; + } + >; + PageLinkingCollectionsComponentLinkCollectionOrder: PageLinkingCollectionsComponentLinkCollectionOrder; + PageLinkingCollectionsPageCollectionOrder: PageLinkingCollectionsPageCollectionOrder; + PageOneColumnTemplate: ResolverTypeWrapper< + Omit & { + linkedFrom?: Maybe; + mainSlotCollection?: Maybe; + } + >; + PageOneColumnTemplateCollection: ResolverTypeWrapper< + Omit & { + items: Array>; + } + >; + PageOneColumnTemplateFilter: PageOneColumnTemplateFilter; + PageOneColumnTemplateLinkingCollections: ResolverTypeWrapper< + Omit & { + entryCollection?: Maybe; + pageCollection?: Maybe; + } + >; + PageOneColumnTemplateLinkingCollectionsPageCollectionOrder: PageOneColumnTemplateLinkingCollectionsPageCollectionOrder; + PageOneColumnTemplateMainSlotCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + PageOneColumnTemplateMainSlotCollectionOrder: PageOneColumnTemplateMainSlotCollectionOrder; + PageOneColumnTemplateOrder: PageOneColumnTemplateOrder; + PageOrder: PageOrder; + PageSeo: ResolverTypeWrapper< + Omit & { linkedFrom?: Maybe } + >; + PageSeoCollection: ResolverTypeWrapper< + Omit & { items: Array> } + >; + PageSeoFilter: PageSeoFilter; + PageSeoLinkingCollections: ResolverTypeWrapper< + Omit & { + entryCollection?: Maybe; + pageCollection?: Maybe; + } + >; + PageSeoLinkingCollectionsPageCollectionOrder: PageSeoLinkingCollectionsPageCollectionOrder; + PageSeoOrder: PageSeoOrder; + Quality: ResolverTypeWrapper; + Query: ResolverTypeWrapper<{}>; + String: ResolverTypeWrapper; + Sys: ResolverTypeWrapper; + SysFilter: SysFilter; + TaxonomyConcept: ResolverTypeWrapper; + TimelineFilterInput: TimelineFilterInput; + _Node: ResolverTypeWrapper['_Node']>; + cfBlockNestedFilter: CfBlockNestedFilter; + cfComponentBannerNestedFilter: CfComponentBannerNestedFilter; + cfComponentFaqItemNestedFilter: CfComponentFaqItemNestedFilter; + cfComponentFieldMappingNestedFilter: CfComponentFieldMappingNestedFilter; + cfComponentKeyValueNestedFilter: CfComponentKeyValueNestedFilter; + cfComponentLinkNestedFilter: CfComponentLinkNestedFilter; + cfComponentNoResultNestedFilter: CfComponentNoResultNestedFilter; + cfComponentPaginationNestedFilter: CfComponentPaginationNestedFilter; + cfComponentTableColumnNestedFilter: CfComponentTableColumnNestedFilter; + cfComponentTableNestedFilter: CfComponentTableNestedFilter; + cfDataConfigurableTextsNestedFilter: CfDataConfigurableTextsNestedFilter; + cfPageNestedFilter: CfPageNestedFilter; + cfPageOneColumnTemplateNestedFilter: CfPageOneColumnTemplateNestedFilter; + cfPageSeoNestedFilter: CfPageSeoNestedFilter; +}; + +/** Mapping between all available schema types and the resolvers parents */ +export type ResolversParentTypes = { + Asset: Omit & { linkedFrom?: Maybe }; + AssetCollection: Omit & { items: Array> }; + AssetFilter: AssetFilter; + AssetLinkingCollections: Omit & { + entryCollection?: Maybe; + }; + Block: Omit & { + content?: Maybe; + linkedFrom?: Maybe; + }; + BlockCollection: Omit & { items: Array> }; + BlockContent: ResolversUnionTypes['BlockContent']; + BlockFaq: Omit & { + banner?: Maybe; + itemsCollection?: Maybe; + linkedFrom?: Maybe; + }; + BlockFaqCollection: Omit & { items: Array> }; + BlockFaqFilter: BlockFaqFilter; + BlockFaqItemsCollection: Omit & { + items: Array>; + }; + BlockFaqLinkingCollections: Omit & { + blockCollection?: Maybe; + entryCollection?: Maybe; + }; + BlockFilter: BlockFilter; + BlockLinkingCollections: Omit & { + entryCollection?: Maybe; + pageOneColumnTemplateCollection?: Maybe; + }; + BlockTicketList: Omit< + BlockTicketList, + 'fieldsCollection' | 'labels' | 'linkedFrom' | 'noResults' | 'pagination' | 'table' + > & { + fieldsCollection?: Maybe; + labels?: Maybe; + linkedFrom?: Maybe; + noResults?: Maybe; + pagination?: Maybe; + table?: Maybe; + }; + BlockTicketListCollection: Omit & { + items: Array>; + }; + BlockTicketListFieldsCollection: Omit & { + items: Array>; + }; + BlockTicketListFilter: BlockTicketListFilter; + BlockTicketListLinkingCollections: Omit< + BlockTicketListLinkingCollections, + 'blockCollection' | 'entryCollection' + > & { + blockCollection?: Maybe; + entryCollection?: Maybe; + }; + Boolean: Scalars['Boolean']['output']; + ComponentBanner: Omit & { + link?: Maybe; + linkedFrom?: Maybe; + }; + ComponentBannerCollection: Omit & { + items: Array>; + }; + ComponentBannerFilter: ComponentBannerFilter; + ComponentBannerLinkingCollections: Omit< + ComponentBannerLinkingCollections, + 'blockFaqCollection' | 'entryCollection' + > & { + blockFaqCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentFaqItem: Omit & { + linkedFrom?: Maybe; + }; + ComponentFaqItemCollection: Omit & { + items: Array>; + }; + ComponentFaqItemFilter: ComponentFaqItemFilter; + ComponentFaqItemLinkingCollections: Omit< + ComponentFaqItemLinkingCollections, + 'blockFaqCollection' | 'entryCollection' + > & { + blockFaqCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentFieldMapping: Omit & { + linkedFrom?: Maybe; + valuesCollection?: Maybe; + }; + ComponentFieldMappingCollection: Omit & { + items: Array>; + }; + ComponentFieldMappingFilter: ComponentFieldMappingFilter; + ComponentFieldMappingLinkingCollections: Omit< + ComponentFieldMappingLinkingCollections, + 'blockTicketListCollection' | 'entryCollection' + > & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentFieldMappingValuesCollection: Omit & { + items: Array>; + }; + ComponentKeyValue: Omit & { + linkedFrom?: Maybe; + }; + ComponentKeyValueCollection: Omit & { + items: Array>; + }; + ComponentKeyValueFilter: ComponentKeyValueFilter; + ComponentKeyValueLinkingCollections: Omit< + ComponentKeyValueLinkingCollections, + 'componentFieldMappingCollection' | 'entryCollection' + > & { + componentFieldMappingCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentLink: Omit & { + linkedFrom?: Maybe; + page?: Maybe; + }; + ComponentLinkCollection: Omit & { + items: Array>; + }; + ComponentLinkFilter: ComponentLinkFilter; + ComponentLinkLinkingCollections: Omit< + ComponentLinkLinkingCollections, + 'componentBannerCollection' | 'entryCollection' + > & { + componentBannerCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentNoResult: Omit & { + linkedFrom?: Maybe; + }; + ComponentNoResultCollection: Omit & { + items: Array>; + }; + ComponentNoResultFilter: ComponentNoResultFilter; + ComponentNoResultLinkingCollections: Omit< + ComponentNoResultLinkingCollections, + 'blockTicketListCollection' | 'entryCollection' + > & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentPagination: Omit & { + linkedFrom?: Maybe; + }; + ComponentPaginationCollection: Omit & { + items: Array>; + }; + ComponentPaginationFilter: ComponentPaginationFilter; + ComponentPaginationLinkingCollections: Omit< + ComponentPaginationLinkingCollections, + 'blockTicketListCollection' | 'entryCollection' + > & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentTable: Omit & { + columnsCollection?: Maybe; + linkedFrom?: Maybe; + }; + ComponentTableCollection: Omit & { + items: Array>; + }; + ComponentTableColumn: Omit & { + linkedFrom?: Maybe; + }; + ComponentTableColumnCollection: Omit & { + items: Array>; + }; + ComponentTableColumnFilter: ComponentTableColumnFilter; + ComponentTableColumnLinkingCollections: Omit< + ComponentTableColumnLinkingCollections, + 'componentTableCollection' | 'entryCollection' + > & { + componentTableCollection?: Maybe; + entryCollection?: Maybe; + }; + ComponentTableColumnsCollection: Omit & { + items: Array>; + }; + ComponentTableFilter: ComponentTableFilter; + ComponentTableLinkingCollections: Omit< + ComponentTableLinkingCollections, + 'blockTicketListCollection' | 'entryCollection' + > & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + }; + ContentfulMetadata: ContentfulMetadata; + ContentfulMetadataConceptsDescendantsFilter: ContentfulMetadataConceptsDescendantsFilter; + ContentfulMetadataConceptsFilter: ContentfulMetadataConceptsFilter; + ContentfulMetadataFilter: ContentfulMetadataFilter; + ContentfulMetadataTagsFilter: ContentfulMetadataTagsFilter; + ContentfulTag: ContentfulTag; + DataConfigurableTexts: Omit & { + linkedFrom?: Maybe; + }; + DataConfigurableTextsCollection: Omit & { + items: Array>; + }; + DataConfigurableTextsFilter: DataConfigurableTextsFilter; + DataConfigurableTextsLinkingCollections: Omit< + DataConfigurableTextsLinkingCollections, + 'blockTicketListCollection' | 'entryCollection' + > & { + blockTicketListCollection?: Maybe; + entryCollection?: Maybe; + }; + DateTime: Scalars['DateTime']['output']; + Dimension: Scalars['Dimension']['output']; + Entry: ResolversInterfaceTypes['Entry']; + EntryCollection: Omit & { items: Array> }; + EntryFilter: EntryFilter; + Float: Scalars['Float']['output']; + HexColor: Scalars['HexColor']['output']; + ID: Scalars['ID']['output']; + ImageTransformOptions: ImageTransformOptions; + Int: Scalars['Int']['output']; + JSON: Scalars['JSON']['output']; + Page: Omit & { + linkedFrom?: Maybe; + parent?: Maybe; + seo?: Maybe; + template?: Maybe; + }; + PageCollection: Omit & { items: Array> }; + PageFilter: PageFilter; + PageLinkingCollections: Omit< + PageLinkingCollections, + 'componentLinkCollection' | 'entryCollection' | 'pageCollection' + > & { + componentLinkCollection?: Maybe; + entryCollection?: Maybe; + pageCollection?: Maybe; + }; + PageOneColumnTemplate: Omit & { + linkedFrom?: Maybe; + mainSlotCollection?: Maybe; + }; + PageOneColumnTemplateCollection: Omit & { + items: Array>; + }; + PageOneColumnTemplateFilter: PageOneColumnTemplateFilter; + PageOneColumnTemplateLinkingCollections: Omit< + PageOneColumnTemplateLinkingCollections, + 'entryCollection' | 'pageCollection' + > & { + entryCollection?: Maybe; + pageCollection?: Maybe; + }; + PageOneColumnTemplateMainSlotCollection: Omit & { + items: Array>; + }; + PageSeo: Omit & { linkedFrom?: Maybe }; + PageSeoCollection: Omit & { items: Array> }; + PageSeoFilter: PageSeoFilter; + PageSeoLinkingCollections: Omit & { + entryCollection?: Maybe; + pageCollection?: Maybe; + }; + Quality: Scalars['Quality']['output']; + Query: {}; + String: Scalars['String']['output']; + Sys: Sys; + SysFilter: SysFilter; + TaxonomyConcept: TaxonomyConcept; + TimelineFilterInput: TimelineFilterInput; + _Node: ResolversInterfaceTypes['_Node']; + cfBlockNestedFilter: CfBlockNestedFilter; + cfComponentBannerNestedFilter: CfComponentBannerNestedFilter; + cfComponentFaqItemNestedFilter: CfComponentFaqItemNestedFilter; + cfComponentFieldMappingNestedFilter: CfComponentFieldMappingNestedFilter; + cfComponentKeyValueNestedFilter: CfComponentKeyValueNestedFilter; + cfComponentLinkNestedFilter: CfComponentLinkNestedFilter; + cfComponentNoResultNestedFilter: CfComponentNoResultNestedFilter; + cfComponentPaginationNestedFilter: CfComponentPaginationNestedFilter; + cfComponentTableColumnNestedFilter: CfComponentTableColumnNestedFilter; + cfComponentTableNestedFilter: CfComponentTableNestedFilter; + cfDataConfigurableTextsNestedFilter: CfDataConfigurableTextsNestedFilter; + cfPageNestedFilter: CfPageNestedFilter; + cfPageOneColumnTemplateNestedFilter: CfPageOneColumnTemplateNestedFilter; + cfPageSeoNestedFilter: CfPageSeoNestedFilter; +}; + +export type ContentSourceMapsDirectiveArgs = {}; + +export type ContentSourceMapsDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = ContentSourceMapsDirectiveArgs, +> = DirectiveResolverFn; + +export type ContentfulSchemaMetadataDirectiveArgs = { + contentTypePublishedCounters?: Maybe; +}; + +export type ContentfulSchemaMetadataDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = ContentfulSchemaMetadataDirectiveArgs, +> = DirectiveResolverFn; + +export type DelegatedResourceLinkDirectiveArgs = { + contentTypeId?: Maybe; + field?: Maybe; +}; + +export type DelegatedResourceLinkDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = DelegatedResourceLinkDirectiveArgs, +> = DirectiveResolverFn; + +export type EnumMapperDirectiveArgs = { + value?: Maybe; +}; + +export type EnumMapperDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = EnumMapperDirectiveArgs, +> = DirectiveResolverFn; + +export type FeatureFlagDirectiveArgs = { + featureName?: Maybe; +}; + +export type FeatureFlagDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = FeatureFlagDirectiveArgs, +> = DirectiveResolverFn; + +export type FieldResolverDirectiveArgs = { + data?: Maybe; + kind?: Maybe; +}; + +export type FieldResolverDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = FieldResolverDirectiveArgs, +> = DirectiveResolverFn; + +export type TimelineDirectiveArgs = { + where: TimelineFilterInput; +}; + +export type TimelineDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = TimelineDirectiveArgs, +> = DirectiveResolverFn; + +export type TypeIdentifierDirectiveArgs = { + contentTypeId?: Maybe; +}; + +export type TypeIdentifierDirectiveResolver< + Result, + Parent, + ContextType = any, + Args = TypeIdentifierDirectiveArgs, +> = DirectiveResolverFn; + +export type AssetResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['Asset'] = ResolversParentTypes['Asset'], +> = { + contentType?: Resolver, ParentType, ContextType, Partial>; + contentfulMetadata?: Resolver; + description?: Resolver, ParentType, ContextType, Partial>; + fileName?: Resolver, ParentType, ContextType, Partial>; + height?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + size?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + url?: Resolver, ParentType, ContextType, Partial>; + width?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type AssetCollectionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['AssetCollection'] = ResolversParentTypes['AssetCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type AssetLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['AssetLinkingCollections'] = ResolversParentTypes['AssetLinkingCollections'], +> = { + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['Block'] = ResolversParentTypes['Block'], +> = { + _id?: Resolver; + content?: Resolver, ParentType, ContextType, Partial>; + contentfulMetadata?: Resolver; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + name?: Resolver, ParentType, ContextType, Partial>; + spacing?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockCollectionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['BlockCollection'] = ResolversParentTypes['BlockCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockContentResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['BlockContent'] = ResolversParentTypes['BlockContent'], +> = { + __resolveType: TypeResolveFn<'BlockFaq' | 'BlockTicketList', ParentType, ContextType>; +}; + +export type BlockFaqResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['BlockFaq'] = ResolversParentTypes['BlockFaq'], +> = { + _id?: Resolver; + banner?: Resolver, ParentType, ContextType, Partial>; + contentfulMetadata?: Resolver; + itemsCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + subtitle?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockFaqCollectionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['BlockFaqCollection'] = ResolversParentTypes['BlockFaqCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockFaqItemsCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['BlockFaqItemsCollection'] = ResolversParentTypes['BlockFaqItemsCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockFaqLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['BlockFaqLinkingCollections'] = ResolversParentTypes['BlockFaqLinkingCollections'], +> = { + blockCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['BlockLinkingCollections'] = ResolversParentTypes['BlockLinkingCollections'], +> = { + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageOneColumnTemplateCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockTicketListResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['BlockTicketList'] = ResolversParentTypes['BlockTicketList'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + detailsUrl?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + fieldsCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + labels?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + noResults?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + pagination?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + subTitle?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + table?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockTicketListCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['BlockTicketListCollection'] = ResolversParentTypes['BlockTicketListCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockTicketListFieldsCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['BlockTicketListFieldsCollection'] = ResolversParentTypes['BlockTicketListFieldsCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BlockTicketListLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['BlockTicketListLinkingCollections'] = ResolversParentTypes['BlockTicketListLinkingCollections'], +> = { + blockCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentBannerResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentBanner'] = ResolversParentTypes['ComponentBanner'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + description?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + link?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentBannerCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentBannerCollection'] = ResolversParentTypes['ComponentBannerCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentBannerLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentBannerLinkingCollections'] = ResolversParentTypes['ComponentBannerLinkingCollections'], +> = { + blockFaqCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFaqItemResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentFaqItem'] = ResolversParentTypes['ComponentFaqItem'], +> = { + _id?: Resolver; + content?: Resolver, ParentType, ContextType, Partial>; + contentfulMetadata?: Resolver; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFaqItemCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentFaqItemCollection'] = ResolversParentTypes['ComponentFaqItemCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFaqItemLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentFaqItemLinkingCollections'] = ResolversParentTypes['ComponentFaqItemLinkingCollections'], +> = { + blockFaqCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFieldMappingResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentFieldMapping'] = ResolversParentTypes['ComponentFieldMapping'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + name?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + valuesCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFieldMappingCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentFieldMappingCollection'] = ResolversParentTypes['ComponentFieldMappingCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFieldMappingLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentFieldMappingLinkingCollections'] = ResolversParentTypes['ComponentFieldMappingLinkingCollections'], +> = { + blockTicketListCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentFieldMappingValuesCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentFieldMappingValuesCollection'] = ResolversParentTypes['ComponentFieldMappingValuesCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentKeyValueResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentKeyValue'] = ResolversParentTypes['ComponentKeyValue'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + key?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + value?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentKeyValueCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentKeyValueCollection'] = ResolversParentTypes['ComponentKeyValueCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentKeyValueLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentKeyValueLinkingCollections'] = ResolversParentTypes['ComponentKeyValueLinkingCollections'], +> = { + componentFieldMappingCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentLinkResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentLink'] = ResolversParentTypes['ComponentLink'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + label?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + page?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + url?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentLinkCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentLinkCollection'] = ResolversParentTypes['ComponentLinkCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentLinkLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentLinkLinkingCollections'] = ResolversParentTypes['ComponentLinkLinkingCollections'], +> = { + componentBannerCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentNoResultResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentNoResult'] = ResolversParentTypes['ComponentNoResult'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + description?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentNoResultCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentNoResultCollection'] = ResolversParentTypes['ComponentNoResultCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentNoResultLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentNoResultLinkingCollections'] = ResolversParentTypes['ComponentNoResultLinkingCollections'], +> = { + blockTicketListCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentPaginationResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentPagination'] = ResolversParentTypes['ComponentPagination'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + description?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + nextLabel?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + perPage?: Resolver, ParentType, ContextType, Partial>; + previousLabel?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + selectPageLabel?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentPaginationCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentPaginationCollection'] = ResolversParentTypes['ComponentPaginationCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentPaginationLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentPaginationLinkingCollections'] = ResolversParentTypes['ComponentPaginationLinkingCollections'], +> = { + blockTicketListCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentTable'] = ResolversParentTypes['ComponentTable'], +> = { + _id?: Resolver; + actionsLabel?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + actionsTitle?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + columnsCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + contentfulMetadata?: Resolver; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentTableCollection'] = ResolversParentTypes['ComponentTableCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableColumnResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ComponentTableColumn'] = ResolversParentTypes['ComponentTableColumn'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + field?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableColumnCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentTableColumnCollection'] = ResolversParentTypes['ComponentTableColumnCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableColumnLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentTableColumnLinkingCollections'] = ResolversParentTypes['ComponentTableColumnLinkingCollections'], +> = { + componentTableCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableColumnsCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentTableColumnsCollection'] = ResolversParentTypes['ComponentTableColumnsCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ComponentTableLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['ComponentTableLinkingCollections'] = ResolversParentTypes['ComponentTableLinkingCollections'], +> = { + blockTicketListCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ContentfulMetadataResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ContentfulMetadata'] = ResolversParentTypes['ContentfulMetadata'], +> = { + concepts?: Resolver>, ParentType, ContextType>; + tags?: Resolver>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ContentfulTagResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['ContentfulTag'] = ResolversParentTypes['ContentfulTag'], +> = { + id?: Resolver, ParentType, ContextType>; + name?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type DataConfigurableTextsResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['DataConfigurableTexts'] = ResolversParentTypes['DataConfigurableTexts'], +> = { + _id?: Resolver; + apply?: Resolver, ParentType, ContextType, Partial>; + cancel?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + clear?: Resolver, ParentType, ContextType, Partial>; + contentfulMetadata?: Resolver; + delete?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + edit?: Resolver, ParentType, ContextType, Partial>; + hide?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + logIn?: Resolver, ParentType, ContextType, Partial>; + logOut?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + renew?: Resolver, ParentType, ContextType, Partial>; + save?: Resolver, ParentType, ContextType, Partial>; + settings?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + show?: Resolver, ParentType, ContextType, Partial>; + showLess?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + showMore?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + sys?: Resolver; + today?: Resolver, ParentType, ContextType, Partial>; + yesterday?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type DataConfigurableTextsCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['DataConfigurableTextsCollection'] = ResolversParentTypes['DataConfigurableTextsCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type DataConfigurableTextsLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['DataConfigurableTextsLinkingCollections'] = ResolversParentTypes['DataConfigurableTextsLinkingCollections'], +> = { + blockTicketListCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig { + name: 'DateTime'; +} + +export interface DimensionScalarConfig extends GraphQLScalarTypeConfig { + name: 'Dimension'; +} + +export type EntryResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['Entry'] = ResolversParentTypes['Entry'], +> = { + __resolveType: TypeResolveFn< + | 'Block' + | 'BlockFaq' + | 'BlockTicketList' + | 'ComponentBanner' + | 'ComponentFaqItem' + | 'ComponentFieldMapping' + | 'ComponentKeyValue' + | 'ComponentLink' + | 'ComponentNoResult' + | 'ComponentPagination' + | 'ComponentTable' + | 'ComponentTableColumn' + | 'DataConfigurableTexts' + | 'Page' + | 'PageOneColumnTemplate' + | 'PageSeo', + ParentType, + ContextType + >; + contentfulMetadata?: Resolver; + sys?: Resolver; +}; + +export type EntryCollectionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['EntryCollection'] = ResolversParentTypes['EntryCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface HexColorScalarConfig extends GraphQLScalarTypeConfig { + name: 'HexColor'; +} + +export interface JsonScalarConfig extends GraphQLScalarTypeConfig { + name: 'JSON'; +} + +export type PageResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['Page'] = ResolversParentTypes['Page'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + hasOwnTitle?: Resolver, ParentType, ContextType, Partial>; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + parent?: Resolver, ParentType, ContextType, Partial>; + seo?: Resolver, ParentType, ContextType, Partial>; + slug?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + template?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageCollectionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['PageCollection'] = ResolversParentTypes['PageCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageLinkingCollectionsResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['PageLinkingCollections'] = ResolversParentTypes['PageLinkingCollections'], +> = { + componentLinkCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageOneColumnTemplateResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['PageOneColumnTemplate'] = ResolversParentTypes['PageOneColumnTemplate'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + mainSlotCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageOneColumnTemplateCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['PageOneColumnTemplateCollection'] = ResolversParentTypes['PageOneColumnTemplateCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageOneColumnTemplateLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['PageOneColumnTemplateLinkingCollections'] = ResolversParentTypes['PageOneColumnTemplateLinkingCollections'], +> = { + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageOneColumnTemplateMainSlotCollectionResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['PageOneColumnTemplateMainSlotCollection'] = ResolversParentTypes['PageOneColumnTemplateMainSlotCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageSeoResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['PageSeo'] = ResolversParentTypes['PageSeo'], +> = { + _id?: Resolver; + contentfulMetadata?: Resolver; + description?: Resolver, ParentType, ContextType, Partial>; + keywords?: Resolver< + Maybe>>, + ParentType, + ContextType, + Partial + >; + linkedFrom?: Resolver< + Maybe, + ParentType, + ContextType, + Partial + >; + noFollow?: Resolver, ParentType, ContextType, Partial>; + noIndex?: Resolver, ParentType, ContextType, Partial>; + sys?: Resolver; + title?: Resolver, ParentType, ContextType, Partial>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageSeoCollectionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['PageSeoCollection'] = ResolversParentTypes['PageSeoCollection'], +> = { + items?: Resolver>, ParentType, ContextType>; + limit?: Resolver; + skip?: Resolver; + total?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PageSeoLinkingCollectionsResolvers< + ContextType = any, + ParentType extends + ResolversParentTypes['PageSeoLinkingCollections'] = ResolversParentTypes['PageSeoLinkingCollections'], +> = { + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface QualityScalarConfig extends GraphQLScalarTypeConfig { + name: 'Quality'; +} + +export type QueryResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query'], +> = { + _node?: Resolver, ParentType, ContextType, RequireFields>; + _nodes?: Resolver< + Array>, + ParentType, + ContextType, + RequireFields + >; + asset?: Resolver, ParentType, ContextType, RequireFields>; + assetCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + block?: Resolver, ParentType, ContextType, RequireFields>; + blockCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + blockFaq?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + blockFaqCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + blockTicketList?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + blockTicketListCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentBanner?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentBannerCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentFaqItem?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentFaqItemCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentFieldMapping?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentFieldMappingCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentKeyValue?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentKeyValueCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentLink?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentLinkCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentNoResult?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentNoResultCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentPagination?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentPaginationCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentTable?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentTableCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentTableColumn?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + componentTableColumnCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + dataConfigurableTexts?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + dataConfigurableTextsCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + entryCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + page?: Resolver, ParentType, ContextType, RequireFields>; + pageCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageOneColumnTemplate?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageOneColumnTemplateCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageSeo?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; + pageSeoCollection?: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + >; +}; + +export type SysResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['Sys'] = ResolversParentTypes['Sys'], +> = { + environmentId?: Resolver; + firstPublishedAt?: Resolver, ParentType, ContextType>; + id?: Resolver; + locale?: Resolver, ParentType, ContextType>; + publishedAt?: Resolver, ParentType, ContextType>; + publishedVersion?: Resolver, ParentType, ContextType>; + spaceId?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type TaxonomyConceptResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['TaxonomyConcept'] = ResolversParentTypes['TaxonomyConcept'], +> = { + id?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type _NodeResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['_Node'] = ResolversParentTypes['_Node'], +> = { + __resolveType: TypeResolveFn< + | 'Block' + | 'BlockFaq' + | 'BlockTicketList' + | 'ComponentBanner' + | 'ComponentFaqItem' + | 'ComponentFieldMapping' + | 'ComponentKeyValue' + | 'ComponentLink' + | 'ComponentNoResult' + | 'ComponentPagination' + | 'ComponentTable' + | 'ComponentTableColumn' + | 'DataConfigurableTexts' + | 'Page' + | 'PageOneColumnTemplate' + | 'PageSeo', + ParentType, + ContextType + >; + _id?: Resolver; +}; + +export type Resolvers = { + Asset?: AssetResolvers; + AssetCollection?: AssetCollectionResolvers; + AssetLinkingCollections?: AssetLinkingCollectionsResolvers; + Block?: BlockResolvers; + BlockCollection?: BlockCollectionResolvers; + BlockContent?: BlockContentResolvers; + BlockFaq?: BlockFaqResolvers; + BlockFaqCollection?: BlockFaqCollectionResolvers; + BlockFaqItemsCollection?: BlockFaqItemsCollectionResolvers; + BlockFaqLinkingCollections?: BlockFaqLinkingCollectionsResolvers; + BlockLinkingCollections?: BlockLinkingCollectionsResolvers; + BlockTicketList?: BlockTicketListResolvers; + BlockTicketListCollection?: BlockTicketListCollectionResolvers; + BlockTicketListFieldsCollection?: BlockTicketListFieldsCollectionResolvers; + BlockTicketListLinkingCollections?: BlockTicketListLinkingCollectionsResolvers; + ComponentBanner?: ComponentBannerResolvers; + ComponentBannerCollection?: ComponentBannerCollectionResolvers; + ComponentBannerLinkingCollections?: ComponentBannerLinkingCollectionsResolvers; + ComponentFaqItem?: ComponentFaqItemResolvers; + ComponentFaqItemCollection?: ComponentFaqItemCollectionResolvers; + ComponentFaqItemLinkingCollections?: ComponentFaqItemLinkingCollectionsResolvers; + ComponentFieldMapping?: ComponentFieldMappingResolvers; + ComponentFieldMappingCollection?: ComponentFieldMappingCollectionResolvers; + ComponentFieldMappingLinkingCollections?: ComponentFieldMappingLinkingCollectionsResolvers; + ComponentFieldMappingValuesCollection?: ComponentFieldMappingValuesCollectionResolvers; + ComponentKeyValue?: ComponentKeyValueResolvers; + ComponentKeyValueCollection?: ComponentKeyValueCollectionResolvers; + ComponentKeyValueLinkingCollections?: ComponentKeyValueLinkingCollectionsResolvers; + ComponentLink?: ComponentLinkResolvers; + ComponentLinkCollection?: ComponentLinkCollectionResolvers; + ComponentLinkLinkingCollections?: ComponentLinkLinkingCollectionsResolvers; + ComponentNoResult?: ComponentNoResultResolvers; + ComponentNoResultCollection?: ComponentNoResultCollectionResolvers; + ComponentNoResultLinkingCollections?: ComponentNoResultLinkingCollectionsResolvers; + ComponentPagination?: ComponentPaginationResolvers; + ComponentPaginationCollection?: ComponentPaginationCollectionResolvers; + ComponentPaginationLinkingCollections?: ComponentPaginationLinkingCollectionsResolvers; + ComponentTable?: ComponentTableResolvers; + ComponentTableCollection?: ComponentTableCollectionResolvers; + ComponentTableColumn?: ComponentTableColumnResolvers; + ComponentTableColumnCollection?: ComponentTableColumnCollectionResolvers; + ComponentTableColumnLinkingCollections?: ComponentTableColumnLinkingCollectionsResolvers; + ComponentTableColumnsCollection?: ComponentTableColumnsCollectionResolvers; + ComponentTableLinkingCollections?: ComponentTableLinkingCollectionsResolvers; + ContentfulMetadata?: ContentfulMetadataResolvers; + ContentfulTag?: ContentfulTagResolvers; + DataConfigurableTexts?: DataConfigurableTextsResolvers; + DataConfigurableTextsCollection?: DataConfigurableTextsCollectionResolvers; + DataConfigurableTextsLinkingCollections?: DataConfigurableTextsLinkingCollectionsResolvers; + DateTime?: GraphQLScalarType; + Dimension?: GraphQLScalarType; + Entry?: EntryResolvers; + EntryCollection?: EntryCollectionResolvers; + HexColor?: GraphQLScalarType; + JSON?: GraphQLScalarType; + Page?: PageResolvers; + PageCollection?: PageCollectionResolvers; + PageLinkingCollections?: PageLinkingCollectionsResolvers; + PageOneColumnTemplate?: PageOneColumnTemplateResolvers; + PageOneColumnTemplateCollection?: PageOneColumnTemplateCollectionResolvers; + PageOneColumnTemplateLinkingCollections?: PageOneColumnTemplateLinkingCollectionsResolvers; + PageOneColumnTemplateMainSlotCollection?: PageOneColumnTemplateMainSlotCollectionResolvers; + PageSeo?: PageSeoResolvers; + PageSeoCollection?: PageSeoCollectionResolvers; + PageSeoLinkingCollections?: PageSeoLinkingCollectionsResolvers; + Quality?: GraphQLScalarType; + Query?: QueryResolvers; + Sys?: SysResolvers; + TaxonomyConcept?: TaxonomyConceptResolvers; + _Node?: _NodeResolvers; +}; + +export type DirectiveResolvers = { + contentSourceMaps?: ContentSourceMapsDirectiveResolver; + contentfulSchemaMetadata?: ContentfulSchemaMetadataDirectiveResolver; + delegatedResourceLink?: DelegatedResourceLinkDirectiveResolver; + enumMapper?: EnumMapperDirectiveResolver; + featureFlag?: FeatureFlagDirectiveResolver; + fieldResolver?: FieldResolverDirectiveResolver; + timeline?: TimelineDirectiveResolver; + typeIdentifier?: TypeIdentifierDirectiveResolver; +}; + +export type ComponentFragment = { + __typename: 'Block'; + spacing?: string; + content?: + | { + __typename: 'BlockFaq'; + title?: string; + subtitle?: string; + sys: { id: string }; + itemsCollection?: { items: Array<{ title?: string; content?: string; sys: { id: string } }> }; + banner?: { + title?: string; + description?: string; + sys: { id: string }; + link?: { label?: string; url?: string }; + }; + } + | { + __typename: 'BlockTicketList'; + title?: string; + subTitle?: string; + detailsUrl?: string; + sys: { id: string }; + fieldsCollection?: { + items: Array<{ + name?: string; + sys: { id: string }; + valuesCollection?: { items: Array<{ key?: string; value?: string; sys: { id: string } }> }; + }>; + }; + table?: { + actionsTitle?: string; + actionsLabel?: string; + sys: { id: string }; + columnsCollection?: { items: Array<{ title?: string; field?: string; sys: { id: string } }> }; + }; + pagination?: { + description?: string; + previousLabel?: string; + nextLabel?: string; + perPage?: number; + selectPageLabel?: string; + sys: { id: string }; + }; + noResults?: { title?: string; description?: string; sys: { id: string } }; + }; + sys: { id: string }; +}; + +export type ComponentBaseFragment = { + __typename: 'Block'; + spacing?: string; + sys: { id: string }; + content?: { __typename: 'BlockFaq' } | { __typename: 'BlockTicketList' }; +}; + +export type PageFragment = { + slug?: string; + hasOwnTitle?: boolean; + sys: { locale?: string; publishedAt?: any; id: string }; + seo?: { title?: string; noIndex?: boolean; noFollow?: boolean; description?: string; keywords?: Array }; + parent?: { + slug?: string; + seo?: { title?: string }; + parent?: { slug?: string; seo?: { title?: string }; parent?: { slug?: string; seo?: { title?: string } } }; + }; + template?: { + __typename: 'PageOneColumnTemplate'; + mainSlotCollection?: { + items: Array<{ + __typename: 'Block'; + spacing?: string; + sys: { id: string }; + content?: { __typename: 'BlockFaq' } | { __typename: 'BlockTicketList' }; + }>; + }; + }; +}; + +export type SysFragment = { id: string }; + +export type FaqComponentFragment = { + __typename: 'BlockFaq'; + title?: string; + subtitle?: string; + sys: { id: string }; + itemsCollection?: { items: Array<{ title?: string; content?: string; sys: { id: string } }> }; + banner?: { title?: string; description?: string; sys: { id: string }; link?: { label?: string; url?: string } }; +}; + +export type TicketListComponentFragment = { + __typename: 'BlockTicketList'; + title?: string; + subTitle?: string; + detailsUrl?: string; + sys: { id: string }; + fieldsCollection?: { + items: Array<{ + name?: string; + sys: { id: string }; + valuesCollection?: { items: Array<{ key?: string; value?: string; sys: { id: string } }> }; + }>; + }; + table?: { + actionsTitle?: string; + actionsLabel?: string; + sys: { id: string }; + columnsCollection?: { items: Array<{ title?: string; field?: string; sys: { id: string } }> }; + }; + pagination?: { + description?: string; + previousLabel?: string; + nextLabel?: string; + perPage?: number; + selectPageLabel?: string; + sys: { id: string }; + }; + noResults?: { title?: string; description?: string; sys: { id: string } }; +}; + +export type BannerFragment = { + title?: string; + description?: string; + sys: { id: string }; + link?: { label?: string; url?: string }; +}; + +export type FieldMappingFragment = { + name?: string; + sys: { id: string }; + valuesCollection?: { items: Array<{ key?: string; value?: string; sys: { id: string } }> }; +}; + +export type LinkFragment = { + label?: string; + url?: string; + sys: { id: string }; + page?: { slug?: string; seo?: { title?: string; description?: string } }; +}; + +export type PaginationFragment = { + description?: string; + previousLabel?: string; + nextLabel?: string; + perPage?: number; + selectPageLabel?: string; + sys: { id: string }; +}; + +export type SeoFragment = { + title?: string; + noIndex?: boolean; + noFollow?: boolean; + description?: string; + keywords?: Array; +}; + +export type TableFragment = { + actionsTitle?: string; + actionsLabel?: string; + sys: { id: string }; + columnsCollection?: { items: Array<{ title?: string; field?: string; sys: { id: string } }> }; +}; + +export type LayoutSectionFragment = { spacing?: string }; + +export type OneColumnTemplateFragment = { + __typename: 'PageOneColumnTemplate'; + mainSlotCollection?: { + items: Array<{ + __typename: 'Block'; + spacing?: string; + sys: { id: string }; + content?: { __typename: 'BlockFaq' } | { __typename: 'BlockTicketList' }; + }>; + }; +}; + +export type GetComponentQueryVariables = Exact<{ + id: Scalars['String']['input']; + locale: Scalars['String']['input']; + preview?: InputMaybe; +}>; + +export type GetComponentQuery = { + block?: { + __typename: 'Block'; + spacing?: string; + content?: + | { + __typename: 'BlockFaq'; + title?: string; + subtitle?: string; + sys: { id: string }; + itemsCollection?: { items: Array<{ title?: string; content?: string; sys: { id: string } }> }; + banner?: { + title?: string; + description?: string; + sys: { id: string }; + link?: { label?: string; url?: string }; + }; + } + | { + __typename: 'BlockTicketList'; + title?: string; + subTitle?: string; + detailsUrl?: string; + sys: { id: string }; + fieldsCollection?: { + items: Array<{ + name?: string; + sys: { id: string }; + valuesCollection?: { items: Array<{ key?: string; value?: string; sys: { id: string } }> }; + }>; + }; + table?: { + actionsTitle?: string; + actionsLabel?: string; + sys: { id: string }; + columnsCollection?: { items: Array<{ title?: string; field?: string; sys: { id: string } }> }; + }; + pagination?: { + description?: string; + previousLabel?: string; + nextLabel?: string; + perPage?: number; + selectPageLabel?: string; + sys: { id: string }; + }; + noResults?: { title?: string; description?: string; sys: { id: string } }; + }; + sys: { id: string }; + }; +}; + +export type GetPageQueryVariables = Exact<{ + slug: Scalars['String']['input']; + locale: Scalars['String']['input']; + preview?: InputMaybe; +}>; + +export type GetPageQuery = { + pageCollection?: { + items: Array<{ + slug?: string; + hasOwnTitle?: boolean; + sys: { locale?: string; publishedAt?: any; id: string }; + seo?: { + title?: string; + noIndex?: boolean; + noFollow?: boolean; + description?: string; + keywords?: Array; + }; + parent?: { + slug?: string; + seo?: { title?: string }; + parent?: { + slug?: string; + seo?: { title?: string }; + parent?: { slug?: string; seo?: { title?: string } }; + }; + }; + template?: { + __typename: 'PageOneColumnTemplate'; + mainSlotCollection?: { + items: Array<{ + __typename: 'Block'; + spacing?: string; + sys: { id: string }; + content?: { __typename: 'BlockFaq' } | { __typename: 'BlockTicketList' }; + }>; + }; + }; + }>; + }; +}; + +export type GetPagesQueryVariables = Exact<{ + locale: Scalars['String']['input']; + preview?: InputMaybe; +}>; + +export type GetPagesQuery = { + pageCollection?: { + items: Array<{ + slug?: string; + hasOwnTitle?: boolean; + sys: { locale?: string; publishedAt?: any; id: string }; + seo?: { + title?: string; + noIndex?: boolean; + noFollow?: boolean; + description?: string; + keywords?: Array; + }; + parent?: { + slug?: string; + seo?: { title?: string }; + parent?: { + slug?: string; + seo?: { title?: string }; + parent?: { slug?: string; seo?: { title?: string } }; + }; + }; + template?: { + __typename: 'PageOneColumnTemplate'; + mainSlotCollection?: { + items: Array<{ + __typename: 'Block'; + spacing?: string; + sys: { id: string }; + content?: { __typename: 'BlockFaq' } | { __typename: 'BlockTicketList' }; + }>; + }; + }; + }>; + }; +}; + +export const SysFragmentDoc = gql` + fragment Sys on Sys { + id + } +`; +export const LayoutSectionFragmentDoc = gql` + fragment LayoutSection on Block { + spacing + } +`; +export const ComponentBaseFragmentDoc = gql` + fragment ComponentBase on Block { + __typename + sys { + ...Sys + } + ...LayoutSection + content { + __typename + } + } + ${SysFragmentDoc} + ${LayoutSectionFragmentDoc} +`; +export const BannerFragmentDoc = gql` + fragment Banner on ComponentBanner { + sys { + ...Sys + } + title + description + link { + label + url + } + } + ${SysFragmentDoc} +`; +export const FaqComponentFragmentDoc = gql` + fragment FaqComponent on BlockFaq { + __typename + sys { + ...Sys + } + title + subtitle + itemsCollection { + items { + sys { + ...Sys + } + title + content + } + } + banner { + ... on ComponentBanner { + ...Banner + } + } + } + ${SysFragmentDoc} + ${BannerFragmentDoc} +`; +export const FieldMappingFragmentDoc = gql` + fragment FieldMapping on ComponentFieldMapping { + sys { + ...Sys + } + name + valuesCollection { + items { + sys { + ...Sys + } + key + value + } + } + } + ${SysFragmentDoc} +`; +export const TableFragmentDoc = gql` + fragment Table on ComponentTable { + sys { + ...Sys + } + columnsCollection { + items { + sys { + ...Sys + } + title + field + } + } + actionsTitle + actionsLabel + } + ${SysFragmentDoc} +`; +export const PaginationFragmentDoc = gql` + fragment Pagination on ComponentPagination { + sys { + ...Sys + } + description + previousLabel + nextLabel + perPage + selectPageLabel + } + ${SysFragmentDoc} +`; +export const TicketListComponentFragmentDoc = gql` + fragment TicketListComponent on BlockTicketList { + __typename + sys { + ...Sys + } + title + subTitle + fieldsCollection { + items { + ...FieldMapping + } + } + table { + ...Table + } + pagination { + ...Pagination + } + noResults { + sys { + ...Sys + } + title + description + } + detailsUrl + } + ${SysFragmentDoc} + ${FieldMappingFragmentDoc} + ${TableFragmentDoc} + ${PaginationFragmentDoc} +`; +export const ComponentFragmentDoc = gql` + fragment Component on Block { + ...ComponentBase + content { + __typename + ... on BlockFaq { + ...FaqComponent + } + ... on BlockTicketList { + ...TicketListComponent + } + } + } + ${ComponentBaseFragmentDoc} + ${FaqComponentFragmentDoc} + ${TicketListComponentFragmentDoc} +`; +export const SeoFragmentDoc = gql` + fragment Seo on PageSeo { + title + noIndex + noFollow + description + keywords + } +`; +export const OneColumnTemplateFragmentDoc = gql` + fragment OneColumnTemplate on PageOneColumnTemplate { + __typename + mainSlotCollection { + items { + __typename + ... on Block { + ...ComponentBase + } + } + } + } + ${ComponentBaseFragmentDoc} +`; +export const PageFragmentDoc = gql` + fragment Page on Page { + slug + sys { + ...Sys + locale + publishedAt + } + hasOwnTitle + seo { + ...Seo + } + parent { + slug + seo { + title + } + parent { + slug + seo { + title + } + parent { + slug + seo { + title + } + } + } + } + template { + __typename + ... on PageOneColumnTemplate { + ...OneColumnTemplate + } + } + } + ${SysFragmentDoc} + ${SeoFragmentDoc} + ${OneColumnTemplateFragmentDoc} +`; +export const LinkFragmentDoc = gql` + fragment Link on ComponentLink { + sys { + ...Sys + } + label + url + page { + slug + seo { + title + description + } + } + } + ${SysFragmentDoc} +`; +export const GetComponentDocument = gql` + query getComponent($id: String!, $locale: String!, $preview: Boolean) { + block(id: $id, locale: $locale, preview: $preview) { + ...Component + } + } + ${ComponentFragmentDoc} +`; +export const GetPageDocument = gql` + query getPage($slug: String!, $locale: String!, $preview: Boolean) { + pageCollection(locale: $locale, where: { slug: $slug }, limit: 1, preview: $preview) { + items { + ...Page + } + } + } + ${PageFragmentDoc} +`; +export const GetPagesDocument = gql` + query getPages($locale: String!, $preview: Boolean) { + pageCollection(locale: $locale, preview: $preview) { + items { + ...Page + } + } + } + ${PageFragmentDoc} +`; + +export type SdkFunctionWrapper = ( + action: (requestHeaders?: Record) => Promise, + operationName: string, + operationType?: string, + variables?: any, +) => Promise; + +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType, _variables) => action(); +const GetComponentDocumentString = print(GetComponentDocument); +const GetPageDocumentString = print(GetPageDocument); +const GetPagesDocumentString = print(GetPagesDocument); +export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { + return { + getComponent( + variables: GetComponentQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise<{ + data: GetComponentQuery; + errors?: GraphQLError[]; + extensions?: any; + headers: Headers; + status: number; + }> { + return withWrapper( + (wrappedRequestHeaders) => + client.rawRequest(GetComponentDocumentString, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + 'getComponent', + 'query', + variables, + ); + }, + getPage( + variables: GetPageQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise<{ + data: GetPageQuery; + errors?: GraphQLError[]; + extensions?: any; + headers: Headers; + status: number; + }> { + return withWrapper( + (wrappedRequestHeaders) => + client.rawRequest(GetPageDocumentString, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + 'getPage', + 'query', + variables, + ); + }, + getPages( + variables: GetPagesQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise<{ + data: GetPagesQuery; + errors?: GraphQLError[]; + extensions?: any; + headers: Headers; + status: number; + }> { + return withWrapper( + (wrappedRequestHeaders) => + client.rawRequest(GetPagesDocumentString, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + 'getPages', + 'query', + variables, + ); + }, + }; +} +export type Sdk = ReturnType; diff --git a/packages/integrations/contentful-cms/graphql.config.yml b/packages/integrations/contentful-cms/graphql.config.yml new file mode 100644 index 00000000..18cda0f8 --- /dev/null +++ b/packages/integrations/contentful-cms/graphql.config.yml @@ -0,0 +1,8 @@ +schema: ./graphql.schema.json +extensions: + endpoints: + Default GraphQL Endpoint: + url: https://graphql.contentful.com/content/v1/spaces/${CF_SPACE_ID}/environments/${CF_ENV}?access_token=${CF_TOKEN} + headers: + user-agent: JS GraphQL + introspect: false diff --git a/packages/integrations/contentful-cms/lint-staged.config.mjs b/packages/integrations/contentful-cms/lint-staged.config.mjs new file mode 100644 index 00000000..ff4483cc --- /dev/null +++ b/packages/integrations/contentful-cms/lint-staged.config.mjs @@ -0,0 +1,4 @@ +export default { + '*.{js,jsx,ts,tsx,css,scss}': ['prettier --write'], + '*.{js,jsx,ts,tsx}': () => 'tsc --noEmit', +}; diff --git a/packages/integrations/contentful-cms/package.json b/packages/integrations/contentful-cms/package.json new file mode 100644 index 00000000..a486ce11 --- /dev/null +++ b/packages/integrations/contentful-cms/package.json @@ -0,0 +1,53 @@ +{ + "name": "@o2s/integrations.contentful-cms", + "version": "0.1.0", + "private": false, + "license": "MIT", + "exports": { + "./integration": "./dist/src/integration.js", + "./live-preview": "./dist/src/modules/cms/live-preview/index.js" + }, + "files": [ + "dist" + ], + "scripts": { + "dev": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\")", + "build": "tsc && tsc-alias", + "lint": "tsc --noEmit && eslint . --max-warnings 0", + "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,json}\"", + "generate": "graphql-codegen && prettier --write \"generated/**/*.ts\"" + }, + "dependencies": { + "@contentful/live-preview": "^4.6.52", + "@o2s/framework": "*", + "@o2s/utils.logger": "*", + "flatted": "^3.3.3", + "graphql": "16.11.0", + "graphql-request": "7.3.0", + "graphql-tag": "2.12.6" + }, + "devDependencies": { + "@graphql-codegen/add": "^5.0.3", + "@graphql-codegen/cli": "^5.0.7", + "@graphql-codegen/introspection": "^4.0.3", + "@graphql-codegen/typescript": "^4.1.6", + "@graphql-codegen/typescript-graphql-request": "^6.3.0", + "@graphql-codegen/typescript-operations": "^4.6.1", + "@graphql-codegen/typescript-resolvers": "^4.5.2", + "@o2s/eslint-config": "*", + "@o2s/prettier-config": "*", + "@o2s/typescript-config": "*", + "concurrently": "^9.1.2", + "eslint": "^8.57.0", + "prettier": "^3.5.3", + "tsc-alias": "^1.8.13", + "typescript": "^5.8.2" + }, + "peerDependencies": { + "@nestjs/axios": "^4.0.1", + "@nestjs/common": "^11.0.16", + "@nestjs/config": "^4.0.2", + "@nestjs/core": "^11", + "rxjs": "^7" + } +} diff --git a/packages/integrations/contentful-cms/src/integration.ts b/packages/integrations/contentful-cms/src/integration.ts new file mode 100644 index 00000000..8937ac54 --- /dev/null +++ b/packages/integrations/contentful-cms/src/integration.ts @@ -0,0 +1,15 @@ +import { ApiConfig, Cache } from '@o2s/framework/modules'; + +import { GraphqlModule } from '@/modules/graphql/graphql.module'; + +import { Service as CmsService } from './modules/cms'; + +export * as Integration from './modules/index'; + +export const Config: Partial = { + cms: { + name: 'contentful-cms', + service: CmsService, + imports: [GraphqlModule, Cache.Module], + }, +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/cms.service.ts b/packages/integrations/contentful-cms/src/modules/cms/cms.service.ts new file mode 100644 index 00000000..1727da21 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/cms.service.ts @@ -0,0 +1,282 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { parse, stringify } from 'flatted'; +import { Observable, forkJoin, from, map, mergeMap, of } from 'rxjs'; + +import { CMS, Cache } from '@o2s/framework/modules'; + +import { GraphqlService } from '@/modules/graphql/graphql.service'; + +import { mapArticleListBlock } from './mappers/blocks/cms.article-list.mapper'; +import { mapArticleSearchBlock } from './mappers/blocks/cms.article-search.mapper'; +import { mapFaqBlock } from './mappers/blocks/cms.faq.mapper'; +import { mapFeaturedServiceListBlock } from './mappers/blocks/cms.featured-service-list.mapper'; +import { mapInvoiceDetailsBlock } from './mappers/blocks/cms.invoice-details.mapper'; +import { mapInvoiceListBlock } from './mappers/blocks/cms.invoice-list.mapper'; +import { mapNotificationDetailsBlock } from './mappers/blocks/cms.notification-details.mapper'; +import { mapNotificationListBlock } from './mappers/blocks/cms.notification-list.mapper'; +import { mapOrderDetailsBlock } from './mappers/blocks/cms.order-details.mapper'; +import { mapOrderListBlock } from './mappers/blocks/cms.order-list.mapper'; +import { mapOrdersSummaryBlock } from './mappers/blocks/cms.orders-summary.mapper'; +import { mapPaymentsHistoryBlock } from './mappers/blocks/cms.payments-history.mapper'; +import { mapPaymentsSummaryBlock } from './mappers/blocks/cms.payments-summary.mapper'; +import { mapResourceDetailsBlock } from './mappers/blocks/cms.resource-details.mapper'; +import { mapResourceListBlock } from './mappers/blocks/cms.resource-list.mapper'; +import { mapServiceDetailsBlock } from './mappers/blocks/cms.service-details.mapper'; +import { mapServiceListBlock } from './mappers/blocks/cms.service-list.mapper'; +import { mapSurveyJsBlock } from './mappers/blocks/cms.surveyjs-block.mapper'; +import { mapTicketDetailsBlock } from './mappers/blocks/cms.ticket-details.mapper'; +import { mapTicketListBlock } from './mappers/blocks/cms.ticket-list.mapper'; +import { mapTicketRecentBlock } from './mappers/blocks/cms.ticket-recent.mapper'; +import { mapUserAccountBlock } from './mappers/blocks/cms.user-account.mapper'; +import { mapAppConfig } from './mappers/cms.app-config.mapper'; +import { mapCategoryListBlock } from './mappers/cms.category-list.mapper'; +import { mapCategoryBlock } from './mappers/cms.category.mapper'; +import { mapFooter } from './mappers/cms.footer.mapper'; +import { mapHeader } from './mappers/cms.header.mapper'; +import { mapLoginPage } from './mappers/cms.login-page.mapper'; +import { mapNotFoundPage } from './mappers/cms.not-found-page.mapper'; +import { mapOrganizationList } from './mappers/cms.organization-list.mapper'; +import { getAllPages, getAlternativePages, mapMockPage, mapPage } from './mappers/cms.page.mapper'; +import { mapQuickLinksBlock } from './mappers/cms.quick-links.mapper'; +import { mapSurvey } from './mappers/cms.survey.mapper'; + +@Injectable() +export class CmsService implements CMS.Service { + constructor( + private readonly graphqlService: GraphqlService, + private readonly config: ConfigService, + private readonly cacheService: Cache.Service, + ) {} + + private getBlock = (options: CMS.Request.GetCmsEntryParams) => { + const key = `component-${options.id}-${options.locale}`; + // @ts-expect-error we are missing transforming string from query param back to boolean + const isPreview = options.preview === 'true'; + + return from(this.cacheService.get(key)).pipe( + mergeMap((cachedBlock) => { + if (cachedBlock) { + return of(parse(cachedBlock)); + } + + const component = this.graphqlService.getComponent({ + id: options.id, + locale: options.locale, + preview: isPreview, + }); + + return forkJoin([component]).pipe( + map(([component]) => { + if (!component?.data.block?.content) { + throw new NotFoundException(); + } + const data = component.data.block.content; + this.cacheService.set(key, stringify(data)); + return { ...data, isPreview }; + }), + ); + }), + ); + }; + + private getCachedBlock(key: string, getData: () => Observable): Observable { + return from(this.cacheService.get(key)).pipe( + mergeMap((cachedData) => { + if (cachedData) { + console.log('cachedData', cachedData); + return of(parse(cachedData)); + } + return getData().pipe( + map((data) => { + this.cacheService.set(key, stringify(data)); + return data; + }), + ); + }), + ); + } + + getEntry(_options: CMS.Request.GetCmsEntryParams) { + return of({} as T); + } + + getEntries(_options: CMS.Request.GetCmsEntriesParams) { + return of({} as T); + } + + getAppConfig(options: CMS.Request.GetCmsAppConfigParams) { + return of(mapAppConfig(options.locale, options.referrer)); + } + + getPage(options: CMS.Request.GetCmsPageParams) { + const key = `page-${options.slug}-${options.locale}`; + // @ts-expect-error we are missing transforming string from query param back to boolean + const isPreview = options.preview === 'true'; + + // TODO: remove this once we have a full implementation of the page mapper + if (options.slug !== '/cases') { + return of(mapMockPage(options.slug, options.locale)); + } + + return this.getCachedBlock(key, () => { + const pages = this.graphqlService.getPages({ + locale: options.locale, + preview: isPreview, + }); + + return forkJoin([pages]).pipe( + map(([pages]) => { + if (!pages?.data?.pageCollection?.items?.length) { + throw new NotFoundException(); + } + + const page = pages.data.pageCollection.items.find((page) => { + const pattern = new RegExp(`^${page.slug}$`, 'i'); + return pattern.test(options.slug); + }); + + if (!page) { + throw new NotFoundException(); + } + + return mapPage(page); + }), + ); + }); + } + + getPages(options: CMS.Request.GetCmsPagesParams) { + return of(getAllPages(options.locale)); + } + + getAlternativePages(options: CMS.Request.GetCmsAlternativePagesParams) { + return of(getAlternativePages(options.id, options.slug, options.locale)); + } + + getLoginPage(options: CMS.Request.GetCmsLoginPageParams) { + return of(mapLoginPage(options.locale)); + } + + getNotFoundPage(options: CMS.Request.GetCmsNotFoundPageParams) { + return of(mapNotFoundPage(options.locale)); + } + + getHeader(options: CMS.Request.GetCmsHeaderParams) { + return of(mapHeader(options.id, options.locale)); + } + + getFooter(options: CMS.Request.GetCmsFooterParams) { + return of(mapFooter(options.locale)); + } + + getFaqBlock(options: CMS.Request.GetCmsEntryParams) { + const key = `faq-component-${options.id}-${options.locale}`; + return this.getCachedBlock(key, () => this.getBlock(options).pipe(map(mapFaqBlock))); + } + + getTicketListBlock(options: CMS.Request.GetCmsEntryParams) { + const key = `ticket-list-component-${options.id}-${options.locale}`; + return this.getCachedBlock(key, () => this.getBlock(options).pipe(map(mapTicketListBlock))); + } + + getTicketDetailsBlock(_options: CMS.Request.GetCmsEntryParams) { + return of(mapTicketDetailsBlock(_options.locale)); + } + + getNotificationListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapNotificationListBlock(options.locale)); + } + + getNotificationDetailsBlock(_options: CMS.Request.GetCmsEntryParams) { + return of(mapNotificationDetailsBlock(_options.locale)); + } + + getInvoiceListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapInvoiceListBlock(options.locale)); + } + + getInvoiceDetailsBlock(_options: CMS.Request.GetCmsEntryParams) { + return of(mapInvoiceDetailsBlock()); + } + + getServiceListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapServiceListBlock(options.locale)); + } + + getServiceDetailsBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapServiceDetailsBlock(options.locale)); + } + + getResourceListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapResourceListBlock(options.locale)); + } + + getResourceDetailsBlock(_options: CMS.Request.GetCmsEntryParams) { + return of(mapResourceDetailsBlock()); + } + + getPaymentsSummaryBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapPaymentsSummaryBlock(options.locale)); + } + + getPaymentsHistoryBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapPaymentsHistoryBlock(options.locale)); + } + + getUserAccountBlock(_options: CMS.Request.GetCmsEntryParams) { + return of(mapUserAccountBlock(_options.locale)); + } + + getTicketRecentBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapTicketRecentBlock(options.locale)); + } + + getOrganizationList(options: CMS.Request.GetCmsOrganizationListParams) { + return of(mapOrganizationList(options.locale)); + } + + getSurvey(options: CMS.Request.GetCmsSurveyParams) { + return of(mapSurvey(options.code)); + } + + getSurveyJsBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapSurveyJsBlock(options.locale, options.id)); + } + + getOrderListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapOrderListBlock(options.locale)); + } + + getOrdersSummaryBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapOrdersSummaryBlock(options.locale)); + } + + getOrderDetailsBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapOrderDetailsBlock(options.locale)); + } + + getQuickLinksBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapQuickLinksBlock(options.locale)); + } + + getArticleListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapArticleListBlock(options.locale)); + } + + getCategoryBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapCategoryBlock(options.id, options.locale)); + } + + getCategoryListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapCategoryListBlock(options.locale)); + } + + getArticleSearchBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapArticleSearchBlock(options.locale)); + } + + getFeaturedServiceListBlock(options: CMS.Request.GetCmsEntryParams) { + return of(mapFeaturedServiceListBlock(options.locale)); + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Component.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Component.graphql new file mode 100644 index 00000000..ab5bd8ce --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Component.graphql @@ -0,0 +1,23 @@ +fragment Component on Block { + ...ComponentBase + content { + __typename + ... on BlockFaq { + ...FaqComponent + } + ... on BlockTicketList { + ...TicketListComponent + } + } +} + +fragment ComponentBase on Block { + __typename + sys { + ...Sys + } + ...LayoutSection + content { + __typename + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Page.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Page.graphql new file mode 100644 index 00000000..36fde363 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Page.graphql @@ -0,0 +1,36 @@ +fragment Page on Page { + slug + sys { + ...Sys + locale + publishedAt + } + hasOwnTitle + seo { + ...Seo + } + parent { + slug + seo { + title + } + parent { + slug + seo { + title + } + parent { + slug + seo { + title + } + } + } + } + template { + __typename + ... on PageOneColumnTemplate { + ...OneColumnTemplate + } + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Sys.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Sys.graphql new file mode 100644 index 00000000..b75d339a --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/Sys.graphql @@ -0,0 +1,3 @@ +fragment Sys on Sys { + id +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/blocks/Faq.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/blocks/Faq.graphql new file mode 100644 index 00000000..91f59135 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/blocks/Faq.graphql @@ -0,0 +1,22 @@ +fragment FaqComponent on BlockFaq { + __typename + sys { + ...Sys + } + title + subtitle + itemsCollection { + items { + sys { + ...Sys + } + title + content + } + } + banner { + ... on ComponentBanner { + ...Banner + } + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/blocks/TicketList.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/blocks/TicketList.graphql new file mode 100644 index 00000000..f335a3b7 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/blocks/TicketList.graphql @@ -0,0 +1,27 @@ +fragment TicketListComponent on BlockTicketList { + __typename + sys { + ...Sys + } + title + subTitle + fieldsCollection { + items { + ...FieldMapping + } + } + table { + ...Table + } + pagination { + ...Pagination + } + noResults { + sys { + ...Sys + } + title + description + } + detailsUrl +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Banner.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Banner.graphql new file mode 100644 index 00000000..a6bf99f1 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Banner.graphql @@ -0,0 +1,11 @@ +fragment Banner on ComponentBanner { + sys { + ...Sys + } + title + description + link { + label + url + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Fields.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Fields.graphql new file mode 100644 index 00000000..e29eecf1 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Fields.graphql @@ -0,0 +1,15 @@ +fragment FieldMapping on ComponentFieldMapping { + sys { + ...Sys + } + name + valuesCollection { + items { + sys { + ...Sys + } + key + value + } + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Link.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Link.graphql new file mode 100644 index 00000000..cce2a870 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Link.graphql @@ -0,0 +1,14 @@ +fragment Link on ComponentLink { + sys { + ...Sys + } + label + url + page { + slug + seo { + title + description + } + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Pagination.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Pagination.graphql new file mode 100644 index 00000000..8491b35d --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Pagination.graphql @@ -0,0 +1,10 @@ +fragment Pagination on ComponentPagination { + sys { + ...Sys + } + description + previousLabel + nextLabel + perPage + selectPageLabel +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Seo.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Seo.graphql new file mode 100644 index 00000000..4548b466 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Seo.graphql @@ -0,0 +1,7 @@ +fragment Seo on PageSeo { + title + noIndex + noFollow + description + keywords +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Table.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Table.graphql new file mode 100644 index 00000000..cd5377fc --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/content/Table.graphql @@ -0,0 +1,16 @@ +fragment Table on ComponentTable { + sys { + ...Sys + } + columnsCollection { + items { + sys { + ...Sys + } + title + field + } + } + actionsTitle + actionsLabel +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/layout/LayoutSection.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/layout/LayoutSection.graphql new file mode 100644 index 00000000..a465e62f --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/layout/LayoutSection.graphql @@ -0,0 +1,3 @@ +fragment LayoutSection on Block { + spacing +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/templates/OneColumnTemplate.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/templates/OneColumnTemplate.graphql new file mode 100644 index 00000000..b5fb254c --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/fragments/templates/OneColumnTemplate.graphql @@ -0,0 +1,11 @@ +fragment OneColumnTemplate on PageOneColumnTemplate { + __typename + mainSlotCollection { + items { + __typename + ... on Block { + ...ComponentBase + } + } + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/queries/getComponent.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/queries/getComponent.graphql new file mode 100644 index 00000000..7c3574bc --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/queries/getComponent.graphql @@ -0,0 +1,5 @@ +query getComponent($id: String!, $locale: String!, $preview: Boolean) { + block(id: $id, locale: $locale, preview: $preview) { + ...Component + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/graphql/queries/getPage.graphql b/packages/integrations/contentful-cms/src/modules/cms/graphql/queries/getPage.graphql new file mode 100644 index 00000000..d690dda6 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/graphql/queries/getPage.graphql @@ -0,0 +1,15 @@ +query getPage($slug: String!, $locale: String!, $preview: Boolean) { + pageCollection(locale: $locale, where: { slug: $slug }, limit: 1, preview: $preview) { + items { + ...Page + } + } +} + +query getPages($locale: String!, $preview: Boolean) { + pageCollection(locale: $locale, preview: $preview) { + items { + ...Page + } + } +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/index.ts b/packages/integrations/contentful-cms/src/modules/cms/index.ts new file mode 100644 index 00000000..c88862c3 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/index.ts @@ -0,0 +1,6 @@ +import { CMS } from '@o2s/framework/modules'; + +export { CmsService as Service } from './cms.service'; + +export import Request = CMS.Request; +export import Model = CMS.Model; diff --git a/packages/integrations/contentful-cms/src/modules/cms/live-preview/LivePreviewProvider.tsx b/packages/integrations/contentful-cms/src/modules/cms/live-preview/LivePreviewProvider.tsx new file mode 100644 index 00000000..7e5b9aa9 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/live-preview/LivePreviewProvider.tsx @@ -0,0 +1,9 @@ +'use client'; + +import { ContentfulLivePreviewInitConfig } from '@contentful/live-preview'; +import { ContentfulLivePreviewProvider } from '@contentful/live-preview/react'; +import { PropsWithChildren } from 'react'; + +export function LivePreviewProvider({ children, ...props }: PropsWithChildren) { + return {children}; +} diff --git a/packages/integrations/contentful-cms/src/modules/cms/live-preview/getDataAttribute.ts b/packages/integrations/contentful-cms/src/modules/cms/live-preview/getDataAttribute.ts new file mode 100644 index 00000000..0075c8b1 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/live-preview/getDataAttribute.ts @@ -0,0 +1,26 @@ +'use client'; + +import { useContentfulInspectorMode } from '@contentful/live-preview/react'; + +interface DataAttribute { + [key: string]: string; +} + +type Props = { + [key in keyof T]: unknown; +} & { + __id: string; +}; + +export const getDataAttribute = (data: Props | undefined, name: keyof Omit, '__id'>): DataAttribute => { + const inspectorProps = useContentfulInspectorMode(); + + if (!data) return {}; + + return { + ...inspectorProps({ + entryId: data.__id, + fieldId: data[name] as unknown as string, + }), + }; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/live-preview/index.ts b/packages/integrations/contentful-cms/src/modules/cms/live-preview/index.ts new file mode 100644 index 00000000..5ccebd62 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/live-preview/index.ts @@ -0,0 +1,2 @@ +export { LivePreviewProvider as Provider } from './LivePreviewProvider'; +export { getDataAttribute as inspector } from './getDataAttribute'; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.article-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.article-list.mapper.ts new file mode 100644 index 00000000..f0e1bc94 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.article-list.mapper.ts @@ -0,0 +1,70 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ARTICLE_LIST_BLOCK_EN: CMS.Model.ArticleListBlock.ArticleListBlock = { + id: 'article-list-1', + title: 'Explore How-To Guides', + description: + 'Discover step-by-step tutorials and helpful guides to get the most out of your products and solve common issues.', + categoryId: 'warranty-and-repair', + articlesToShow: 4, + parent: { + slug: '/help-and-support', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + seeAllArticles: 'See all articles', + }, +}; + +const MOCK_ARTICLE_LIST_BLOCK_DE: CMS.Model.ArticleListBlock.ArticleListBlock = { + id: 'article-list-1', + title: 'Entdecke Anleitungen', + description: + 'Entdecken Sie Schritt-für-Schritt-Anleitungen und hilfreiche Ratgeber, um das Beste aus Ihren Produkten herauszuholen und häufige Probleme zu lösen.', + categoryId: 'warranty-and-repair', + articlesToShow: 4, + parent: { + slug: '/hilfe-und-support', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + seeAllArticles: 'Alle Artikel anzeigen', + }, +}; + +const MOCK_ARTICLE_LIST_BLOCK_PL: CMS.Model.ArticleListBlock.ArticleListBlock = { + id: 'article-list-1', + title: 'Przeglądaj poradniki', + description: + 'Odkryj szczegółowe instrukcje i pomocne poradniki, aby w pełni wykorzystać możliwości swoich produktów i rozwiązać typowe problemy.', + categoryId: 'warranty-and-repair', + articlesToShow: 4, + parent: { + slug: '/pomoc-i-wsparcie', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + seeAllArticles: 'Zobacz wszystkie artykuły', + }, +}; + +export const mapArticleListBlock = (locale: string): CMS.Model.ArticleListBlock.ArticleListBlock => { + switch (locale) { + case 'de': + return { + ...MOCK_ARTICLE_LIST_BLOCK_DE, + }; + case 'pl': + return { + ...MOCK_ARTICLE_LIST_BLOCK_PL, + }; + case 'en': + default: + return { + ...MOCK_ARTICLE_LIST_BLOCK_EN, + }; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.article-search.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.article-search.mapper.ts new file mode 100644 index 00000000..c85198ca --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.article-search.mapper.ts @@ -0,0 +1,48 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ARTICLE_SEARCH_BLOCK_EN: CMS.Model.ArticleSearchBlock.ArticleSearchBlock = { + id: 'article-search-1', + title: 'Search for topics', + inputLabel: 'What are you searching for?', + noResults: { + title: 'No results found', + description: 'No results found', + }, +}; + +const MOCK_ARTICLE_SEARCH_BLOCK_DE: CMS.Model.ArticleSearchBlock.ArticleSearchBlock = { + id: 'article-search-1', + title: 'Entdecke Anleitungen', + inputLabel: 'Was suchen Sie?', + noResults: { + title: 'Keine Ergebnisse gefunden', + description: 'Keine Ergebnisse gefunden', + }, +}; + +const MOCK_ARTICLE_SEARCH_BLOCK_PL: CMS.Model.ArticleSearchBlock.ArticleSearchBlock = { + id: 'article-search-1', + title: 'Przeglądaj tematy', + inputLabel: 'Czego szukasz?', + noResults: { + title: 'Nie znaleziono wyników', + description: 'Nie znaleziono wyników', + }, +}; + +export const mapArticleSearchBlock = (locale: string): CMS.Model.ArticleSearchBlock.ArticleSearchBlock => { + switch (locale) { + case 'de': + return { + ...MOCK_ARTICLE_SEARCH_BLOCK_DE, + }; + case 'pl': + return { + ...MOCK_ARTICLE_SEARCH_BLOCK_PL, + }; + default: + return { + ...MOCK_ARTICLE_SEARCH_BLOCK_EN, + }; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.faq.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.faq.mapper.ts new file mode 100644 index 00000000..e41ee54d --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.faq.mapper.ts @@ -0,0 +1,56 @@ +import { NotFoundException } from '@nestjs/common'; + +import { CMS } from '@o2s/framework/modules'; + +import { FaqComponentFragment } from '@/generated/contentful'; + +export const mapFaqBlock = ({ + isPreview, + ...data +}: FaqComponentFragment & { isPreview?: boolean }): CMS.Model.FaqBlock.FaqBlock => { + if (!data) { + throw new NotFoundException(); + } + + switch (data.__typename) { + case 'BlockFaq': + return { + id: data.sys.id, + title: data.title, + subtitle: data.subtitle, + items: data.itemsCollection?.items.map( + (item): CMS.Model.FaqBlock.FaqItem => ({ + title: item.title!, + content: item.content!, + }), + ), + banner: { + title: data.banner?.title, + description: data.banner?.description, + button: data.banner?.link, + } as CMS.Model.FaqBlock.FaqBoxWithButton, + meta: isPreview + ? { + __id: data.sys.id, + title: 'title', + subtitle: 'subtitle', + items: data.itemsCollection?.items.map((item) => ({ + __id: item.sys.id, + title: 'title', + content: 'content', + })), + banner: data.banner + ? { + __id: data.banner.sys.id, + title: 'title', + description: 'description', + button: 'link', + } + : undefined, + } + : undefined, + }; + } + + throw new NotFoundException(); +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.featured-service-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.featured-service-list.mapper.ts new file mode 100644 index 00000000..2b21c0cb --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.featured-service-list.mapper.ts @@ -0,0 +1,82 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_FEATURED_SERVICE_LIST_BLOCK_EN: CMS.Model.FeaturedServiceListBlock.FeaturedServiceListBlock = { + id: 'featured-service-list-1', + title: 'Enhance your services with these', + detailsLabel: 'Details', + pagination: { + limit: 3, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + noResults: { + title: 'No Services Found', + description: 'There are no services matching your criteria', + }, + detailsUrl: '/services/{id}', + labels: { + on: 'On', + off: 'Off', + }, +}; + +const MOCK_FEATURED_SERVICE_LIST_BLOCK_DE: CMS.Model.FeaturedServiceListBlock.FeaturedServiceListBlock = { + id: 'featured-service-list-1', + title: 'Verbessern Sie Ihre Dienste mit diesen', + detailsLabel: 'Details', + pagination: { + limit: 3, + legend: 'von {totalPages} Seiten', + prev: 'Vorherige', + next: 'Nächste', + selectPage: 'Seite auswählen', + }, + noResults: { + title: 'Keine Dienstleistungen gefunden', + description: 'Es gibt keine Dienstleistungen, die Ihren Kriterien entsprechen', + }, + detailsUrl: '/dienstleistungen/{id}', + labels: { + on: 'An', + off: 'Aus', + }, +}; + +const MOCK_FEATURED_SERVICE_LIST_BLOCK_PL: CMS.Model.FeaturedServiceListBlock.FeaturedServiceListBlock = { + id: 'featured-service-list-1', + title: 'Zwiększ swoje usługi dzięki temu', + detailsLabel: 'Szczegóły', + pagination: { + limit: 3, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, + noResults: { + title: 'Nie znaleziono usług', + description: 'Nie znaleziono usług spełniających Twoje kryteria', + }, + detailsUrl: '/uslugi/{id}', + labels: { + on: 'Włącz', + off: 'Wyłącz', + }, +}; + +export const mapFeaturedServiceListBlock = ( + locale: string, +): CMS.Model.FeaturedServiceListBlock.FeaturedServiceListBlock => { + switch (locale) { + case 'en': + return MOCK_FEATURED_SERVICE_LIST_BLOCK_EN; + case 'de': + return MOCK_FEATURED_SERVICE_LIST_BLOCK_DE; + case 'pl': + return MOCK_FEATURED_SERVICE_LIST_BLOCK_PL; + default: + return MOCK_FEATURED_SERVICE_LIST_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.invoice-details.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.invoice-details.mapper.ts new file mode 100644 index 00000000..07439013 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.invoice-details.mapper.ts @@ -0,0 +1,50 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_INVOICE_DETAILS_BLOCK: CMS.Model.InvoiceDetailsBlock.InvoiceDetailsBlock = { + id: 'invoice-details-1', + fieldMapping: { + type: { + STANDARD: 'Standard Invoice', + PROFORMA: 'Proforma Invoice', + CREDIT_NOTE: 'Credit Note', + DEBIT_NOTE: 'Debit Note', + }, + paymentStatus: { + PAYMENT_COMPLETE: 'Paid', + PAYMENT_DECLINED: 'Declined', + PAYMENT_DUE: 'Due', + PAYMENT_PAST_DUE: 'Past Due', + }, + currency: { + PLN: 'Polish Zloty', + EUR: 'Euro', + USD: 'US Dollar', + GBP: 'British Pound', + }, + }, + properties: { + id: 'Invoice Number', + externalId: 'External Number', + billingAccountId: 'Billing Account Number', + billingPeriod: 'Billing Period', + paymentMethodId: 'Payment Method', + type: 'Invoice Type', + paymentStatus: 'Payment Status', + issuedDate: 'Issue Date', + paymentDueDate: 'Due Date', + currency: 'Currency', + totalAmountDue: 'Total Amount Due', + totalNetAmountDue: 'Net Amount', + totalAmountPaid: 'Amount Paid', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, +}; + +export const mapInvoiceDetailsBlock = (): CMS.Model.InvoiceDetailsBlock.InvoiceDetailsBlock => { + return { + ...MOCK_INVOICE_DETAILS_BLOCK, + }; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.invoice-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.invoice-list.mapper.ts new file mode 100644 index 00000000..0545b248 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.invoice-list.mapper.ts @@ -0,0 +1,360 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_INVOICE_LIST_BLOCK_EN: CMS.Model.InvoiceListBlock.InvoiceListBlock = { + id: 'invoice-list-1', + title: 'Invoices', + fieldMapping: { + type: { + STANDARD: 'Standard', + PROFORMA: 'Proforma', + CREDIT_NOTE: 'Credit Note', + DEBIT_NOTE: 'Debit Note', + }, + paymentStatus: { + PAYMENT_COMPLETE: 'Paid', + PAYMENT_DECLINED: 'Declined', + PAYMENT_DUE: 'Due', + PAYMENT_PAST_DUE: 'Past Due', + }, + }, + tableTitle: 'List of your invoices', + table: { + columns: [ + { id: 'type', title: 'Invoice Type' }, + { id: 'id', title: 'Invoice Number' }, + { id: 'paymentDueDate', title: 'Due Date' }, + { id: 'paymentStatus', title: 'Payment Status' }, + { id: 'totalAmountDue', title: 'Gross Amount' }, + { id: 'totalNetAmountDue', title: 'Net amount' }, + ], + actions: { + title: 'Actions', + label: 'Download', + }, + }, + pagination: { + limit: 5, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + filters: { + label: 'Filter & Sort', + title: 'Filter Invoices', + description: 'Use filters to find specific invoices', + submit: 'Apply Filters', + reset: 'Reset Filters', + close: 'Close filters', + removeFilters: 'Remove filters ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sort', + allowMultiple: false, + options: [ + { label: 'Document Type (ascending)', value: 'type_ASC' }, + { label: 'Document Type (descending)', value: 'type_DESC' }, + { label: 'Payment Status (ascending)', value: 'paymentStatus_ASC' }, + { label: 'Payment Status (descending)', value: 'paymentStatus_DESC' }, + { label: 'Payment Due Date (ascending)', value: 'paymentDueDate_ASC' }, + { label: 'Payment Due Date (descending)', value: 'paymentDueDate_DESC' }, + { label: 'Total Amount Due (ascending)', value: 'totalAmountDue_ASC' }, + { label: 'Total Amount Due (descending)', value: 'totalAmountDue_DESC' }, + { label: 'Net Amount Due (ascending)', value: 'totalNetAmountDue_ASC' }, + { label: 'Net Amount Due (descending)', value: 'totalNetAmountDue_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Invoice Type', + allowMultiple: true, + options: [ + { label: 'Standard', value: 'STANDARD' }, + { label: 'Proforma', value: 'PROFORMA' }, + { label: 'Credit Note', value: 'CREDIT_NOTE' }, + { label: 'Debit Note', value: 'DEBIT_NOTE' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'paymentStatus', + label: 'Payment Status', + allowMultiple: true, + options: [ + { label: 'Paid', value: 'PAYMENT_COMPLETE' }, + { label: 'Declined', value: 'PAYMENT_DECLINED' }, + { label: 'Due', value: 'PAYMENT_DUE' }, + { label: 'Past Due', value: 'PAYMENT_PAST_DUE' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'issuedDate', + label: 'Issue Date', + from: { + label: 'From', + }, + to: { + label: 'To', + }, + }, + ], + }, + noResults: { + title: 'No Invoices Found', + description: 'There are no invoices matching your criteria', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + clickToSelect: 'Click to select', + }, + downloadFileName: 'invoice-{id}.pdf', + downloadButtonAriaDescription: 'Download invoice {id}', +}; + +const MOCK_INVOICE_LIST_BLOCK_DE: CMS.Model.InvoiceListBlock.InvoiceListBlock = { + id: 'invoice-list-1', + title: 'Rechnungen', + fieldMapping: { + type: { + STANDARD: 'Standard', + PROFORMA: 'Proforma', + CREDIT_NOTE: 'Gutschrift', + DEBIT_NOTE: 'Lastschrift', + }, + paymentStatus: { + PAYMENT_COMPLETE: 'Bezahlt', + PAYMENT_DECLINED: 'Abgelehnt', + PAYMENT_DUE: 'Fällig', + PAYMENT_PAST_DUE: 'Überfällig', + }, + }, + tableTitle: 'Liste Ihrer Rechnungen', + table: { + columns: [ + { id: 'type', title: 'Rechnungstyp' }, + { id: 'id', title: 'Rechnungsnummer' }, + { id: 'paymentDueDate', title: 'Fälligkeitsdatum' }, + { id: 'paymentStatus', title: 'Zahlungsstatus' }, + { id: 'totalAmountDue', title: 'Gesamtbetrag' }, + { id: 'totalNetAmountDue', title: 'Gesamtbetrag net' }, + ], + actions: { + title: 'Aktionen', + label: 'Herunterladen', + }, + }, + pagination: { + limit: 5, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, + filters: { + label: 'Filtern & Sortieren', + title: 'Rechnungen filtern', + description: 'Verwenden Sie Filter, um bestimmte Rechnungen zu finden', + submit: 'Filter anwenden', + reset: 'Filter zurücksetzen', + close: 'Filter schließen', + removeFilters: 'Filter entfernen ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortieren', + allowMultiple: false, + options: [ + { label: 'Dokumenttyp (aufsteigend)', value: 'type_ASC' }, + { label: 'Dokumenttyp (absteigend)', value: 'type_DESC' }, + { label: 'Zahlungsstatus (aufsteigend)', value: 'paymentStatus_ASC' }, + { label: 'Zahlungsstatus (absteigend)', value: 'paymentStatus_DESC' }, + { label: 'Fälligkeitsdatum (aufsteigend)', value: 'paymentDueDate_ASC' }, + { label: 'Fälligkeitsdatum (absteigend)', value: 'paymentDueDate_DESC' }, + { label: 'Gesamtbetrag (aufsteigend)', value: 'totalAmountDue_ASC' }, + { label: 'Gesamtbetrag (absteigend)', value: 'totalAmountDue_DESC' }, + { label: 'Gesamtbetrag net (aufsteigend)', value: 'totalNetAmountDue_ASC' }, + { label: 'Gesamtbetrag net (absteigend)', value: 'totalNetAmountDue_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Rechnungstyp', + allowMultiple: true, + options: [ + { label: 'Standard', value: 'STANDARD' }, + { label: 'Proforma', value: 'PROFORMA' }, + { label: 'Gutschrift', value: 'CREDIT_NOTE' }, + { label: 'Lastschrift', value: 'DEBIT_NOTE' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'paymentStatus', + label: 'Zahlungsstatus', + allowMultiple: true, + options: [ + { label: 'Bezahlt', value: 'PAYMENT_COMPLETE' }, + { label: 'Abgelehnt', value: 'PAYMENT_DECLINED' }, + { label: 'Fällig', value: 'PAYMENT_DUE' }, + { label: 'Überfällig', value: 'PAYMENT_PAST_DUE' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'issuedDate', + label: 'Ausstellungsdatum', + from: { + label: 'Von', + }, + to: { + label: 'Bis', + }, + }, + ], + }, + noResults: { + title: 'Keine Rechnungen gefunden', + description: 'Es wurden keine Rechnungen gefunden, die Ihren Kriterien entsprechen', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + clickToSelect: 'Klicken Sie, um auszuwählen', + }, + downloadFileName: 'rechnung-{id}.pdf', + downloadButtonAriaDescription: 'Rechnung {id} herunterladen', +}; + +const MOCK_INVOICE_LIST_BLOCK_PL: CMS.Model.InvoiceListBlock.InvoiceListBlock = { + id: 'invoice-list-1', + title: 'Faktury', + fieldMapping: { + type: { + STANDARD: 'Standardowa', + PROFORMA: 'Proforma', + CREDIT_NOTE: 'Nota kredytowa', + DEBIT_NOTE: 'Nota debetowa', + }, + paymentStatus: { + PAYMENT_COMPLETE: 'Opłacona', + PAYMENT_DECLINED: 'Odrzucona', + PAYMENT_DUE: 'Do zapłaty', + PAYMENT_PAST_DUE: 'Zaległa', + }, + }, + tableTitle: 'Lista Twoich faktur', + table: { + columns: [ + { id: 'type', title: 'Typ faktury' }, + { id: 'id', title: 'Numer faktury' }, + { id: 'paymentDueDate', title: 'Termin płatności' }, + { id: 'paymentStatus', title: 'Status płatności' }, + { id: 'totalAmountDue', title: 'Kwota do zapłaty' }, + { id: 'totalNetAmountDue', title: 'Kwota do zapłacenia netto' }, + ], + actions: { + title: 'Akcje', + label: 'Pobierz', + }, + }, + pagination: { + limit: 5, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, + filters: { + label: 'Filtruj i sortuj', + title: 'Filtruj faktury', + description: 'Użyj filtrów, aby znaleźć konkretne faktury', + submit: 'Zastosuj filtry', + reset: 'Resetuj filtry', + close: 'Zamknij filtry', + removeFilters: 'Usuń filtry ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortuj', + allowMultiple: false, + options: [ + { label: 'Typ dokumentu (rosnąco)', value: 'type_ASC' }, + { label: 'Typ dokumentu (malejąco)', value: 'type_DESC' }, + { label: 'Status płatności (rosnąco)', value: 'paymentStatus_ASC' }, + { label: 'Status płatności (malejąco)', value: 'paymentStatus_DESC' }, + { label: 'Termin płatności (rosnąco)', value: 'paymentDueDate_ASC' }, + { label: 'Termin płatności (malejąco)', value: 'paymentDueDate_DESC' }, + { label: 'Kwota do zapłaty (rosnąco)', value: 'totalAmountDue_ASC' }, + { label: 'Kwota do zapłaty (malejąco)', value: 'totalAmountDue_DESC' }, + { label: 'Kwota do zapłaty netto (rosnąco)', value: 'totalNetAmountDue_ASC' }, + { label: 'Kwota do zapłaty netto (malejąco)', value: 'totalNetAmountDue_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Typ faktury', + allowMultiple: true, + options: [ + { label: 'Standardowa', value: 'STANDARD' }, + { label: 'Proforma', value: 'PROFORMA' }, + { label: 'Nota kredytowa', value: 'CREDIT_NOTE' }, + { label: 'Nota debetowa', value: 'DEBIT_NOTE' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'paymentStatus', + label: 'Status płatności', + allowMultiple: true, + options: [ + { label: 'Opłacona', value: 'PAYMENT_COMPLETE' }, + { label: 'Odrzucona', value: 'PAYMENT_DECLINED' }, + { label: 'Do zapłaty', value: 'PAYMENT_DUE' }, + { label: 'Zaległa', value: 'PAYMENT_PAST_DUE' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'issuedDate', + label: 'Data wystawienia', + from: { + label: 'Od', + }, + to: { + label: 'Do', + }, + }, + ], + }, + noResults: { + title: 'Nie znaleziono faktur', + description: 'Nie znaleziono faktur spełniających podane kryteria', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + clickToSelect: 'Kliknij, aby wybrać', + }, + downloadFileName: 'faktura-{id}.pdf', + downloadButtonAriaDescription: 'Pobierz fakturę {id}', +}; + +export const mapInvoiceListBlock = (locale: string): CMS.Model.InvoiceListBlock.InvoiceListBlock => { + switch (locale) { + case 'de': + return MOCK_INVOICE_LIST_BLOCK_DE; + case 'pl': + return MOCK_INVOICE_LIST_BLOCK_PL; + default: + return MOCK_INVOICE_LIST_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.notification-details.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.notification-details.mapper.ts new file mode 100644 index 00000000..6b18feeb --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.notification-details.mapper.ts @@ -0,0 +1,128 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_NOTIFICATION_DETAILS_BLOCK_EN: CMS.Model.NotificationDetailsBlock.NotificationDetailsBlock = { + id: 'notification-list-1', + fieldMapping: { + type: { + GENERAL_NOTIFICATION: 'General notification', + TICKET_UPDATE: 'Ticket update', + TYPE_1: 'Special offer', + TYPE_2: 'Changes', + TYPE_3: 'Important news', + }, + status: { + UNVIEWED: 'Not viewed', + VIEWED: 'Viewed', + READ: 'Read', + }, + priority: { + low: 'Low Priority', + medium: 'Medium Priority', + high: 'High Priority', + critical: 'Critical Priority', + }, + }, + properties: { + id: 'ID', + title: 'Title', + content: 'Content', + type: 'Type', + status: 'Status', + priority: 'Priority', + createdAt: 'Created At', + updatedAt: 'Updated At', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, +}; + +const MOCK_NOTIFICATION_DETAILS_BLOCK_DE: CMS.Model.NotificationDetailsBlock.NotificationDetailsBlock = { + id: 'notification-list-1', + fieldMapping: { + type: { + GENERAL_NOTIFICATION: 'Allgemeine Benachrichtigung', + TICKET_UPDATE: 'Ticket-Aktualisierung', + TYPE_1: 'Sonderangebot', + TYPE_2: 'Änderungen', + TYPE_3: 'Wichtige Neuigkeiten', + }, + status: { + UNVIEWED: 'Nicht angesehen', + VIEWED: 'Angesehen', + READ: 'Gelesen', + }, + priority: { + low: 'Niedrige Priorität', + medium: 'Mittlere Priorität', + high: 'Hohe Priorität', + critical: 'Kritische Priorität', + }, + }, + properties: { + id: 'ID', + title: 'Titel', + content: 'Inhalt', + type: 'Typ', + status: 'Status', + priority: 'Priorität', + createdAt: 'Erstellt am', + updatedAt: 'Aktualisiert am', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + }, +}; + +const MOCK_NOTIFICATION_DETAILS_BLOCK_PL: CMS.Model.NotificationDetailsBlock.NotificationDetailsBlock = { + id: 'notification-list-1', + fieldMapping: { + type: { + GENERAL_NOTIFICATION: 'Ogólne powiadomienie', + TICKET_UPDATE: 'Aktualizacja biletu', + TYPE_1: 'Oferta specjalna', + TYPE_2: 'Zmiany', + TYPE_3: 'Ważne wiadomości', + }, + status: { + UNVIEWED: 'Nieprzeczytane', + VIEWED: 'Wyświetlone', + READ: 'Przeczytane', + }, + priority: { + low: 'Niski priorytet', + medium: 'Średni priorytet', + high: 'Wysoki priorytet', + critical: 'Krytyczny priorytet', + }, + }, + properties: { + id: 'ID', + title: 'Tytuł', + content: 'Treść', + type: 'Typ', + status: 'Status', + priority: 'Priorytet', + createdAt: 'Utworzono', + updatedAt: 'Zaktualizowano', + }, + labels: { + today: 'Dziś', + yesterday: 'Wczoraj', + }, +}; + +export const mapNotificationDetailsBlock = ( + locale: string, +): CMS.Model.NotificationDetailsBlock.NotificationDetailsBlock => { + switch (locale) { + case 'de': + return MOCK_NOTIFICATION_DETAILS_BLOCK_DE; + case 'pl': + return MOCK_NOTIFICATION_DETAILS_BLOCK_PL; + default: + return MOCK_NOTIFICATION_DETAILS_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.notification-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.notification-list.mapper.ts new file mode 100644 index 00000000..44706f68 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.notification-list.mapper.ts @@ -0,0 +1,399 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_NOTIFICATION_LIST_BLOCK_EN: CMS.Model.NotificationListBlock.NotificationListBlock = { + id: 'notification-list-1', + title: 'Notifications', + subtitle: 'List of your notifications', + table: { + columns: [ + { id: 'status', title: 'Status' }, + { id: 'title', title: 'Title' }, + { id: 'type', title: 'Type' }, + { id: 'priority', title: 'Priority' }, + { id: 'createdAt', title: 'Date' }, + ], + actions: { + title: 'Actions', + label: 'View details', + }, + }, + fieldMapping: { + type: { + GENERAL_NOTIFICATION: 'General', + TICKET_UPDATE: 'Ticket update', + TYPE_1: 'Special offer', + TYPE_2: 'Important news', + }, + status: { + UNVIEWED: 'Not viewed', + VIEWED: 'Viewed', + READ: 'Read', + }, + priority: { + LOW: 'Low', + MEDIUM: 'Medium', + HIGH: 'High', + CRITICAL: 'Critical', + }, + }, + pagination: { + limit: 10, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + filters: { + label: 'Filter & Sort', + title: 'Filter & Sort notifications', + description: 'Use filters to find specific notifications', + submit: 'Apply', + reset: 'Clear', + close: 'Close filters', + removeFilters: 'Remove filters ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sort', + allowMultiple: false, + options: [ + { label: 'Type (ascending)', value: 'type_ASC' }, + { label: 'Type (descending)', value: 'type_DESC' }, + { label: 'Status (ascending)', value: 'status_ASC' }, + { label: 'Status (descending)', value: 'status_DESC' }, + { label: 'Priority (ascending)', value: 'priority_ASC' }, + { label: 'Priority (descending)', value: 'priority_DESC' }, + { label: 'Date (ascending)', value: 'createdAt_ASC' }, + { label: 'Date (descending)', value: 'createdAt_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Type', + allowMultiple: true, + options: [ + { label: 'General notification', value: 'GENERAL_NOTIFICATION' }, + { label: 'Ticket update', value: 'TICKET_UPDATE' }, + { label: 'Special offer', value: 'TYPE_1' }, + { label: 'Changes', value: 'TYPE_2' }, + { label: 'Important news', value: 'TYPE_3' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'status', + label: 'Status', + allowMultiple: true, + options: [ + { label: 'Not viewed', value: 'UNVIEWED' }, + { label: 'Viewed', value: 'VIEWED' }, + { label: 'Read', value: 'READ' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'priority', + label: 'Priority', + allowMultiple: true, + options: [ + { label: 'Low Priority', value: 'low' }, + { label: 'Medium Priority', value: 'medium' }, + { label: 'High Priority', value: 'high' }, + { label: 'Critical Priority', value: 'critical' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'createdAt', + label: 'Date', + from: { + label: 'From', + }, + to: { + label: 'To', + }, + }, + ], + }, + noResults: { + title: 'No notifications found', + description: 'There are no notifications matching your criteria', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + clickToSelect: 'Click to select', + }, + detailsUrl: '/notifications/:id', +}; + +const MOCK_NOTIFICATION_LIST_BLOCK_DE: CMS.Model.NotificationListBlock.NotificationListBlock = { + id: 'notification-list-1', + title: 'Benachrichtigungen', + subtitle: 'Liste Ihrer Benachrichtigungen', + table: { + columns: [ + { id: 'status', title: 'Status' }, + { id: 'title', title: 'Titel' }, + { id: 'type', title: 'Typ' }, + { id: 'priority', title: 'Priorität' }, + { id: 'createdAt', title: 'Datum' }, + ], + actions: { + title: 'Aktionen', + label: 'Details anzeigen', + }, + }, + fieldMapping: { + type: { + GENERAL_NOTIFICATION: 'Allgemein', + TICKET_UPDATE: 'Ticket-Aktualisierung', + TYPE_1: 'Sonderangebot', + TYPE_2: 'Wichtige Neuigkeiten', + }, + status: { + UNVIEWED: 'Nicht angesehen', + VIEWED: 'Angesehen', + READ: 'Gelesen', + }, + priority: { + LOW: 'Niedrig', + MEDIUM: 'Mittel', + HIGH: 'Hoch', + CRITICAL: 'Kritisch', + }, + }, + pagination: { + limit: 5, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, + filters: { + label: 'Filtern & Sortieren', + title: 'Benachrichtigungen filtern & sortieren', + description: 'Verwenden Sie Filter, um bestimmte Benachrichtigungen zu finden', + submit: 'Anwenden', + reset: 'Zurücksetzen', + close: 'Filter schließen', + removeFilters: 'Filter entfernen ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortieren', + allowMultiple: false, + options: [ + { label: 'Typ (aufsteigend)', value: 'type_ASC' }, + { label: 'Typ (absteigend)', value: 'type_DESC' }, + { label: 'Status (aufsteigend)', value: 'status_ASC' }, + { label: 'Status (absteigend)', value: 'status_DESC' }, + { label: 'Priorität (aufsteigend)', value: 'priority_ASC' }, + { label: 'Priorität (absteigend)', value: 'priority_DESC' }, + { label: 'Datum (aufsteigend)', value: 'createdAt_ASC' }, + { label: 'Datum (absteigend)', value: 'createdAt_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Typ', + allowMultiple: true, + options: [ + { label: 'Allgemeine Benachrichtigung', value: 'GENERAL_NOTIFICATION' }, + { label: 'Ticket-Aktualisierung', value: 'TICKET_UPDATE' }, + { label: 'Sonderangebot', value: 'TYPE_1' }, + { label: 'Änderungen', value: 'TYPE_2' }, + { label: 'Wichtige Neuigkeiten', value: 'TYPE_3' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'status', + label: 'Status', + allowMultiple: true, + options: [ + { label: 'Nicht angesehen', value: 'UNVIEWED' }, + { label: 'Angesehen', value: 'VIEWED' }, + { label: 'Gelesen', value: 'READ' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'priority', + label: 'Priorität', + allowMultiple: true, + options: [ + { label: 'Niedrige Priorität', value: 'low' }, + { label: 'Mittlere Priorität', value: 'medium' }, + { label: 'Hohe Priorität', value: 'high' }, + { label: 'Kritische Priorität', value: 'critical' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'createdAt', + label: 'Datum', + from: { + label: 'Von', + }, + to: { + label: 'Bis', + }, + }, + ], + }, + noResults: { + title: 'Keine Benachrichtigungen gefunden', + description: 'Es gibt keine Benachrichtigungen, die Ihren Kriterien entsprechen', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + clickToSelect: 'Klicken Sie, um auszuwählen', + }, + detailsUrl: '/benachrichtigungen/:id', +}; + +const MOCK_NOTIFICATION_LIST_BLOCK_PL: CMS.Model.NotificationListBlock.NotificationListBlock = { + id: 'notification-list-1', + title: 'Powiadomienia', + subtitle: 'Lista twoich powiadomień', + table: { + columns: [ + { id: 'status', title: 'Status' }, + { id: 'title', title: 'Tytuł' }, + { id: 'type', title: 'Typ' }, + { id: 'priority', title: 'Priorytet' }, + { id: 'createdAt', title: 'Data' }, + ], + actions: { + title: 'Akcje', + label: 'Zobacz szczegóły', + }, + }, + fieldMapping: { + type: { + GENERAL_NOTIFICATION: 'Ogólne', + TICKET_UPDATE: 'Aktualizacja zgłoszenia', + TYPE_1: 'Oferta specjalna', + TYPE_2: 'Ważne wiadomości', + }, + status: { + UNVIEWED: 'Nieprzeczytane', + VIEWED: 'Wyświetlone', + READ: 'Przeczytane', + }, + priority: { + LOW: 'Niski', + MEDIUM: 'Średni', + HIGH: 'Wysoki', + CRITICAL: 'Krytyczny', + }, + }, + pagination: { + limit: 5, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, + filters: { + label: 'Filtruj i sortuj', + title: 'Filtruj i sortuj powiadomienia', + description: 'Użyj filtrów, aby znaleźć konkretne powiadomienia', + submit: 'Zastosuj', + reset: 'Wyczyść', + close: 'Zamknij filtry', + removeFilters: 'Usuń filtry ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortuj', + allowMultiple: false, + options: [ + { label: 'Typ (rosnąco)', value: 'type_ASC' }, + { label: 'Typ (malejąco)', value: 'type_DESC' }, + { label: 'Status (rosnąco)', value: 'status_ASC' }, + { label: 'Status (malejąco)', value: 'status_DESC' }, + { label: 'Priorytet (rosnąco)', value: 'priority_ASC' }, + { label: 'Priorytet (malejąco)', value: 'priority_DESC' }, + { label: 'Data (rosnąco)', value: 'createdAt_ASC' }, + { label: 'Data (malejąco)', value: 'createdAt_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Typ', + allowMultiple: true, + options: [ + { label: 'Powiadomienie ogólne', value: 'GENERAL_NOTIFICATION' }, + { label: 'Aktualizacja zgłoszenia', value: 'TICKET_UPDATE' }, + { label: 'Oferta specjalna', value: 'TYPE_1' }, + { label: 'Zmiany', value: 'TYPE_2' }, + { label: 'Ważne wiadomości', value: 'TYPE_3' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'status', + label: 'Status', + allowMultiple: true, + options: [ + { label: 'Nieprzeczytane', value: 'UNVIEWED' }, + { label: 'Wyświetlone', value: 'VIEWED' }, + { label: 'Przeczytane', value: 'READ' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'priority', + label: 'Priorytet', + allowMultiple: true, + options: [ + { label: 'Niski priorytet', value: 'low' }, + { label: 'Średni priorytet', value: 'medium' }, + { label: 'Wysoki priorytet', value: 'high' }, + { label: 'Krytyczny priorytet', value: 'critical' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'createdAt', + label: 'Data', + from: { + label: 'Od', + }, + to: { + label: 'Do', + }, + }, + ], + }, + noResults: { + title: 'Nie znaleziono powiadomień', + description: 'Nie ma powiadomień spełniających Twoje kryteria', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + clickToSelect: 'Kliknij, aby wybrać', + }, + detailsUrl: '/powiadomienia/:id', +}; + +export const mapNotificationListBlock = (locale: string): CMS.Model.NotificationListBlock.NotificationListBlock => { + switch (locale) { + case 'de': + return { ...MOCK_NOTIFICATION_LIST_BLOCK_DE, detailsUrl: '/benachrichtigungen/{id}' }; + case 'pl': + return { ...MOCK_NOTIFICATION_LIST_BLOCK_PL, detailsUrl: '/powiadomienia/{id}' }; + default: + return { ...MOCK_NOTIFICATION_LIST_BLOCK_EN, detailsUrl: '/notifications/{id}' }; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.order-details.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.order-details.mapper.ts new file mode 100644 index 00000000..3d2eb373 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.order-details.mapper.ts @@ -0,0 +1,382 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ORDER_DETAILS_BLOCK_EN: CMS.Model.OrderDetailsBlock.OrderDetailsBlock = { + id: 'order-details-1', + title: 'Order details', + totalValue: { + title: 'Order net value', + icon: 'Package', + message: '{value} items', + }, + createdOrderAt: { + title: 'Order date', + icon: 'CalendarClock', + }, + paymentDueDate: { + title: 'Payment due date', + icon: 'Coins', + message: 'Document no. {value}', + }, + overdue: { + title: 'Overdue', + icon: 'ThumbsUp', + message: '{days} days overdue', + altMessage: 'No orders to be paid', + }, + orderStatus: { + title: 'Order status', + icon: 'CheckCheck', + }, + customerComment: { + title: 'Comment', + icon: 'Text', + link: { + label: 'See full', + icon: 'ArrowRight', + url: '', + }, + }, + fieldMapping: { + status: { + PENDING: 'Pending', + COMPLETED: 'Completed', + SHIPPED: 'Shipped', + CANCELLED: 'Cancelled', + ARCHIVED: 'Archived', + REQUIRES_ACTION: 'Requires Action', + UNKNOWN: 'Unknown', + }, + unit: { + PCS: 'pcs', + SET: 'set', + BOX: 'box', + KG: 'kg', + L: 'l', + }, + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + showMore: 'Show more', + close: 'Close', + }, + productsTitle: 'Product list', + table: { + columns: [ + { id: 'image', title: 'Image' }, + { id: 'name', title: 'Name' }, + { id: 'sku', title: 'SKU no.' }, + { id: 'unit', title: 'Unit' }, + { id: 'price', title: 'Net price' }, + { id: 'discountTotal', title: 'Discount' }, + { id: 'quantity', title: 'Items' }, + { id: 'subtotal', title: 'Net value' }, + ], + }, + pagination: { + limit: 5, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + filters: { + label: 'Filters & Sort', + title: 'Filters & Sort', + description: 'Filter your products by name, type, or date range to find what you need quickly.', + submit: 'Apply', + reset: 'Clear', + close: 'Close filters', + removeFilters: 'Remove filters ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sort by', + allowMultiple: false, + options: [ + { label: 'Name (ascending)', value: 'name_ASC' }, + { label: 'Name (descending)', value: 'name_DESC' }, + { label: 'SKU (ascending)', value: 'sku_ASC' }, + { label: 'SKU (descending)', value: 'sku_DESC' }, + { label: 'Net value (ascending)', value: 'subtotal_ASC' }, + { label: 'Net value (descending)', value: 'subtotal_DESC' }, + { label: 'Net price (ascending)', value: 'price_ASC' }, + { label: 'Net price (descending)', value: 'price_DESC' }, + { label: 'Discount value (ascending)', value: 'discountTotal_ASC' }, + { label: 'Discount value (descending)', value: 'discountTotal_DESC' }, + { label: 'Unit (ascending)', value: 'unit_ASC' }, + { label: 'Unit (descending)', value: 'unit_DESC' }, + { label: 'Items (ascending)', value: 'quantity_ASC' }, + { label: 'Items (descending)', value: 'quantity_DESC' }, + ], + }, + ], + }, + statusLadder: ['Created', 'Confirmed', 'Completed'], + noResults: { + title: "So far, there's nothing here", + description: '', + }, + reorderLabel: 'Reorder', + trackOrderLabel: 'Track order', + payOnlineLabel: 'Pay online', +}; + +const MOCK_ORDER_DETAILS_BLOCK_DE: CMS.Model.OrderDetailsBlock.OrderDetailsBlock = { + id: 'order-details-1', + title: 'Bestellung Details', + totalValue: { + title: 'Gesamt', + icon: 'Package', + message: '{value} Artikel', + }, + createdOrderAt: { + title: 'Bestellungsdatum', + icon: 'CalendarClock', + }, + paymentDueDate: { + title: 'Zahlungsfrist', + icon: 'Coins', + message: 'Dokumenten-Nr. {value}', + }, + overdue: { + title: 'Überfällig', + icon: 'ThumbsUp', + message: '{days} Tage überfällig', + altMessage: 'Keine Bestellungen zu zahlen', + }, + orderStatus: { + title: 'Bestellstatus', + icon: 'CheckCheck', + }, + customerComment: { + title: 'Kommentar', + icon: 'Text', + link: { + label: 'Sehen', + icon: 'ArrowRight', + url: '', + }, + }, + fieldMapping: { + status: { + PENDING: 'Ausstehend', + COMPLETED: 'Abgeschlossen', + SHIPPED: 'Versendet', + CANCELLED: 'Storniert', + ARCHIVED: 'Archiviert', + REQUIRES_ACTION: 'Aktion erforderlich', + UNKNOWN: 'Unbekannt', + }, + unit: { + PCS: 'Stk.', + SET: 'Set', + BOX: 'Box', + KG: 'kg', + L: 'l', + }, + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + showMore: 'Mehr anzeigen', + close: 'Schließen', + }, + productsTitle: 'Produktliste', + table: { + columns: [ + { id: 'image', title: 'Bild' }, + { id: 'name', title: 'Name' }, + { id: 'sku', title: 'SKU no.' }, + { id: 'unit', title: 'Einheit' }, + { id: 'price', title: 'Nettopreis' }, + { id: 'discountTotal', title: 'Rabatt' }, + { id: 'quantity', title: 'Menge' }, + { id: 'subtotal', title: 'Nettobetrag' }, + ], + }, + filters: { + label: 'Filter & Sortierung', + title: 'Filter & Sortierung', + description: 'Filtern Sie Ihre Produkte nach Name, Typ oder Datumsbereich, um schnell das Richtige zu finden.', + submit: 'Anwenden', + reset: 'Zurücksetzen', + close: 'Filter schließen', + removeFilters: 'Filter entfernen ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortieren nach', + allowMultiple: false, + options: [ + { label: 'Name (aufsteigend)', value: 'name_ASC' }, + { label: 'Name (absteigend)', value: 'name_DESC' }, + { label: 'SKU (aufsteigend)', value: 'sku_ASC' }, + { label: 'SKU (absteigend)', value: 'sku_DESC' }, + { label: 'Nettobetrag (aufsteigend)', value: 'subtotal_ASC' }, + { label: 'Nettobetrag (absteigend)', value: 'subtotal_DESC' }, + { label: 'Nettopreis (aufsteigend)', value: 'price_ASC' }, + { label: 'Nettopreis (absteigend)', value: 'price_DESC' }, + { label: 'Rabattbetrag (aufsteigend)', value: 'discountTotal_ASC' }, + { label: 'Rabattbetrag (absteigend)', value: 'discountTotal_DESC' }, + { label: 'Einheit (aufsteigend)', value: 'unit_ASC' }, + { label: 'Einheit (absteigend)', value: 'unit_DESC' }, + { label: 'Menge (aufsteigend)', value: 'quantity_ASC' }, + { label: 'Menge (absteigend)', value: 'quantity_DESC' }, + ], + }, + ], + }, + pagination: { + limit: 5, + legend: 'von {totalPages} Seiten', + prev: 'Vorherige', + next: 'Nächste', + selectPage: 'Seite auswählen', + }, + statusLadder: ['Erstellt', 'Bestätigt', 'Abgeschlossen'], + noResults: { + title: 'Bis jetzt ist hier nichts', + description: '', + }, + reorderLabel: 'Erneut bestellen', + trackOrderLabel: 'Bestellung verfolgen', + payOnlineLabel: 'Online bezahlen', +}; + +const MOCK_ORDER_DETAILS_BLOCK_PL: CMS.Model.OrderDetailsBlock.OrderDetailsBlock = { + id: 'order-details-1', + title: 'Szczegóły zamówienia', + + totalValue: { + title: 'Wartość', + icon: 'Package', + message: '{value} elementów', + }, + createdOrderAt: { + title: 'Data zamówienia', + icon: 'CalendarClock', + }, + paymentDueDate: { + title: 'Data płatności', + icon: 'Coins', + message: 'Numer dokumentu {value}', + }, + overdue: { + title: 'Niezrealizowane', + icon: 'ThumbsUp', + message: '{days} dni przekroczone', + altMessage: 'Brak zamówień do zapłacenia', + }, + orderStatus: { + title: 'Status zamówienia', + icon: 'CheckCheck', + }, + customerComment: { + title: 'Komentarz', + icon: 'Text', + link: { + label: 'Zobacz', + icon: 'ArrowRight', + url: '', + }, + }, + fieldMapping: { + status: { + PENDING: 'Oczekuje', + COMPLETED: 'Zakończone', + SHIPPED: 'Wysłane', + CANCELLED: 'Anulowane', + ARCHIVED: 'Archiwum', + REQUIRES_ACTION: 'Akcja wymagana', + UNKNOWN: 'Nieznane', + }, + unit: { + PCS: 'szt.', + SET: 'kom.', + BOX: 'op.', + KG: 'kg', + L: 'l', + }, + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + showMore: 'Więcej', + close: 'Zamknij', + }, + productsTitle: 'Lista produktów', + table: { + columns: [ + { id: 'image', title: 'Obraz' }, + { id: 'name', title: 'Nazwa' }, + { id: 'sku', title: 'SKU no.' }, + { id: 'unit', title: 'Jednostka' }, + { id: 'price', title: 'Cena netto' }, + { id: 'discountTotal', title: 'Rabat' }, + { id: 'quantity', title: 'Ilość' }, + { id: 'subtotal', title: 'Wartość netto' }, + ], + }, + filters: { + label: 'Filtry & Sortowanie', + title: 'Filtry & Sortowanie', + description: 'Filtruj swoje produkty według nazwy, typu lub daty, aby szybko znaleźć to, czego potrzebujesz.', + submit: 'Zastosuj', + reset: 'Wyczyść', + close: 'Zamknij filtry', + removeFilters: 'Usuń filtry ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortuj według', + allowMultiple: false, + options: [ + { label: 'Nazwa (rosnąco)', value: 'name_ASC' }, + { label: 'Nazwa (malejąco)', value: 'name_DESC' }, + { label: 'SKU (rosnąco)', value: 'sku_ASC' }, + { label: 'SKU (malejąco)', value: 'sku_DESC' }, + { label: 'Wartość netto (rosnąco)', value: 'subtotal_ASC' }, + { label: 'Wartość netto (malejąco)', value: 'subtotal_DESC' }, + { label: 'Cena netto (rosnąco)', value: 'price_ASC' }, + { label: 'Cena netto (malejąco)', value: 'price_DESC' }, + { label: 'Wartość rabatu (rosnąco)', value: 'discountTotal_ASC' }, + { label: 'Wartość rabatu (malejąco)', value: 'discountTotal_DESC' }, + { label: 'Jednostka (rosnąco)', value: 'unit_ASC' }, + { label: 'Jednostka (malejąco)', value: 'unit_DESC' }, + { label: 'Ilość (rosnąco)', value: 'quantity_ASC' }, + { label: 'Ilość (malejąco)', value: 'quantity_DESC' }, + ], + }, + ], + }, + pagination: { + limit: 5, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, + statusLadder: ['Utworzono', 'Zatwierdzono', 'Zakończono'], + noResults: { + title: 'Dotąd nic tu nie ma', + description: '', + }, + reorderLabel: 'Zamów ponownie', + trackOrderLabel: 'Śledź zamówienie', + payOnlineLabel: 'Płatność online', +}; + +export const mapOrderDetailsBlock = (_locale: string): CMS.Model.OrderDetailsBlock.OrderDetailsBlock => { + switch (_locale) { + case 'pl': + return MOCK_ORDER_DETAILS_BLOCK_PL; + case 'de': + return MOCK_ORDER_DETAILS_BLOCK_DE; + default: + return MOCK_ORDER_DETAILS_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.order-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.order-list.mapper.ts new file mode 100644 index 00000000..8280503f --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.order-list.mapper.ts @@ -0,0 +1,327 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ORDER_LIST_BLOCK_EN: CMS.Model.OrderListBlock.OrderListBlock = { + id: 'order-list-1', + title: 'Orders', + subtitle: 'Order history', + table: { + columns: [ + { id: 'id', title: 'Order ID' }, + { id: 'createdAt', title: 'Order date' }, + { id: 'paymentDueDate', title: 'Payment due date' }, + { id: 'status', title: 'Status' }, + { id: 'subtotal', title: 'Order net value' }, + ], + actions: { + title: 'Actions', + label: 'Details', + }, + }, + fieldMapping: { + status: { + PENDING: 'Pending', + COMPLETED: 'Completed', + SHIPPED: 'Shipped', + CANCELLED: 'Cancelled', + ARCHIVED: 'Archived', + REQUIRES_ACTION: 'Requires Action', + UNKNOWN: 'Unknown', + }, + }, + pagination: { + limit: 10, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + filters: { + label: 'Filters & Sort', + title: 'Filters & Sort', + description: 'Filter your cases by topic, type, or date range to find what you need quickly.', + submit: 'Apply', + reset: 'Clear', + close: 'Close filters', + removeFilters: 'Remove filters ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sort by', + allowMultiple: false, + options: [ + { label: 'Order ID (ascending)', value: 'id_ASC' }, + { label: 'Order ID (descending)', value: 'id_DESC' }, + { label: 'Order date (ascending)', value: 'createdAt_ASC' }, + { label: 'Order date (descending)', value: 'createdAt_DESC' }, + { label: 'Payment due date (ascending)', value: 'updatedAt_ASC' }, + { label: 'Payment due date (descending)', value: 'updatedAt_DESC' }, + { label: 'Order net value (ascending)', value: 'subtotal_ASC' }, + { label: 'Order net value (descending)', value: 'subtotal_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'status', + label: 'Status', + allowMultiple: false, + isLeading: false, + options: [ + { label: 'Completed', value: 'COMPLETED' }, + { label: 'Cancelled', value: 'CANCELLED' }, + { label: 'Pending', value: 'PENDING' }, + { label: 'Processing', value: 'PROCESSING' }, + { label: 'Shipped', value: 'SHIPPED' }, + { label: 'Delivered', value: 'DELIVERED' }, + { label: 'Returned', value: 'RETURNED' }, + { label: 'Training Request', value: 'TRAINING_REQUEST' }, + { label: 'Unknown', value: 'UNKNOWN' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'updatedAt', + label: 'Period of time', + from: { + label: 'From', + }, + to: { + label: 'To', + }, + }, + ], + }, + noResults: { + title: "So far, there's nothing here", + description: '', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + showMore: 'Show more', + clickToSelect: 'Click to select', + }, + reorderLabel: 'Reorder', + detailsUrl: '/orders/{id}', +}; + +const MOCK_ORDER_LIST_BLOCK_DE: CMS.Model.OrderListBlock.OrderListBlock = { + id: 'order-list-1', + title: 'Bestellungen', + subtitle: 'Bestellhistorie', + table: { + columns: [ + { id: 'id', title: 'Bestellnummer' }, + { id: 'createdAt', title: 'Bestelldatum' }, + { id: 'paymentDueDate', title: 'Zahlungsfrist' }, + { id: 'status', title: 'Status' }, + { id: 'subtotal', title: 'Bestellnetto' }, + ], + actions: { + title: 'Aktion', + label: 'Details', + }, + }, + fieldMapping: { + status: { + PENDING: 'Ausstehend', + COMPLETED: 'Abgeschlossen', + SHIPPED: 'Versendet', + CANCELLED: 'Storniert', + ARCHIVED: 'Archiviert', + REQUIRES_ACTION: 'Aktion erforderlich', + UNKNOWN: 'Unbekannt', + }, + }, + pagination: { + limit: 10, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, + filters: { + label: 'Filter & Sortierung', + title: 'Filter & Sortierung', + description: 'Filtern Sie Ihre Fälle nach verschiedenen Kriterien oder ändern Sie die Sortierreihenfolge.', + submit: 'Anwenden', + reset: 'Zurücksetzen', + close: 'Filter schließen', + removeFilters: 'Filter entfernen ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortieren nach', + allowMultiple: false, + isLeading: true, + options: [ + { label: 'Bestellnummer aufsteigend', value: 'id_ASC' }, + { label: 'Bestellnummer absteigend', value: 'id_DESC' }, + { label: 'Bestelldatum aufsteigend', value: 'createdAt_ASC' }, + { label: 'Bestelldatum absteigend', value: 'createdAt_DESC' }, + { label: 'Zahlungsfrist aufsteigend', value: 'updatedAt_ASC' }, + { label: 'Bestellnetto aufsteigend', value: 'subtotal_ASC' }, + { label: 'Bestellnetto absteigend', value: 'subtotal_DESC' }, + ], + }, + { + __typename: 'FilterToggleGroup', + id: 'status', + label: 'Status', + allowMultiple: false, + isLeading: false, + options: [ + { label: 'Abgeschlossen', value: 'COMPLETED' }, + { label: 'Storniert', value: 'CANCELLED' }, + { label: 'Ausstehend', value: 'PENDING' }, + { label: 'In Bearbeitung', value: 'PROCESSING' }, + { label: 'Versandt', value: 'SHIPPED' }, + { label: 'Geliefert', value: 'DELIVERED' }, + { label: 'Zurückgegeben', value: 'RETURNED' }, + { label: 'Schulungsanfrage', value: 'TRAINING_REQUEST' }, + { label: 'Unbekannt', value: 'UNKNOWN' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'updatedAt', + label: 'Zeitraum', + from: { + label: 'Von', + }, + to: { + label: 'Bis', + }, + }, + ], + }, + noResults: { + title: 'Bisher gibt es hier nichts', + description: '', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + showMore: 'Mehr anzeigen', + clickToSelect: 'Klicken Sie, um auszuwählen', + }, + reorderLabel: 'Erneut bestellen', + detailsUrl: '/bestellungen/{id}', +}; + +const MOCK_ORDER_LIST_BLOCK_PL: CMS.Model.OrderListBlock.OrderListBlock = { + id: 'order-list-1', + title: 'Zamówienia', + subtitle: 'Historia zamówień', + table: { + columns: [ + { id: 'id', title: 'Numer zamówienia' }, + { id: 'createdAt', title: 'Data zamówienia' }, + { id: 'paymentDueDate', title: 'Data płatności' }, + { id: 'status', title: 'Status' }, + { id: 'subtotal', title: 'Wartość zamówienia netto' }, + ], + actions: { + title: 'Akcja', + label: 'Szczegóły', + }, + }, + fieldMapping: { + status: { + PENDING: 'Oczekuje', + COMPLETED: 'Zakończone', + SHIPPED: 'Wysłane', + CANCELLED: 'Anulowane', + ARCHIVED: 'Archiwum', + REQUIRES_ACTION: 'Akcja wymagana', + UNKNOWN: 'Nieznane', + }, + }, + pagination: { + limit: 10, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, + filters: { + label: 'Filtry i sortowanie', + title: 'Filtry i sortowanie', + description: + 'Filtruj swoje zgłoszenia według tematu, typu lub zakresu dat, aby szybko znaleźć to, czego potrzebujesz.', + submit: 'Zastosuj', + reset: 'Wyczyść', + close: 'Zamknij filtry', + removeFilters: 'Usuń filtry ({active})', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sortuj według', + allowMultiple: false, + options: [ + { label: 'Numer zamówienia rosnąco', value: 'id_ASC' }, + { label: 'Numer zamówienia malejąco', value: 'id_DESC' }, + { label: 'Data zamówienia rosnąco', value: 'createdAt_ASC' }, + { label: 'Data zamówienia malejąco', value: 'createdAt_DESC' }, + { label: 'Data płatności rosnąco', value: 'updatedAt_ASC' }, + { label: 'Wartość zamówienia netto rosnąco', value: 'subtotal_ASC' }, + { label: 'Wartość zamówienia netto malejąco', value: 'subtotal_DESC' }, + ], + }, + { + __typename: 'FilterToggleGroup', + id: 'status', + label: 'Status', + allowMultiple: false, + isLeading: true, + options: [ + { label: 'Zakończone', value: 'COMPLETED' }, + { label: 'Anulowane', value: 'CANCELLED' }, + { label: 'Oczekuje', value: 'PENDING' }, + { label: 'W trakcie', value: 'PROCESSING' }, + { label: 'Wysłane', value: 'SHIPPED' }, + { label: 'Dostarczone', value: 'DELIVERED' }, + { label: 'Zwrócone', value: 'RETURNED' }, + { label: 'Wniosek o szkolenie', value: 'TRAINING_REQUEST' }, + { label: 'Nieznany', value: 'UNKNOWN' }, + ], + }, + { + __typename: 'FilterDateRange', + id: 'updatedAt', + label: 'Okres czasu', + from: { + label: 'Od', + }, + to: { + label: 'Do', + }, + }, + ], + }, + noResults: { + title: 'Jak dotąd nie ma tu nic', + description: '', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + showMore: 'Pokaż więcej', + clickToSelect: 'Kliknij, aby wybrać', + }, + reorderLabel: 'Zamów ponownie', + detailsUrl: '/zamowienia/{id}', +}; + +export const mapOrderListBlock = (locale: string): CMS.Model.OrderListBlock.OrderListBlock => { + switch (locale) { + case 'de': + return { ...MOCK_ORDER_LIST_BLOCK_DE }; + case 'pl': + return { ...MOCK_ORDER_LIST_BLOCK_PL }; + default: + return { ...MOCK_ORDER_LIST_BLOCK_EN }; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.orders-summary.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.orders-summary.mapper.ts new file mode 100644 index 00000000..6c1e54ad --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.orders-summary.mapper.ts @@ -0,0 +1,153 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ORDER_LIST_BLOCK_EN: CMS.Model.OrdersSummaryBlock.OrdersSummaryBlock = { + id: 'orders-summary-1', + title: 'At a glance', + subtitle: 'Compared to the same period a year before', + totalValue: { + title: 'Total order value', + icon: 'Coins', + }, + averageValue: { + title: 'Avg. order value', + icon: 'ShoppingCart', + }, + averageNumber: { + title: 'Avg. number of orders', + icon: 'Package', + }, + chart: { + title: 'Number of orders', + legend: { + prev: 'Previous period', + current: 'Current period', + }, + }, + noResults: { + title: "So far, there's nothing here", + description: '', + }, + ranges: [ + { + label: '1 Wk', + value: 7, + type: 'day', + }, + { + label: '1 Mo', + value: 30, + type: 'day', + }, + { + label: '6 Mo', + value: 6, + type: 'month', + isDefault: true, + }, + ], +}; + +const MOCK_ORDER_LIST_BLOCK_DE: CMS.Model.OrdersSummaryBlock.OrdersSummaryBlock = { + id: 'orders-summary-1', + title: 'Auf einen Blick', + subtitle: 'Im Vergleich zum gleichen Zeitraum des Vorjahres', + totalValue: { + title: 'Gesamtbestellwert', + icon: 'Coins', + }, + averageValue: { + title: 'Durchschn. Bestellwert', + icon: 'ShoppingCart', + }, + averageNumber: { + title: 'Durchschn. Anzahl der Bestellungen', + icon: 'Package', + }, + chart: { + title: 'Anzahl der Bestellungen', + legend: { + prev: 'Vorheriger Zeitraum', + current: 'Aktueller Zeitraum', + }, + }, + noResults: { + title: 'Bisher gibt es hier nichts', + description: '', + }, + ranges: [ + { + label: '1 Wo', + value: 7, + type: 'day', + }, + { + label: '1 Mt', + value: 30, + type: 'day', + }, + { + label: '6 Mt', + value: 6, + type: 'month', + isDefault: true, + }, + ], +}; + +const MOCK_ORDER_LIST_BLOCK_PL: CMS.Model.OrdersSummaryBlock.OrdersSummaryBlock = { + id: 'orders-summary-1', + title: 'W skrócie', + subtitle: 'W porównaniu z tym samym okresem roku poprzedniego', + totalValue: { + title: 'Całkowita wartość zamówień', + icon: 'Coins', + }, + averageValue: { + title: 'Średnia wartość zamówienia', + icon: 'ShoppingCart', + }, + averageNumber: { + title: 'Średnia liczba zamówień', + icon: 'Package', + }, + chart: { + title: 'Liczba zamówień', + legend: { + prev: 'Poprzedni okres', + current: 'Obecny okres', + }, + }, + noResults: { + title: 'Jak dotąd nie ma tu nic', + description: '', + }, + ranges: [ + { + label: '1 Tydz', + value: 7, + type: 'day', + }, + { + label: '1 Mies', + value: 30, + type: 'day', + }, + { + label: '6 Mies', + value: 6, + type: 'month', + isDefault: true, + }, + ], +}; + +export const mapOrdersSummaryBlock = (locale: string): CMS.Model.OrdersSummaryBlock.OrdersSummaryBlock => { + switch (locale) { + case 'de': + return { ...MOCK_ORDER_LIST_BLOCK_DE }; + case 'pl': + return { ...MOCK_ORDER_LIST_BLOCK_PL }; + default: + return { ...MOCK_ORDER_LIST_BLOCK_EN }; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.payments-history.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.payments-history.mapper.ts new file mode 100644 index 00000000..150d18b1 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.payments-history.mapper.ts @@ -0,0 +1,42 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_PAYMENTS_HISTORY_BLOCK_EN: CMS.Model.PaymentsHistoryBlock.PaymentsHistoryBlock = { + id: 'payments-history-1', + title: '6-months history', + topSegment: 'Overdue', + middleSegment: 'To be paid', + bottomSegment: 'Paid', + total: 'Total', + monthsToShow: 6, +}; + +const MOCK_PAYMENTS_HISTORY_BLOCK_DE: CMS.Model.PaymentsHistoryBlock.PaymentsHistoryBlock = { + id: 'payments-history-1', + title: '6-Monats-Historie', + topSegment: 'Überfällig', + middleSegment: 'Zu bezahlen', + bottomSegment: 'Bezahlt', + total: 'Gesamt', + monthsToShow: 6, +}; + +const MOCK_PAYMENTS_HISTORY_BLOCK_PL: CMS.Model.PaymentsHistoryBlock.PaymentsHistoryBlock = { + id: 'payments-history-1', + title: 'Historia 6-miesięczna', + topSegment: 'Zaległe', + middleSegment: 'Do zapłaty', + bottomSegment: 'Zapłacone', + total: 'Suma', + monthsToShow: 6, +}; + +export const mapPaymentsHistoryBlock = (locale: string): CMS.Model.PaymentsHistoryBlock.PaymentsHistoryBlock => { + switch (locale) { + case 'de': + return MOCK_PAYMENTS_HISTORY_BLOCK_DE; + case 'pl': + return MOCK_PAYMENTS_HISTORY_BLOCK_PL; + default: + return MOCK_PAYMENTS_HISTORY_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.payments-summary.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.payments-summary.mapper.ts new file mode 100644 index 00000000..e05edd65 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.payments-summary.mapper.ts @@ -0,0 +1,90 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_PAYMENTS_SUMMARY_BLOCK_EN: CMS.Model.PaymentsSummaryBlock.PaymentsSummaryBlock = { + id: 'payments-summary-1', + overdue: { + title: 'Overdue', + message: '{days} days overdue', + altMessage: 'All good. No outstanding payments', + link: { + label: 'Pay online', + icon: 'ArrowUpRight', + url: '', + }, + icon: 'ThumbsUp', + }, + toBePaid: { + title: 'To be paid', + message: 'New and overdue', + altMessage: 'No invoices to be paid', + link: { + label: 'Pay online', + icon: 'ArrowUpRight', + url: '', + }, + icon: 'CreditCard', + }, +}; + +const MOCK_PAYMENTS_SUMMARY_BLOCK_PL: CMS.Model.PaymentsSummaryBlock.PaymentsSummaryBlock = { + id: 'payments-summary-1', + overdue: { + title: 'Zaległe', + message: '{days} dni po terminie', + altMessage: 'Wszystko w porządku. Brak zaległych płatności', + link: { + label: 'Zapłać online', + icon: 'ArrowUpRight', + url: '', + }, + icon: 'ThumbsUp', + }, + toBePaid: { + title: 'Do zapłaty', + message: 'Nowe i zaległe', + altMessage: 'Brak faktur do zapłaty', + link: { + label: 'Zapłać online', + icon: 'ArrowUpRight', + url: '', + }, + icon: 'CreditCard', + }, +}; + +const MOCK_PAYMENTS_SUMMARY_BLOCK_DE: CMS.Model.PaymentsSummaryBlock.PaymentsSummaryBlock = { + id: 'payments-summary-1', + overdue: { + title: 'Überfällig', + message: '{days} Tage überfällig', + altMessage: 'Alles in Ordnung. Keine überfälligen Rechnungen', + link: { + label: 'Online bezahlen', + icon: 'ArrowUpRight', + url: '', + }, + icon: 'ThumbsUp', + }, + toBePaid: { + title: 'Zu bezahlen', + message: 'Neue und überfällige', + altMessage: 'Keine zu zahlenden Rechnungen', + link: { + label: 'Online bezahlen', + icon: 'ArrowUpRight', + url: '', + }, + icon: 'CreditCard', + }, +}; + +export const mapPaymentsSummaryBlock = (locale: string): CMS.Model.PaymentsSummaryBlock.PaymentsSummaryBlock => { + switch (locale) { + case 'pl': + return MOCK_PAYMENTS_SUMMARY_BLOCK_PL; + case 'de': + return MOCK_PAYMENTS_SUMMARY_BLOCK_DE; + default: + return MOCK_PAYMENTS_SUMMARY_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.resource-details.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.resource-details.mapper.ts new file mode 100644 index 00000000..b9dca5f5 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.resource-details.mapper.ts @@ -0,0 +1,47 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_RESOURCE_DETAILS_BLOCK: CMS.Model.ResourceDetailsBlock.ResourceDetailsBlock = { + id: 'resource-details-1', + fieldMapping: { + 'asset.status': { + ACTIVE: 'Active', + INACTIVE: 'Inactive', + RETIRED: 'Retired', + }, + 'contract.status': { + ACTIVE: 'Active', + EXPIRED: 'Expired', + INACTIVE: 'Inactive', + }, + // 'product.type': { + // PHYSICAL: 'Physical', + // VIRTUAL: 'Virtual', + // }, + }, + properties: { + id: 'Resource ID', + billingAccountId: 'Billing Account', + __typename: 'Resource Type', + 'product.type': 'Product Type', + 'product.name': 'Product Name', + 'product.category': 'Product Category', + 'asset.manufacturer': 'Manufacturer', + 'asset.model': 'Model', + 'asset.serialNo': 'Serial Number', + 'asset.status': 'Status', + 'contract.startDate': 'Start Date', + 'contract.endDate': 'End Date', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + status: 'Status', + type: 'Type', + }, +}; + +export const mapResourceDetailsBlock = (): CMS.Model.ResourceDetailsBlock.ResourceDetailsBlock => { + return { + ...MOCK_RESOURCE_DETAILS_BLOCK, + }; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.resource-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.resource-list.mapper.ts new file mode 100644 index 00000000..7223a358 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.resource-list.mapper.ts @@ -0,0 +1,98 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_RESOURCE_LIST_BLOCK: CMS.Model.ResourceListBlock.ResourceListBlock = { + id: 'resource-list-1', + title: 'Resources', + subtitle: 'List of your resources', + table: { + columns: [ + { id: 'id', title: 'Resource ID' }, + { id: 'product.type', title: 'Product Type' }, + { id: 'product.name', title: 'Product Name' }, + { id: 'product.category', title: 'Product Category' }, + ], + actions: { + title: 'Actions', + label: 'View Details', + }, + }, + pagination: { + limit: 5, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + filters: { + label: 'Filter', + title: 'Filter Resources', + description: 'Use filters to find specific resources', + submit: 'Apply Filters', + reset: 'Reset Filters', + close: 'Close filters', + items: [ + { + __typename: 'FilterSelect', + id: '__typename', + label: 'Resource Type', + allowMultiple: true, + options: [ + { label: 'Asset', value: 'Asset' }, + { label: 'Service', value: 'Service' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'product.type', + label: 'Product Type', + allowMultiple: true, + options: [ + { label: 'Physical', value: 'PHYSICAL' }, + { label: 'Virtual', value: 'VIRTUAL' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'product.category', + label: 'Product Category', + allowMultiple: true, + options: [ + { label: 'Software', value: 'SOFTWARE' }, + { label: 'Tools', value: 'TOOLS' }, + { label: 'Hardware', value: 'HARDWARE' }, + ], + }, + ], + }, + noResults: { + title: 'No Resources Found', + description: 'There are no resources matching your criteria', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + status: 'Status', + type: 'Type', + }, + detailsUrl: '/resources/:id', +}; + +export const mapResourceListBlock = (locale: string): CMS.Model.ResourceListBlock.ResourceListBlock => { + const getDetailsUrl = () => { + switch (locale) { + case 'en': + return `/resources/{id}`; + case 'de': + return `/ressourcen/{id}`; + case 'pl': + return `/zasoby/{id}`; + } + + return ''; + }; + + return { + ...MOCK_RESOURCE_LIST_BLOCK, + detailsUrl: getDetailsUrl(), + }; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.service-details.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.service-details.mapper.ts new file mode 100644 index 00000000..e50b2d63 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.service-details.mapper.ts @@ -0,0 +1,144 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_SERVICE_DETAILS_BLOCK_EN: CMS.Model.ServiceDetailsBlock.ServiceDetailsBlock = { + id: 'service-list-1', + title: 'Service details', + properties: { + price: 'Price', + status: 'Status', + type: 'Type', + category: 'Category', + startDate: 'Start date', + endDate: 'End date', + }, + fields: { + type: { + PHYSICAL: 'Physical', + VIRTUAL: 'Virtual', + }, + category: { + TOOLS: 'Tools', + HARDWARE: 'Hardware', + SOFTWARE: 'Software', + MEASUREMENT: 'Measurement', + SAFETY: 'Safety', + TRAINING: 'Training', + RENTAL: 'Rental', + MAINTENANCE: 'Maintenance', + }, + status: { + ACTIVE: 'Active', + INACTIVE: 'Inactive', + EXPIRED: 'Expired', + }, + paymentPeriod: { + MONTHLY: 'mo', + YEARLY: 'ye', + WEEKLY: 'we', + ONE_TIME: 'one-time', + }, + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + settings: 'Settings', + renew: 'Renew', + }, +}; + +const MOCK_SERVICE_DETAILS_BLOCK_PL: CMS.Model.ServiceDetailsBlock.ServiceDetailsBlock = { + id: 'service-list-1', + title: 'Szczegóły sprawy', + properties: { + id: 'ID sprawy', + topic: 'Temat', + type: 'Typ sprawy', + status: 'Status', + description: 'Dodatkowe notatki', + address: 'Adres serwisowy', + contact: 'Forma kontaktu', + }, + fields: { + type: { + PHYSICAL: 'Fizyczny', + VIRTUAL: 'Wirtualny', + }, + category: { + TOOLS: 'Narzędzia', + HARDWARE: 'Sprzęt', + SOFTWARE: 'Oprogramowanie', + MEASUREMENT: 'Pomiar', + }, + status: { + ACTIVE: 'Aktywny', + INACTIVE: 'Nieaktywny', + EXPIRED: 'Wygasły', + }, + paymentPeriod: { + MONTHLY: 'Miesięczny', + YEARLY: 'Roczny', + WEEKLY: 'Tygodniowy', + ONE_TIME: 'Jednorazowy', + }, + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + settings: 'Ustawienia', + renew: 'Odnowić', + }, +}; + +const MOCK_SERVICE_DETAILS_BLOCK_DE: CMS.Model.ServiceDetailsBlock.ServiceDetailsBlock = { + id: 'service-list-1', + title: 'Falldetails', + properties: { + id: 'Fall-ID', + topic: 'Thema', + type: 'Falltyp', + status: 'Status', + description: 'Zusätzliche Notizen', + address: 'Serviceadresse', + contact: 'Kontaktform', + }, + fields: { + type: { + PHYSICAL: 'Physikalisch', + VIRTUAL: 'Virtuell', + }, + category: { + TOOLS: 'Werkzeuge', + HARDWARE: 'Hardware', + SOFTWARE: 'Software', + MEASUREMENT: 'Messung', + }, + status: { + ACTIVE: 'Aktiv', + INACTIVE: 'Inaktiv', + EXPIRED: 'Abgelaufen', + }, + paymentPeriod: { + MONTHLY: 'Monatlich', + YEARLY: 'Jährlich', + WEEKLY: 'Wochenweise', + ONE_TIME: 'Einmalig', + }, + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + settings: 'Einstellungen', + renew: 'Erneuern', + }, +}; + +export const mapServiceDetailsBlock = (_locale: string): CMS.Model.ServiceDetailsBlock.ServiceDetailsBlock => { + switch (_locale) { + case 'pl': + return MOCK_SERVICE_DETAILS_BLOCK_PL; + case 'de': + return MOCK_SERVICE_DETAILS_BLOCK_DE; + default: + return MOCK_SERVICE_DETAILS_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.service-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.service-list.mapper.ts new file mode 100644 index 00000000..decc8f25 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.service-list.mapper.ts @@ -0,0 +1,284 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_SERVICE_LIST_BLOCK_EN: CMS.Model.ServiceListBlock.ServiceListBlock = { + id: 'service-list-1', + title: 'Services', + subtitle: 'List of your services', + detailsLabel: 'Details', + fields: { + type: { + PHYSICAL: 'Physical', + VIRTUAL: 'Virtual', + }, + category: { + TOOLS: 'Tools', + HARDWARE: 'Hardware', + SOFTWARE: 'Software', + MEASUREMENT: 'Measurement', + }, + status: { + ACTIVE: 'Active', + INACTIVE: 'Inactive', + EXPIRED: 'Expired', + }, + paymentPeriod: { + MONTHLY: 'mo', + YEARLY: 'ye', + WEEKLY: 'we', + ONE_TIME: 'one-time', + }, + }, + pagination: { + limit: 6, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, + filters: { + label: 'Filter', + title: 'Filter Services', + description: 'Use filters to find specific services', + submit: 'Apply Filters', + reset: 'Reset Filters', + removeFilters: 'Remove filters ({active})', + close: 'Close filters', + items: [ + { + __typename: 'FilterSelect', + id: 'sort', + label: 'Sort by', + allowMultiple: false, + options: [ + { label: 'Service number ascending', value: 'id_ASC' }, + { label: 'Service number descending', value: 'id_DESC' }, + { label: 'Service name ascending', value: 'name_ASC' }, + { label: 'Service name descending', value: 'name_DESC' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'type', + label: 'Product Type', + allowMultiple: true, + options: [ + { label: 'Physical', value: 'PHYSICAL' }, + { label: 'Virtual', value: 'VIRTUAL' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'category', + label: 'Product Category', + allowMultiple: true, + options: [ + { label: 'Software', value: 'SOFTWARE' }, + { label: 'Tools', value: 'TOOLS' }, + { label: 'Hardware', value: 'HARDWARE' }, + { label: 'Measurement', value: 'MEASUREMENT' }, + { label: 'Cloud', value: 'CLOUD' }, + { label: 'Support', value: 'SUPPORT' }, + { label: 'Subscription', value: 'SUBSCRIPTION' }, + { label: 'Warranty', value: 'WARRANTY' }, + { label: 'Maintenance', value: 'MAINTENANCE' }, + { label: 'Training', value: 'TRAINING' }, + ], + }, + ], + }, + noResults: { + title: 'No Services Found', + description: 'There are no services matching your criteria', + }, + detailsUrl: '/services/{id}', + labels: { + today: 'Today', + yesterday: 'Yesterday', + clickToSelect: 'Click to select', + }, +}; + +const MOCK_SERVICE_LIST_BLOCK_DE: CMS.Model.ServiceListBlock.ServiceListBlock = { + id: 'service-list-1', + title: 'Dienstleistungen', + subtitle: 'Liste Ihrer Dienstleistungen', + detailsLabel: 'Details', + fields: { + type: { + PHYSICAL: 'Physikalisch', + VIRTUAL: 'Virtuell', + }, + category: { + TOOLS: 'Werkzeuge', + HARDWARE: 'Hardware', + SOFTWARE: 'Software', + MEASUREMENT: 'Messung', + }, + status: { + ACTIVE: 'Aktiv', + INACTIVE: 'Inaktiv', + EXPIRED: 'Abgelaufen', + }, + paymentPeriod: { + MONTHLY: 'monatlich', + YEARLY: 'jährlich', + WEEKLY: 'wochenweise', + ONE_TIME: 'einmalig', + }, + }, + pagination: { + limit: 6, + legend: 'von {totalPages} Seiten', + prev: 'Vorherige', + next: 'Nächste', + selectPage: 'Seite auswählen', + }, + filters: { + label: 'Filter', + title: 'Filter Dienstleistungen', + description: 'Verwenden Sie Filter, um spezifische Dienstleistungen zu finden', + submit: 'Filter anwenden', + reset: 'Filter zurücksetzen', + removeFilters: 'Filter entfernen ({active})', + close: 'Filter schließen', + items: [ + { + __typename: 'FilterSelect', + id: 'type', + label: 'Produkttyp', + allowMultiple: true, + options: [ + { label: 'Physikalisch', value: 'PHYSICAL' }, + { label: 'Virtuell', value: 'VIRTUAL' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'category', + label: 'Produktkategorie', + allowMultiple: true, + options: [ + { label: 'Software', value: 'SOFTWARE' }, + { label: 'Werkzeuge', value: 'TOOLS' }, + { label: 'Hardware', value: 'HARDWARE' }, + { label: 'Messung', value: 'MEASUREMENT' }, + { label: 'Cloud', value: 'CLOUD' }, + { label: 'Support', value: 'SUPPORT' }, + { label: 'Subskryption', value: 'SUBSCRIPTION' }, + { label: 'Garantie', value: 'WARRANTY' }, + { label: 'Wartung', value: 'MAINTENANCE' }, + { label: 'Training', value: 'TRAINING' }, + ], + }, + ], + }, + noResults: { + title: 'Keine Dienstleistungen gefunden', + description: 'Es gibt keine Dienstleistungen, die Ihren Kriterien entsprechen', + }, + detailsUrl: '/dienstleistungen/{id}', + labels: { + today: 'Heute', + yesterday: 'Gestern', + clickToSelect: 'Klicken Sie, um auszuwählen', + }, +}; + +const MOCK_SERVICE_LIST_BLOCK_PL: CMS.Model.ServiceListBlock.ServiceListBlock = { + id: 'service-list-1', + title: 'Usługi', + subtitle: 'Lista Twoich usług', + detailsLabel: 'Szczegóły', + fields: { + type: { + PHYSICAL: 'Fizyczny', + VIRTUAL: 'Wirtualny', + }, + category: { + TOOLS: 'Narzędzia', + HARDWARE: 'Sprzęt', + SOFTWARE: 'Oprogramowanie', + MEASUREMENT: 'Pomiar', + }, + status: { + ACTIVE: 'Aktywny', + INACTIVE: 'Nieaktywny', + EXPIRED: 'Wygasły', + }, + paymentPeriod: { + MONTHLY: 'miesięczny', + YEARLY: 'roczny', + WEEKLY: 'tygodniowy', + ONE_TIME: 'jednorazowy', + }, + }, + pagination: { + limit: 6, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, + filters: { + label: 'Filtruj', + title: 'Filtruj Usługi', + description: 'Użyj filtrów, aby znaleźć konkretne usługi', + submit: 'Zastosuj Filtry', + reset: 'Resetuj Filtry', + removeFilters: 'Usuń filtry ({active})', + close: 'Zamknij filtry', + items: [ + { + __typename: 'FilterSelect', + id: 'type', + label: 'Typ Produktu', + allowMultiple: true, + options: [ + { label: 'Fizyczny', value: 'PHYSICAL' }, + { label: 'Wirtualny', value: 'VIRTUAL' }, + ], + }, + { + __typename: 'FilterSelect', + id: 'category', + label: 'Kategoria Produktu', + allowMultiple: true, + options: [ + { label: 'Oprogramowanie', value: 'SOFTWARE' }, + { label: 'Narzędzia', value: 'TOOLS' }, + { label: 'Sprzęt', value: 'HARDWARE' }, + { label: 'Pomiar', value: 'MEASUREMENT' }, + { label: 'Chmura', value: 'CLOUD' }, + { label: 'Wsparcie', value: 'SUPPORT' }, + { label: 'Subskrypcja', value: 'SUBSCRIPTION' }, + { label: 'Gwarancja', value: 'WARRANTY' }, + { label: 'Utrzymanie', value: 'MAINTENANCE' }, + { label: 'Szkolenie', value: 'TRAINING' }, + ], + }, + ], + }, + noResults: { + title: 'Nie znaleziono usług', + description: 'Nie znaleziono usług spełniających Twoje kryteria', + }, + detailsUrl: '/uslugi/{id}', + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + clickToSelect: 'Kliknij, aby wybrać', + }, +}; + +export const mapServiceListBlock = (locale: string): CMS.Model.ServiceListBlock.ServiceListBlock => { + switch (locale) { + case 'en': + return MOCK_SERVICE_LIST_BLOCK_EN; + case 'de': + return MOCK_SERVICE_LIST_BLOCK_DE; + case 'pl': + return MOCK_SERVICE_LIST_BLOCK_PL; + default: + return MOCK_SERVICE_LIST_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.surveyjs-block.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.surveyjs-block.mapper.ts new file mode 100644 index 00000000..7b92e2e8 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.surveyjs-block.mapper.ts @@ -0,0 +1,80 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_SURVEYJS_BLOCK_1_EN: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-1', + title: 'Contact us', + code: 'contact-us', +}; + +const MOCK_SURVEYJS_BLOCK_1_PL: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-1', + title: 'Kontaktuj się z nami', + code: 'contact-us', +}; + +const MOCK_SURVEYJS_BLOCK_1_DE: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-1', + title: 'Kontaktiere uns', + code: 'contact-us', +}; + +const MOCK_SURVEYJS_BLOCK_2_EN: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-2', + title: 'Complaint form', + code: 'complaint-form', +}; + +const MOCK_SURVEYJS_BLOCK_2_PL: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-2', + title: 'Formularz reklamacji', + code: 'complaint-form', +}; + +const MOCK_SURVEYJS_BLOCK_2_DE: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-2', + title: 'Beschwerdeformular', + code: 'complaint-form', +}; + +const MOCK_SURVEYJS_BLOCK_3_EN: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-3', + title: 'Request device maintenance', + code: 'request-device-maintenance', +}; + +const MOCK_SURVEYJS_BLOCK_3_PL: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-3', + title: 'Zgłoś naprawę urządzenia', + code: 'request-device-maintenance', +}; + +const MOCK_SURVEYJS_BLOCK_3_DE: CMS.Model.SurveyJsBlock.SurveyJsBlock = { + id: 'survey-3', + title: 'Gerätewartungsanfrage', + code: 'request-device-maintenance', +}; + +export const mapSurveyJsBlock = (locale: string, id: string): CMS.Model.SurveyJsBlock.SurveyJsBlock => { + switch (locale) { + case 'en': + return ( + [MOCK_SURVEYJS_BLOCK_1_EN, MOCK_SURVEYJS_BLOCK_2_EN, MOCK_SURVEYJS_BLOCK_3_EN].find( + (block) => block.id === id, + ) || MOCK_SURVEYJS_BLOCK_1_EN + ); + case 'de': + return ( + [MOCK_SURVEYJS_BLOCK_1_DE, MOCK_SURVEYJS_BLOCK_2_DE, MOCK_SURVEYJS_BLOCK_3_DE].find( + (block) => block.id === id, + ) || MOCK_SURVEYJS_BLOCK_1_DE + ); + case 'pl': + return ( + [MOCK_SURVEYJS_BLOCK_1_PL, MOCK_SURVEYJS_BLOCK_2_PL, MOCK_SURVEYJS_BLOCK_3_PL].find( + (block) => block.id === id, + ) || MOCK_SURVEYJS_BLOCK_1_PL + ); + default: + return MOCK_SURVEYJS_BLOCK_1_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-details.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-details.mapper.ts new file mode 100644 index 00000000..b3668577 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-details.mapper.ts @@ -0,0 +1,143 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_TICKET_DETAILS_BLOCK_EN: CMS.Model.TicketDetailsBlock.TicketDetailsBlock = { + id: 'ticket-list-1', + title: 'Case details', + commentsTitle: 'Comments', + attachmentsTitle: 'Attachments', + properties: { + id: 'Case ID', + topic: 'Topic', + type: 'Case type', + status: 'Status', + description: 'Additional notes', + address: 'Service address', + contact: 'Form of contact', + }, + fieldMapping: { + topic: { + TOOL_REPAIR: 'Tool Repair', + FLEET_EXCHANGE: 'Fleet Exchange', + CALIBRATION: 'Calibration', + THEFT_REPORT: 'Theft Report', + SOFTWARE_SUPPORT: 'Software Support', + RENTAL_REQUEST: 'Rental Request', + TRAINING_REQUEST: 'Training Request', + }, + type: { + URGENT: 'Urgent', + STANDARD: 'Standard', + LOW_PRIORITY: 'Low Priority', + }, + status: { + OPEN: 'Under consideration', + CLOSED: 'Resolved', + IN_PROGRESS: 'New response', + }, + }, + labels: { + showMore: 'Show case details', + showLess: 'Show less details', + today: 'Today', + yesterday: 'Yesterday', + }, +}; + +const MOCK_TICKET_DETAILS_BLOCK_PL: CMS.Model.TicketDetailsBlock.TicketDetailsBlock = { + id: 'ticket-list-1', + title: 'Szczegóły sprawy', + commentsTitle: 'Komentarze', + attachmentsTitle: 'Załączniki', + properties: { + id: 'ID sprawy', + topic: 'Temat', + type: 'Typ sprawy', + status: 'Status', + description: 'Dodatkowe notatki', + address: 'Adres serwisowy', + contact: 'Forma kontaktu', + }, + fieldMapping: { + topic: { + ALL: 'Wszystko', + TOOL_REPAIR: 'Naprawa narzędzia', + FLEET_EXCHANGE: 'Wymiana floty', + CALIBRATION: 'Kalibracja', + THEFT_REPORT: 'Zgłoszenie kradzieży', + SOFTWARE_SUPPORT: 'Wsparcie oprogramowania', + RENTAL_REQUEST: 'Prośba o wynajem', + TRAINING_REQUEST: 'Prośba o szkolenie', + }, + type: { + URGENT: 'Pilne', + STANDARD: 'Standardowe', + LOW_PRIORITY: 'Niski priorytet', + }, + status: { + OPEN: 'W trakcie rozpatrywania', + CLOSED: 'Rozwiązane', + IN_PROGRESS: 'Nowa odpowiedź', + }, + }, + labels: { + showMore: 'Pokaż szczegóły sprawy', + showLess: 'Pokaż mniej szczegółów', + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, +}; + +const MOCK_TICKET_DETAILS_BLOCK_DE: CMS.Model.TicketDetailsBlock.TicketDetailsBlock = { + id: 'ticket-list-1', + title: 'Falldetails', + commentsTitle: 'Kommentare', + attachmentsTitle: 'Anhänge', + properties: { + id: 'Fall-ID', + topic: 'Thema', + type: 'Falltyp', + status: 'Status', + description: 'Zusätzliche Notizen', + address: 'Serviceadresse', + contact: 'Kontaktform', + }, + fieldMapping: { + topic: { + ALL: 'Alle', + TOOL_REPAIR: 'Werkzeugreparatur', + FLEET_EXCHANGE: 'Flottenaustausch', + CALIBRATION: 'Kalibrierung', + THEFT_REPORT: 'Diebstahlmeldung', + SOFTWARE_SUPPORT: 'Software-Support', + RENTAL_REQUEST: 'Mietanfrage', + TRAINING_REQUEST: 'Schulungsanfrage', + }, + type: { + URGENT: 'Dringend', + STANDARD: 'Standard', + LOW_PRIORITY: 'Niedrige Priorität', + }, + status: { + OPEN: 'In Bearbeitung', + CLOSED: 'Gelöst', + IN_PROGRESS: 'Neue Antwort', + }, + }, + labels: { + showMore: 'Falldetails anzeigen', + showLess: 'Weniger Details anzeigen', + today: 'Heute', + yesterday: 'Gestern', + }, +}; + +export const mapTicketDetailsBlock = (_locale: string): CMS.Model.TicketDetailsBlock.TicketDetailsBlock => { + switch (_locale) { + case 'pl': + return MOCK_TICKET_DETAILS_BLOCK_PL; + case 'de': + return MOCK_TICKET_DETAILS_BLOCK_DE; + default: + return MOCK_TICKET_DETAILS_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-list.mapper.ts new file mode 100644 index 00000000..071d0a86 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-list.mapper.ts @@ -0,0 +1,70 @@ +import { NotFoundException } from '@nestjs/common'; + +import { CMS } from '@o2s/framework/modules'; + +import { TicketListComponentFragment } from '@/generated/contentful'; + +import { mapFields, mapFieldsMeta } from '../cms.fieldMapping.mapper'; +import { mapPagination } from '../cms.pagination.mapper'; +import { mapTable, mapTableMeta } from '../cms.table.mapper'; + +export const mapTicketListBlock = ({ + isPreview, + ...data +}: TicketListComponentFragment & { isPreview?: boolean }): CMS.Model.TicketListBlock.TicketListBlock => { + if (!data) { + throw new NotFoundException(); + } + + switch (data.__typename) { + case 'BlockTicketList': + return { + id: data.sys.id, + title: data.title, + subtitle: data.subTitle, + table: mapTable(data.table), + fieldMapping: mapFields(data.fieldsCollection?.items), + pagination: mapPagination(data.pagination), + // TODO: add filters + // filters: mapFilters(component.filters), + noResults: { + title: data.noResults?.title || '', + description: data.noResults?.description, + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + showMore: 'Show more', + clickToSelect: 'Click to select', + }, + detailsUrl: data.detailsUrl || '', + meta: isPreview + ? { + __id: data.sys.id, + title: 'title', + subtitle: 'subtitle', + table: mapTableMeta(data.table), + fieldMapping: mapFieldsMeta(data.fieldsCollection?.items), + // pagination: mapPagination(data.pagination), + // TODO: add filters + // filters: 'filters', + noResults: { + __id: data.noResults?.sys.id || '', + title: 'title', + description: 'description', + }, + labels: { + __id: data.sys.id, + today: 'today', + yesterday: 'yesterday', + showMore: 'showMore', + clickToSelect: 'clickToSelect', + }, + detailsUrl: 'detailsUrl', + } + : undefined, + }; + } + + throw new NotFoundException(); +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-recent.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-recent.mapper.ts new file mode 100644 index 00000000..ed800af7 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.ticket-recent.mapper.ts @@ -0,0 +1,51 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_TICKET_RECENT_BLOCK_EN: CMS.Model.TicketRecentBlock.TicketRecentBlock = { + id: 'ticket-recent-1', + title: 'Recent activity in cases', + commentsTitle: 'Comments', + labels: { + today: 'Today', + yesterday: 'Yesterday', + details: 'Details', + }, + limit: 3, + detailsUrl: '/cases/{id}', +}; + +const MOCK_TICKET_RECENT_BLOCK_DE: CMS.Model.TicketRecentBlock.TicketRecentBlock = { + id: 'ticket-recent-1', + title: 'Letzte Aktivität in Fällen', + commentsTitle: 'Kommentare', + labels: { + today: 'Heute', + yesterday: 'Gestern', + details: 'Einzelheiten', + }, + limit: 3, + detailsUrl: '/faelle/{id}', +}; + +const MOCK_TICKET_RECENT_BLOCK_PL: CMS.Model.TicketRecentBlock.TicketRecentBlock = { + id: 'ticket-recent-1', + title: 'Ostatnia aktywność w zgłoszeniach', + commentsTitle: 'Komentarze', + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + details: 'Szczegóły', + }, + limit: 3, + detailsUrl: '/zgloszenia/{id}', +}; + +export const mapTicketRecentBlock = (locale: string): CMS.Model.TicketRecentBlock.TicketRecentBlock => { + switch (locale) { + case 'pl': + return MOCK_TICKET_RECENT_BLOCK_PL; + case 'de': + return MOCK_TICKET_RECENT_BLOCK_DE; + default: + return MOCK_TICKET_RECENT_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.user-account.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.user-account.mapper.ts new file mode 100644 index 00000000..a663cdb3 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/blocks/cms.user-account.mapper.ts @@ -0,0 +1,233 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_USER_ACCOUNT_BLOCK_EN: CMS.Model.UserAccountBlock.UserAccountBlock = { + id: 'user-account-1', + title: 'User Account', + basicInformationTitle: 'Basic Information', + basicInformationDescription: 'Update your personal information to keep your account details current and accurate.', + fields: [ + { + __typename: 'Input', + id: 'first-name-1', + name: 'firstName', + label: 'First Name', + placeholder: 'Enter first name', + errorMessages: [ + { + type: 'required', + description: 'First name is required', + id: 'required-1', + name: 'Required', + }, + { + type: 'matches', + description: 'First name can contain only letters, numbers, dots and hyphens', + id: 'matches-1', + name: 'Matches', + }, + { + type: 'min', + description: 'First name must be at least 3 characters long', + id: 'min-1', + name: 'Min', + }, + ], + }, + { + __typename: 'Input', + id: 'last-name-1', + name: 'lastName', + label: 'Last Name', + placeholder: 'Enter last name', + errorMessages: [ + { + type: 'required', + description: 'Last name is required', + id: 'required-1', + name: 'Required', + }, + ], + }, + { + __typename: 'Input', + id: 'email-1', + name: 'email', + label: 'Email', + placeholder: 'Enter email', + errorMessages: [ + { + type: 'required', + description: 'Email is required', + id: 'required-1', + name: 'Required', + }, + ], + }, + ], + labels: { + edit: 'Edit', + save: 'Save', + cancel: 'Cancel', + delete: 'Delete', + logOut: 'Log out', + }, +}; + +const MOCK_USER_ACCOUNT_BLOCK_PL: CMS.Model.UserAccountBlock.UserAccountBlock = { + id: 'user-account-1', + title: 'Konto Użytkownika', + basicInformationTitle: 'Podstawowe Informacje', + basicInformationDescription: + 'Zaktualizuj swoje dane osobowe, aby utrzymać aktualne i dokładne informacje o koncie.', + fields: [ + { + __typename: 'Input', + id: 'first-name-1', + name: 'firstName', + label: 'Imię', + placeholder: 'Wprowadź imię', + errorMessages: [ + { + type: 'required', + description: 'Imię jest wymagane', + id: 'required-1', + name: 'Wymagane', + }, + { + type: 'matches', + description: 'Imię może zawierać tylko litery, cyfry, kropki i myślniki', + id: 'matches-1', + name: 'Dopasowanie', + }, + { + type: 'min', + description: 'Imię musi mieć co najmniej 3 znaki', + id: 'min-1', + name: 'Minimum', + }, + ], + }, + { + __typename: 'Input', + id: 'last-name-1', + name: 'lastName', + label: 'Nazwisko', + placeholder: 'Wprowadź nazwisko', + errorMessages: [ + { + type: 'required', + description: 'Nazwisko jest wymagane', + id: 'required-1', + name: 'Wymagane', + }, + ], + }, + { + __typename: 'Input', + id: 'email-1', + name: 'email', + label: 'Email', + placeholder: 'Wprowadź email', + errorMessages: [ + { + type: 'required', + description: 'Email jest wymagany', + id: 'required-1', + name: 'Wymagane', + }, + ], + }, + ], + labels: { + edit: 'Edytuj', + save: 'Zapisz', + cancel: 'Anuluj', + delete: 'Usuń', + logOut: 'Wyloguj', + }, +}; + +const MOCK_USER_ACCOUNT_BLOCK_DE: CMS.Model.UserAccountBlock.UserAccountBlock = { + id: 'user-account-1', + title: 'Benutzerkonto', + basicInformationTitle: 'Grundinformationen', + basicInformationDescription: + 'Aktualisieren Sie Ihre persönlichen Daten, um Ihre Kontoinformationen aktuell und genau zu halten.', + fields: [ + { + __typename: 'Input', + id: 'first-name-1', + name: 'firstName', + label: 'Vorname', + placeholder: 'Vorname eingeben', + errorMessages: [ + { + type: 'required', + description: 'Vorname ist erforderlich', + id: 'required-1', + name: 'Erforderlich', + }, + { + type: 'matches', + description: 'Vorname darf nur Buchstaben, Zahlen, Punkte und Bindestriche enthalten', + id: 'matches-1', + name: 'Übereinstimmung', + }, + { + type: 'min', + description: 'Vorname muss mindestens 3 Zeichen lang sein', + id: 'min-1', + name: 'Minimum', + }, + ], + }, + { + __typename: 'Input', + id: 'last-name-1', + name: 'lastName', + label: 'Nachname', + placeholder: 'Nachname eingeben', + errorMessages: [ + { + type: 'required', + description: 'Nachname ist erforderlich', + id: 'required-1', + name: 'Erforderlich', + }, + ], + }, + { + __typename: 'Input', + id: 'email-1', + name: 'email', + label: 'E-Mail', + placeholder: 'E-Mail eingeben', + errorMessages: [ + { + type: 'required', + description: 'E-Mail ist erforderlich', + id: 'required-1', + name: 'Erforderlich', + }, + ], + }, + ], + labels: { + edit: 'Bearbeiten', + save: 'Speichern', + cancel: 'Abbrechen', + delete: 'Löschen', + logOut: 'Abmelden', + }, +}; + +export const mapUserAccountBlock = (locale: string): CMS.Model.UserAccountBlock.UserAccountBlock => { + switch (locale) { + case 'pl': + return MOCK_USER_ACCOUNT_BLOCK_PL; + case 'de': + return MOCK_USER_ACCOUNT_BLOCK_DE; + default: + return MOCK_USER_ACCOUNT_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.app-config.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.app-config.mapper.ts new file mode 100644 index 00000000..4a44bdd4 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.app-config.mapper.ts @@ -0,0 +1,182 @@ +import { CMS } from '@o2s/framework/modules'; + +const APP_CONFIG_EN: CMS.Model.AppConfig.AppConfig = { + locales: [ + { + value: 'en', + label: 'EN', + }, + { + value: 'de', + label: 'DE', + }, + { + value: 'pl', + label: 'PL', + }, + ], + header: 'fqj6nnyk4irqq5b7rnc4ogsj', + footer: 'footer-1', + labels: { + errors: { + requestError: { + title: 'Uh oh! Something went wrong.', + content: 'There was a problem with your request.', + }, + }, + dates: { + today: 'Today', + yesterday: 'Yesterday', + }, + actions: { + showMore: 'Show more', + showLess: 'Show less', + show: 'Show', + hide: 'Hide', + edit: 'Edit', + save: 'Save', + cancel: 'Cancel', + delete: 'Delete', + logOut: 'Log out', + settings: 'Settings', + renew: 'Renew', + details: 'Details', + }, + }, + themes: { + default: { + name: 'default', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + }, + }, +}; + +const APP_CONFIG_DE: CMS.Model.AppConfig.AppConfig = { + locales: [ + { + value: 'en', + label: 'EN', + }, + { + value: 'de', + label: 'DE', + }, + { + value: 'pl', + label: 'PL', + }, + ], + header: 'fqj6nnyk4irqq5b7rnc4ogsj', + footer: 'footer-1', + labels: { + errors: { + requestError: { + title: 'Ups! Etwas ist schief gelaufen.', + content: 'Es gab ein Problem mit Ihrer Anfrage.', + }, + }, + dates: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, + actions: { + showMore: 'Mehr anzeigen', + showLess: 'Weniger anzeigen', + show: 'Anzeigen', + hide: 'Verstecken', + edit: 'Bearbeiten', + save: 'Speichern', + cancel: 'Abbrechen', + delete: 'Löschen', + logOut: 'Abmelden', + settings: 'Einstellungen', + renew: 'Erneuern', + details: 'Details', + }, + }, + themes: { + default: { + name: 'default', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + }, + }, +}; + +const APP_CONFIG_PL: CMS.Model.AppConfig.AppConfig = { + locales: [ + { + value: 'en', + label: 'EN', + }, + { + value: 'de', + label: 'DE', + }, + { + value: 'pl', + label: 'PL', + }, + ], + header: 'fqj6nnyk4irqq5b7rnc4ogsj', + footer: 'footer-1', + labels: { + errors: { + requestError: { + title: 'Ups! Coś poszło nie tak.', + content: 'Wystąpił problem z Twoim żądaniem.', + }, + }, + dates: { + today: 'Heute', + yesterday: 'Gestern', + }, + actions: { + showMore: 'Pokaż więcej', + showLess: 'Pokaż mniej', + show: 'Rozwiń', + hide: 'Zwiń', + edit: 'Edytuj', + save: 'Zapisz', + cancel: 'Cofnij', + delete: 'Usuń', + logOut: 'Wyloguj', + settings: 'Ustawienia', + renew: 'Odnów', + details: 'Szczegóły', + }, + }, + themes: { + default: { + name: 'default', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + }, + }, +}; + +export const mapAppConfig = (locale: string, _referrer?: string): CMS.Model.AppConfig.AppConfig => { + switch (locale) { + case 'en': + return APP_CONFIG_EN; + case 'de': + return APP_CONFIG_DE; + case 'pl': + return APP_CONFIG_PL; + } + + return APP_CONFIG_EN; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.category-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.category-list.mapper.ts new file mode 100644 index 00000000..444f30fe --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.category-list.mapper.ts @@ -0,0 +1,49 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ARTICLE_LIST_BLOCK_EN: CMS.Model.CategoryListBlock.CategoryListBlock = { + id: 'category-list-1', + title: 'Browse by categories', + description: 'Explore our help topics organized by category to find the information you need quickly and easily.', + categoryIds: ['warranty-and-repair', 'maintenance', 'safety', 'accessories', 'troubleshooting'], + parent: { + slug: '/help-and-support', + }, +}; +const MOCK_ARTICLE_LIST_BLOCK_DE: CMS.Model.CategoryListBlock.CategoryListBlock = { + id: 'category-list-1', + title: 'Nach Kategorien durchsuchen', + description: + 'Entdecken Sie unsere Hilfethemen nach Kategorien geordnet, um die benötigten Informationen schnell und einfach zu finden.', + categoryIds: ['warranty-and-repair', 'maintenance', 'safety', 'accessories', 'troubleshooting'], + parent: { + slug: '/hilfe-und-support', + }, +}; +const MOCK_ARTICLE_LIST_BLOCK_PL: CMS.Model.CategoryListBlock.CategoryListBlock = { + id: 'category-list-1', + title: 'Przeglądaj według kategorii', + description: + 'Przeglądaj nasze tematy pomocy uporządkowane według kategorii, aby szybko i łatwo znaleźć potrzebne informacje.', + categoryIds: ['warranty-and-repair', 'maintenance', 'safety', 'accessories', 'troubleshooting'], + parent: { + slug: '/pomoc-i-wsparcie', + }, +}; + +export const mapCategoryListBlock = (locale: string): CMS.Model.CategoryListBlock.CategoryListBlock => { + switch (locale) { + case 'de': + return { + ...MOCK_ARTICLE_LIST_BLOCK_DE, + }; + case 'pl': + return { + ...MOCK_ARTICLE_LIST_BLOCK_PL, + }; + case 'en': + default: + return { + ...MOCK_ARTICLE_LIST_BLOCK_EN, + }; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.category.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.category.mapper.ts new file mode 100644 index 00000000..1308415f --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.category.mapper.ts @@ -0,0 +1,468 @@ +import { NotFoundException } from '@nestjs/common'; + +import { CMS } from '@o2s/framework/modules'; + +// Warranty & Repair category blocks +const MOCK_WARRANTY_REPAIR_BLOCK_EN: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-1', + categoryId: 'warranty-and-repair', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + parent: { + slug: '/help-and-support', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, + title: 'How-to Articles', + description: + 'Find information about product warranties, repair services, and how to get support for your PowerPro tools.', + pagination: { + limit: 6, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, +}; +const MOCK_WARRANTY_REPAIR_BLOCK_DE: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-1', + categoryId: 'warranty-and-repair', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + parent: { + slug: '/hilfe-und-support', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + }, + title: 'Anleitungsartikel', + description: + 'Finden Sie Informationen zu Produktgarantien, Reparaturservices und wie Sie Unterstützung für Ihre PowerPro-Werkzeuge erhalten können.', + pagination: { + limit: 6, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, +}; +const MOCK_WARRANTY_REPAIR_BLOCK_PL: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-1', + categoryId: 'warranty-and-repair', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + parent: { + slug: '/pomoc-i-wsparcie', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, + title: 'Artykuły instruktażowe', + description: + 'Znajdź informacje o gwarancjach produktów, usługach naprawczych i jak uzyskać wsparcie dla swoich narzędzi PowerPro.', + pagination: { + limit: 6, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, +}; + +// Maintenance category blocks +const MOCK_MAINTENANCE_BLOCK_EN: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-2', + categoryId: 'maintenance', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-2', + }, + ], + parent: { + slug: '/help-and-support', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, + title: 'Maintenance Guides', + description: 'Learn how to maintain your PowerPro tools', + pagination: { + limit: 6, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, +}; +const MOCK_MAINTENANCE_BLOCK_DE: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-2', + categoryId: 'maintenance', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-2', + }, + ], + parent: { + slug: '/hilfe-und-support', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + }, + title: 'Wartungsanleitungen', + description: 'Erfahren Sie, wie Sie Ihre PowerPro-Werkzeuge warten', + pagination: { + limit: 6, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, +}; +const MOCK_MAINTENANCE_BLOCK_PL: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-2', + categoryId: 'maintenance', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-2', + }, + ], + parent: { + slug: '/pomoc-i-wsparcie', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, + title: 'Przewodniki konserwacji', + description: 'Dowiedz się, jak konserwować narzędzia PowerPro', + pagination: { + limit: 6, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, +}; + +// Safety category blocks +const MOCK_SAFETY_BLOCK_EN: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-3', + categoryId: 'safety', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-3', + }, + ], + parent: { + slug: '/help-and-support', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, + title: 'Safety Guidelines', + description: 'Essential safety practices for using PowerPro tools', + pagination: { + limit: 6, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, +}; +const MOCK_SAFETY_BLOCK_DE: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-3', + categoryId: 'safety', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-3', + }, + ], + parent: { + slug: '/hilfe-und-support', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + }, + title: 'Sicherheitsrichtlinien', + description: 'Wesentliche Sicherheitspraktiken für die Verwendung von PowerPro-Werkzeugen', + pagination: { + limit: 6, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, +}; +const MOCK_SAFETY_BLOCK_PL: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-3', + categoryId: 'safety', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-3', + }, + ], + parent: { + slug: '/pomoc-i-wsparcie', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, + title: 'Wytyczne bezpieczeństwa', + description: 'Niezbędne praktyki bezpieczeństwa przy korzystaniu z narzędzi PowerPro', + pagination: { + limit: 6, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, +}; + +// Accessories category blocks +const MOCK_ACCESSORIES_BLOCK_EN: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-4', + categoryId: 'accessories', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-4', + }, + ], + parent: { + slug: '/help-and-support', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, + title: 'Tool Accessories', + description: 'Explore accessories to enhance your PowerPro tools', + pagination: { + limit: 6, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, +}; +const MOCK_ACCESSORIES_BLOCK_DE: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-4', + categoryId: 'accessories', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-4', + }, + ], + parent: { + slug: '/hilfe-und-support', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + }, + title: 'Werkzeugzubehör', + description: 'Entdecken Sie Zubehör zur Verbesserung Ihrer PowerPro-Werkzeuge', + pagination: { + limit: 6, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, +}; +const MOCK_ACCESSORIES_BLOCK_PL: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-4', + categoryId: 'accessories', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-4', + }, + ], + parent: { + slug: '/pomoc-i-wsparcie', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, + title: 'Akcesoria do narzędzi', + description: 'Odkryj akcesoria, które ulepszą Twoje narzędzia PowerPro', + pagination: { + limit: 6, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, +}; + +// Troubleshooting category blocks +const MOCK_TROUBLESHOOTING_BLOCK_EN: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-5', + categoryId: 'troubleshooting', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-4', + }, + ], + parent: { + slug: '/help-and-support', + }, + labels: { + today: 'Today', + yesterday: 'Yesterday', + }, + title: 'Troubleshooting', + description: 'Explore troubleshooting to enhance your PowerPro tools', + pagination: { + limit: 6, + legend: 'of {totalPages} pages', + prev: 'Previous', + next: 'Next', + selectPage: 'Select page', + }, +}; +const MOCK_TROUBLESHOOTING_BLOCK_DE: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-5', + categoryId: 'troubleshooting', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-4', + }, + ], + parent: { + slug: '/hilfe-und-support', + }, + labels: { + today: 'Heute', + yesterday: 'Gestern', + }, + title: 'Fehlerbehebung', + description: 'Entdecken Sie Fehlerbehebung für Ihre PowerPro-Werkzeuge', + pagination: { + limit: 6, + legend: 'von {totalPages} Seiten', + prev: 'Zurück', + next: 'Weiter', + selectPage: 'Seite auswählen', + }, +}; +const MOCK_TROUBLESHOOTING_BLOCK_PL: CMS.Model.CategoryBlock.CategoryBlock = { + id: 'category-5', + categoryId: 'troubleshooting', + componentsPosition: 'bottom', + components: [ + { + __typename: 'FaqBlock', + id: 'faq-4', + }, + ], + parent: { + slug: '/pomoc-i-wsparcie', + }, + labels: { + today: 'Dzisiaj', + yesterday: 'Wczoraj', + }, + title: 'Rozwiązywanie problemów', + description: 'Rozwiązywanie problemów z Twoimi narzędziami PowerPro', + pagination: { + limit: 6, + legend: 'z {totalPages} stron', + prev: 'Poprzednia', + next: 'Następna', + selectPage: 'Wybierz stronę', + }, +}; + +export const mapCategoryBlock = (id: string, locale: string): CMS.Model.CategoryBlock.CategoryBlock => { + switch (id) { + case 'category-1': + if (locale === 'de') { + return MOCK_WARRANTY_REPAIR_BLOCK_DE; + } else if (locale === 'pl') { + return MOCK_WARRANTY_REPAIR_BLOCK_PL; + } else { + return MOCK_WARRANTY_REPAIR_BLOCK_EN; + } + case 'category-2': + if (locale === 'de') { + return MOCK_MAINTENANCE_BLOCK_DE; + } else if (locale === 'pl') { + return MOCK_MAINTENANCE_BLOCK_PL; + } else { + return MOCK_MAINTENANCE_BLOCK_EN; + } + case 'category-3': + if (locale === 'de') { + return MOCK_SAFETY_BLOCK_DE; + } else if (locale === 'pl') { + return MOCK_SAFETY_BLOCK_PL; + } else { + return MOCK_SAFETY_BLOCK_EN; + } + case 'category-4': + if (locale === 'de') { + return MOCK_ACCESSORIES_BLOCK_DE; + } else if (locale === 'pl') { + return MOCK_ACCESSORIES_BLOCK_PL; + } else { + return MOCK_ACCESSORIES_BLOCK_EN; + } + case 'category-5': + if (locale === 'de') { + return MOCK_TROUBLESHOOTING_BLOCK_DE; + } else if (locale === 'pl') { + return MOCK_TROUBLESHOOTING_BLOCK_PL; + } else { + return MOCK_TROUBLESHOOTING_BLOCK_EN; + } + default: + throw new NotFoundException(); + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.fieldMapping.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.fieldMapping.mapper.ts new file mode 100644 index 00000000..46aa8717 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.fieldMapping.mapper.ts @@ -0,0 +1,62 @@ +import { Models } from '@o2s/framework/modules'; + +import { FieldMappingFragment } from '@/generated/contentful'; + +export const mapFields = (component?: FieldMappingFragment[]): Models.Mapping.Mapping => { + if (!component) { + return {}; + } + + return component.reduce((acc, field) => { + if (!field.name) { + return acc; + } + + return { + ...acc, + [field.name]: field.valuesCollection?.items.reduce( + (acc, item) => { + if (!item.key) { + return acc; + } + + return { + ...acc, + [item.key]: item.value || '', + }; + }, + {} as { [key: string]: string }, + ), + }; + }, {} as Models.Mapping.Mapping); +}; + +export const mapFieldsMeta = (component?: FieldMappingFragment[]): Models.Mapping.MappingMeta => { + if (!component) { + return {}; + } + + return component.reduce((acc, field) => { + if (!field.name) { + return acc; + } + + return { + ...acc, + __id: field.sys.id, + [field.name]: field.valuesCollection?.items.reduce((acc, item) => { + if (!item.key) { + return acc; + } + + return { + ...acc, + [item.key]: { + __id: item.sys.id, + value: 'value', + }, + }; + }, {}), + }; + }, {} as Models.Mapping.MappingMeta); +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.footer.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.footer.mapper.ts new file mode 100644 index 00000000..19de6aca --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.footer.mapper.ts @@ -0,0 +1,182 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_FOOTER_EN: CMS.Model.Footer.Footer = { + id: 'laee0xa1zmm9uraev3hpruho', + title: 'Legal and privacy', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + items: [ + { + __typename: 'NavigationGroup', + title: 'Privacy Policy', + items: [ + { + label: 'Privacy Policy 1', + url: 'https://hycom.digital/privacy-policy', + __typename: 'NavigationItem', + }, + { + label: 'Privacy Policy 2', + url: 'https://hycom.digital/privacy-policy', + __typename: 'NavigationItem', + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Terms of Service', + items: [ + { + label: 'Terms of Service 1', + url: 'https://hycom.digital/terms-and-conditions', + __typename: 'NavigationItem', + }, + { + label: 'Terms of Service 2', + url: 'https://hycom.digital/terms-and-conditions', + __typename: 'NavigationItem', + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Cookies Settings', + items: [ + { label: 'Cookies Settings 1', url: '/', __typename: 'NavigationItem' }, + { label: 'Cookies Settings 2', url: '/', __typename: 'NavigationItem' }, + ], + }, + ], + copyright: '© Open Self Service 2025', +}; + +const MOCK_FOOTER_PL: CMS.Model.Footer.Footer = { + id: 'laee0xa1zmm9uraev3hpruho', + title: 'Informacje prawne i prywatność', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + items: [ + { + __typename: 'NavigationGroup', + title: 'Polityka Prywatności', + items: [ + { + label: 'Polityka Prywatności 1', + url: 'https://hycom.digital/privacy-policy', + __typename: 'NavigationItem', + }, + { + label: 'Polityka Prywatności 2', + url: 'https://hycom.digital/privacy-policy', + __typename: 'NavigationItem', + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Warunki Korzystania', + items: [ + { + label: 'Warunki Korzystania 1', + url: 'https://hycom.digital/terms-and-conditions', + __typename: 'NavigationItem', + }, + { + label: 'Warunki Korzystania 2', + url: 'https://hycom.digital/terms-and-conditions', + __typename: 'NavigationItem', + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Ustawienia Plików Cookie', + items: [ + { + label: 'Ustawienia Plików Cookie 1', + url: '/', + __typename: 'NavigationItem', + }, + { + label: 'Ustawienia Plików Cookie 2', + url: '/', + __typename: 'NavigationItem', + }, + ], + }, + ], + copyright: '© Open Self Service 2025', +}; + +const MOCK_FOOTER_DE: CMS.Model.Footer.Footer = { + id: 'laee0xa1zmm9uraev3hpruho', + title: 'Rechtliches und Datenschutz', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + items: [ + { + __typename: 'NavigationGroup', + title: 'Datenschutzrichtlinie', + items: [ + { + label: 'Datenschutzrichtlinie 1', + url: 'https://hycom.digital/privacy-policy', + __typename: 'NavigationItem', + }, + { + label: 'Datenschutzrichtlinie 2', + url: 'https://hycom.digital/privacy-policy', + __typename: 'NavigationItem', + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Nutzungsbedingungen', + items: [ + { + label: 'Nutzungsbedingungen 1', + url: 'https://hycom.digital/terms-and-conditions', + __typename: 'NavigationItem', + }, + { + label: 'Nutzungsbedingungen 2', + url: 'https://hycom.digital/terms-and-conditions', + __typename: 'NavigationItem', + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Cookie-Einstellungen', + items: [ + { label: 'Cookie-Einstellungen 1', url: '/', __typename: 'NavigationItem' }, + { label: 'Cookie-Einstellungen 2', url: '/', __typename: 'NavigationItem' }, + ], + }, + ], + copyright: '© Open Self Service 2025', +}; + +export const mapFooter = (locale: string): CMS.Model.Footer.Footer => { + switch (locale) { + case 'pl': + return MOCK_FOOTER_PL; + case 'de': + return MOCK_FOOTER_DE; + default: + return MOCK_FOOTER_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.header.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.header.mapper.ts new file mode 100644 index 00000000..46079b3f --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.header.mapper.ts @@ -0,0 +1,261 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +const MOCK_HEADER_LOGON_EN: CMS.Model.Header.Header = { + id: 'fqj6nnyk4irqq5b7rnc4ogsj', + title: 'MOCK_HEADER_LOGON_EN', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + languageSwitcherLabel: 'Language', + mobileMenuLabel: { + open: 'Open menu', + close: 'Close Menu', + }, + userInfo: { + url: '/user-account', + label: 'User Profile', + }, + items: [ + { + __typename: 'NavigationGroup', + title: 'Customer Portal', + items: [ + { + __typename: 'NavigationItem', + label: 'Dashboard', + url: '/', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Cases', + url: '/cases', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Invoices', + url: '/invoices', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Notifications', + url: '/notifications', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Services', + url: '/services', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Orders', + url: '/orders', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Help & Support', + items: [ + { + __typename: 'NavigationItem', + label: 'Welcome Hub', + url: '/help-and-support', + }, + ], + }, + ], + notification: { + url: '/notifications', + label: 'Notifications', + }, + contextSwitcher: { + closeLabel: 'Close', + showContextSwitcher: true, + }, +}; +const MOCK_HEADER_LOGON_DE: CMS.Model.Header.Header = { + id: 'fqj6nnyk4irqq5b7rnc4ogsj', + title: 'MOCK_HEADER_LOGON_DE', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + languageSwitcherLabel: 'Sprache', + mobileMenuLabel: { + open: 'Menü öffnen', + close: 'Menü schließen', + }, + userInfo: { + url: '/user-account', + label: 'Benutzerprofil', + }, + items: [ + { + __typename: 'NavigationGroup', + title: 'Kunden Portal', + items: [ + { + __typename: 'NavigationItem', + label: 'Startseite', + url: '/', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Fälle', + url: '/faelle', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Rechnungen', + url: '/rechnungen', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Benachrichtigungen', + url: '/benachrichtigungen', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Dienstleistungen', + url: '/dienstleistungen', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Bestellungen', + url: '/bestellungen', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Hilfe & Support', + items: [ + { + __typename: 'NavigationItem', + label: 'Willkommen Hub', + url: '/hilfe-und-support', + }, + ], + }, + ], + notification: { + url: '/benachrichtigungen', + label: 'Benachrichtigungen', + }, + contextSwitcher: { + closeLabel: 'Schließen', + showContextSwitcher: true, + }, +}; +const MOCK_HEADER_LOGON_PL: CMS.Model.Header.Header = { + id: 'fqj6nnyk4irqq5b7rnc4ogsj', + title: 'MOCK_HEADER_LOGON_PL', + logo: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg', + alt: 'Logo', + width: 92, + height: 24, + }, + languageSwitcherLabel: 'Język', + mobileMenuLabel: { + open: 'Otwórz menu', + close: 'Zamknij menu', + }, + userInfo: { + url: '/konto-uzytkownika', + label: 'Profil użytkownika', + }, + items: [ + { + __typename: 'NavigationGroup', + title: 'Portal klienta', + items: [ + { + __typename: 'NavigationItem', + label: 'Strona główna', + url: '/', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Zgłoszenia', + url: '/zgloszenia', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Rachunki', + url: '/rachunki', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Powiadomienia', + url: '/powiadomienia', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Usługi', + url: '/uslugi', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + { + __typename: 'NavigationItem', + label: 'Zamówienia', + url: '/zamowienia', + permissions: [Auth.Constants.Roles.ORG_USER], + }, + ], + }, + { + __typename: 'NavigationGroup', + title: 'Pomoc & Wsparcie', + items: [ + { + __typename: 'NavigationItem', + label: 'Centrum powitalne', + url: '/pomoc-i-wsparcie', + }, + ], + }, + ], + notification: { + url: '/powiadomienia', + label: 'Powiadomienia', + }, + contextSwitcher: { + closeLabel: 'Zamknij', + showContextSwitcher: true, + }, +}; + +export const mapHeader = (id: string, locale: string): CMS.Model.Header.Header => { + const headerList = [MOCK_HEADER_LOGON_EN, MOCK_HEADER_LOGON_DE, MOCK_HEADER_LOGON_PL]; + + const header = headerList + .filter((header) => header.title?.endsWith(locale.toUpperCase())) + .find((header) => header.id === id); + + if (!header) { + return MOCK_HEADER_LOGON_EN; + } + return header; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.login-page.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.login-page.mapper.ts new file mode 100644 index 00000000..3a1d1d0b --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.login-page.mapper.ts @@ -0,0 +1,308 @@ +import { CMS } from '@o2s/framework/modules'; + +const LOGIN_PAGE_PL: CMS.Model.LoginPage.LoginPage = { + title: 'Zaloguj się', + subtitle: 'Wprowadź swój email i hasło, aby uzyskać dostęp do konta', + username: { + __typename: 'Input', + id: 'username-1', + name: 'username', + label: 'Nazwa użytkownika', + placeholder: 'Wprowadź nazwę użytkownika', + errorMessages: [ + { + type: 'required', + description: 'Nazwa użytkownika jest wymagana', + id: 'required-1', + name: 'Required', + }, + { + type: 'matches', + description: 'Nazwa użytkownika może zawierać tylko litery, cyfry, kropki, myślniki i znak @', + id: 'matches-1', + name: 'Matches', + }, + { + type: 'min', + description: 'Nazwa użytkownika musi zawierać co najmniej 5 znaków', + id: 'min-1', + name: 'Min', + }, + ], + }, + password: { + __typename: 'Input', + id: 'password-1', + name: 'password', + label: 'Hasło', + placeholder: 'Wprowadź swoje hasło', + errorMessages: [ + { + type: 'required', + description: 'Hasło jest wymagane', + id: 'required-1', + name: 'Required', + }, + { + type: 'min', + description: 'Hasło musi zawierać co najmniej 4 znaki', + id: 'min-1', + name: 'Min', + }, + { + type: 'matches', + description: 'Hasło musi zawierać co najmniej 4 znaki', + id: 'matches-1', + name: 'Matches', + }, + ], + }, + signIn: 'Zaloguj się', + providers: { + title: 'LUB', + label: 'Zaloguj się przez ', + }, + createdAt: '2024-01-01', + updatedAt: '2024-01-01', + publishedAt: '2024-01-01', + labels: { + show: 'Pokaż', + hide: 'Ukryj', + }, + image: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/sign-in.jpg', + alt: 'Sign in image', + width: 640, + height: 656, + }, + seo: { + title: 'Zaloguj się', + description: 'Wprowadź swój email i hasło, aby uzyskać dostęp do konta', + keywords: ['zaloguj się', 'hasło', 'email'], + image: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/sign-in.jpg', + alt: 'Sign in image', + width: 640, + height: 656, + }, + noIndex: false, + noFollow: false, + }, + invalidCredentials: 'Nieprawidłowe dane logowania', +}; + +const LOGIN_PAGE_EN: CMS.Model.LoginPage.LoginPage = { + title: 'Sign in', + subtitle: 'Please enter your email and password below to access your account.', + username: { + __typename: 'Input', + id: 'username-1', + name: 'username', + label: 'Username', + placeholder: 'Enter your username', + errorMessages: [ + { + type: 'required', + description: 'Username is required', + id: 'required-1', + name: 'Required', + }, + { + type: 'matches', + description: 'Username can only contain letters, numbers, dots, hyphens and @', + id: 'matches-1', + name: 'Matches', + }, + { + type: 'min', + description: 'Username must contain at least 5 characters', + id: 'min-1', + name: 'Min', + }, + ], + }, + password: { + __typename: 'Input', + id: 'password-1', + name: 'password', + label: 'Password', + placeholder: 'Enter your password', + errorMessages: [ + { + type: 'required', + description: 'Password is required', + id: 'required-1', + name: 'Required', + }, + { + type: 'min', + description: 'Password must contain at least 4 characters', + id: 'min-1', + name: 'Min', + }, + { + type: 'matches', + description: 'Password must contain at least 4 characters', + id: 'matches-1', + name: 'Matches', + }, + ], + }, + signIn: 'Sign in', + providers: { + title: 'OR', + label: 'Sign in with ', + }, + createdAt: '2024-01-01', + updatedAt: '2024-01-01', + publishedAt: '2024-01-01', + labels: { + show: 'Show', + hide: 'Hide', + }, + image: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/sign-in.jpg', + alt: 'Sign in image', + width: 640, + height: 656, + }, + seo: { + title: 'Sign in | Open Self Service demo application', + description: + "Demo app of Open Self Service. Build future-proof Customer Portals with composable architecture and a modern frontend tech stack. Open Self Service offers a Next.js boilerplate, an API integration & data normalization server, and capabilities to integrate headless APIs like CMS, CRM, Search or headless e-commerce. It's powered by Next.js, React.js, TypeScript, and NestJS.", + keywords: [ + 'Open Self Service', + 'open source customer portal', + 'headless customer portal', + 'composable frontend', + 'fullstack framework', + 'composable architecture', + 'MACH', + 'Next.js', + 'TypeScript', + 'NestJS', + 'headless integration', + 'customer portal framework', + 'headless CMS', + 'headless self service', + 'CRM headless frontend', + 'e-commerce API', + 'self-service platform', + 'open-source frontend', + 'composable CX', + ], + image: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/o2s-social-card-1.jpg', + alt: 'Open Self Service - The Open Source Composable Frontend for Customer Portals', + width: 640, + height: 656, + }, + noIndex: false, + noFollow: false, + }, + invalidCredentials: 'Invalid credentials', +}; + +const LOGIN_PAGE_DE: CMS.Model.LoginPage.LoginPage = { + title: 'Einloggen', + subtitle: 'Geben Sie Ihre E-Mail und Ihr Passwort ein, um auf Ihr Konto zuzugreifen', + username: { + __typename: 'Input', + id: 'username-1', + name: 'username', + label: 'Benutzername', + placeholder: 'Geben Sie Ihren Benutzernamen ein', + errorMessages: [ + { + type: 'required', + description: 'Benutzername ist erforderlich', + id: 'required-1', + name: 'Required', + }, + { + type: 'min', + description: 'Benutzername muss mindestens 5 Zeichen lang sein', + id: 'min-1', + name: 'Min', + }, + { + type: 'matches', + description: 'Benutzername kann nur Buchstaben, Zahlen, Punkte, Bindestriche und @ enthalten', + id: 'matches-1', + name: 'Matches', + }, + ], + }, + password: { + __typename: 'Input', + id: 'password-1', + name: 'password', + label: 'Passwort', + placeholder: 'Geben Sie Ihr Passwort ein', + errorMessages: [ + { + type: 'required', + description: 'Passwort ist erforderlich', + id: 'required-1', + name: 'Required', + }, + { + type: 'min', + description: 'Passwort muss mindestens 4 Zeichen lang sein', + id: 'min-1', + name: 'Min', + }, + { + type: 'matches', + description: 'Passwort muss mindestens 4 Zeichen lang sein', + id: 'matches-1', + name: 'Matches', + }, + ], + }, + signIn: 'Anmelden', + providers: { + title: 'ODER', + label: 'Anmelden mit ', + }, + createdAt: '2024-01-01', + updatedAt: '2024-01-01', + publishedAt: '2024-01-01', + labels: { + show: 'Anzeigen', + hide: 'Verbergen', + }, + image: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/sign-in.jpg', + alt: 'Sign in image', + width: 640, + height: 656, + }, + seo: { + title: 'Einloggen', + description: 'Geben Sie Ihre E-Mail und Ihr Passwort ein, um auf Ihr Konto zuzugreifen', + keywords: ['einloggen', 'passwort', 'email'], + image: { + url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/sign-in.jpg', + alt: 'Sign in image', + width: 640, + height: 656, + }, + noIndex: false, + noFollow: false, + }, + invalidCredentials: 'Ungültige Anmeldeinformationen', +}; + +export const mapLoginPage = (locale: string): CMS.Model.LoginPage.LoginPage => { + switch (locale) { + case 'en': + return LOGIN_PAGE_EN; + case 'de': + return LOGIN_PAGE_DE; + case 'pl': + return LOGIN_PAGE_PL; + } + + return LOGIN_PAGE_EN; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.not-found-page.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.not-found-page.mapper.ts new file mode 100644 index 00000000..21d1a788 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.not-found-page.mapper.ts @@ -0,0 +1,35 @@ +import { CMS } from '@o2s/framework/modules'; + +const NOT_FOUND_PAGE_PL: CMS.Model.NotFoundPage.NotFoundPage = { + title: 'Strona nie znaleziona', + description: 'Strona, której szukasz, nie istnieje.', + url: '/', + urlLabel: 'Przejdź do strony głównej', +}; + +const NOT_FOUND_PAGE_EN: CMS.Model.NotFoundPage.NotFoundPage = { + title: 'Page not found', + description: 'The page you are looking for does not exist.', + url: '/', + urlLabel: 'Go to home page', +}; + +const NOT_FOUND_PAGE_DE: CMS.Model.NotFoundPage.NotFoundPage = { + title: 'Seite nicht gefunden', + description: 'Die Seite, die Sie suchen, existiert nicht.', + url: '/', + urlLabel: 'Zur Startseite wechseln', +}; + +export const mapNotFoundPage = (locale: string): CMS.Model.NotFoundPage.NotFoundPage => { + switch (locale) { + case 'en': + return NOT_FOUND_PAGE_EN; + case 'de': + return NOT_FOUND_PAGE_DE; + case 'pl': + return NOT_FOUND_PAGE_PL; + } + + return NOT_FOUND_PAGE_EN; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.organization-list.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.organization-list.mapper.ts new file mode 100644 index 00000000..40de80e6 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.organization-list.mapper.ts @@ -0,0 +1,39 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_ORGANIZATION_LIST_EN: CMS.Model.OrganizationList.OrganizationList = { + id: 'organization-list-1', + title: 'Organizations', + description: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', + labels: { + apply: 'Apply', + }, +}; + +const MOCK_ORGANIZATION_LIST_DE: CMS.Model.OrganizationList.OrganizationList = { + id: 'organization-list-1', + title: 'Organizations', + description: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', + labels: { + apply: 'Anwenden', + }, +}; + +const MOCK_ORGANIZATION_LIST_PL: CMS.Model.OrganizationList.OrganizationList = { + id: 'organization-list-1', + title: 'Organizations', + description: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', + labels: { + apply: 'Zastosuj', + }, +}; + +export const mapOrganizationList = (locale: string): CMS.Model.OrganizationList.OrganizationList => { + switch (locale) { + case 'de': + return MOCK_ORGANIZATION_LIST_DE; + case 'pl': + return MOCK_ORGANIZATION_LIST_PL; + default: + return MOCK_ORGANIZATION_LIST_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.page.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.page.mapper.ts new file mode 100644 index 00000000..a2569157 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.page.mapper.ts @@ -0,0 +1,513 @@ +import { NotFoundException } from '@nestjs/common'; + +import { CMS, Models } from '@o2s/framework/modules'; + +import { ComponentBaseFragment, OneColumnTemplateFragment, PageFragment, SeoFragment } from '@/generated/contentful'; + +import { + PAGE_ACCESSORIES_DE, + PAGE_ACCESSORIES_EN, + PAGE_ACCESSORIES_PL, + PAGE_MAINTENANCE_DE, + PAGE_MAINTENANCE_EN, + PAGE_MAINTENANCE_PL, + PAGE_SAFETY_DE, + PAGE_SAFETY_EN, + PAGE_SAFETY_PL, + PAGE_TROUBLESHOOTING_DE, + PAGE_TROUBLESHOOTING_EN, + PAGE_TROUBLESHOOTING_PL, + PAGE_WARRANTY_AND_REPAIR_DE, + PAGE_WARRANTY_AND_REPAIR_EN, + PAGE_WARRANTY_AND_REPAIR_PL, +} from './mocks/pages/category.page'; +import { PAGE_DASHBOARD_DE, PAGE_DASHBOARD_EN, PAGE_DASHBOARD_PL } from './mocks/pages/dashboard.page'; +import { PAGE_INVOICE_LIST_DE, PAGE_INVOICE_LIST_EN, PAGE_INVOICE_LIST_PL } from './mocks/pages/invoice-list.page'; +import { + PAGE_HELP_AND_SUPPORT_DE, + PAGE_HELP_AND_SUPPORT_EN, + PAGE_HELP_AND_SUPPORT_PL, +} from './mocks/pages/knowledge-base.page'; +import { + PAGE_NOTIFICATION_DETAILS_DE, + PAGE_NOTIFICATION_DETAILS_EN, + PAGE_NOTIFICATION_DETAILS_PL, +} from './mocks/pages/notification-details.page'; +import { + PAGE_NOTIFICATION_LIST_DE, + PAGE_NOTIFICATION_LIST_EN, + PAGE_NOTIFICATION_LIST_PL, +} from './mocks/pages/notification-list.page'; +import { PAGE_ORDER_DETAILS_DE, PAGE_ORDER_DETAILS_EN, PAGE_ORDER_DETAILS_PL } from './mocks/pages/order-details.page'; +import { PAGE_ORDER_LIST_DE, PAGE_ORDER_LIST_EN, PAGE_ORDER_LIST_PL } from './mocks/pages/order-list.page'; +import { + PAGE_SERVICE_DETAILS_DE, + PAGE_SERVICE_DETAILS_EN, + PAGE_SERVICE_DETAILS_PL, +} from './mocks/pages/service-details.page'; +import { PAGE_SERVICE_LIST_DE, PAGE_SERVICE_LIST_EN, PAGE_SERVICE_LIST_PL } from './mocks/pages/service-list.page'; +import { + PAGE_COMPLAINT_FORM_DE, + PAGE_COMPLAINT_FORM_EN, + PAGE_COMPLAINT_FORM_PL, + PAGE_CONTACT_US_DE, + PAGE_CONTACT_US_EN, + PAGE_CONTACT_US_PL, + PAGE_REQUEST_DEVICE_MAINTENANCE_DE, + PAGE_REQUEST_DEVICE_MAINTENANCE_EN, + PAGE_REQUEST_DEVICE_MAINTENANCE_PL, +} from './mocks/pages/surveyjs-forms.page'; +import { + PAGE_TICKET_DETAILS_DE, + PAGE_TICKET_DETAILS_EN, + PAGE_TICKET_DETAILS_PL, +} from './mocks/pages/ticket-details.page'; +import { PAGE_TICKET_LIST_DE, PAGE_TICKET_LIST_EN, PAGE_TICKET_LIST_PL } from './mocks/pages/ticket-list.page'; +import { PAGE_USER_ACCOUNT_DE, PAGE_USER_ACCOUNT_EN, PAGE_USER_ACCOUNT_PL } from './mocks/pages/user-account.page'; + +export const mapMockPage = (slug: string, locale: string): CMS.Model.Page.Page | undefined => { + switch (slug) { + case '/': + return locale === 'pl' ? PAGE_DASHBOARD_PL : locale === 'de' ? PAGE_DASHBOARD_DE : PAGE_DASHBOARD_EN; + + case '/zgloszenia': + return PAGE_TICKET_LIST_PL; + + case '/faelle': + return PAGE_TICKET_LIST_DE; + + case '/cases': + return PAGE_TICKET_LIST_EN; + + case slug.match(/\/cases\/.+/)?.[0]: + return { + ...PAGE_TICKET_DETAILS_EN, + slug: `/cases/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/faelle\/.+/)?.[0]: + return { + ...PAGE_TICKET_DETAILS_DE, + slug: `/faelle/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/zgloszenia\/.+/)?.[0]: + return { + ...PAGE_TICKET_DETAILS_PL, + slug: `/zgloszenia/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + + case '/notifications': + return PAGE_NOTIFICATION_LIST_EN; + case '/benachrichtigungen': + return PAGE_NOTIFICATION_LIST_DE; + case '/powiadomienia': + return PAGE_NOTIFICATION_LIST_PL; + + case slug.match(/\/notifications\/.+/)?.[0]: + return { + ...PAGE_NOTIFICATION_DETAILS_EN, + slug: `/notifications/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + + case slug.match(/\/benachrichtigungen\/.+/)?.[0]: + return { + ...PAGE_NOTIFICATION_DETAILS_DE, + slug: `/benachrichtigungen/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/powiadomienia\/.+/)?.[0]: + return { + ...PAGE_NOTIFICATION_DETAILS_PL, + slug: `/powiadomienia/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + + case '/invoices': + return PAGE_INVOICE_LIST_EN; + case '/rechnungen': + return PAGE_INVOICE_LIST_DE; + case '/rachunki': + return PAGE_INVOICE_LIST_PL; + + case '/user-account': + return PAGE_USER_ACCOUNT_EN; + case '/benutzerkonto': + return PAGE_USER_ACCOUNT_DE; + case '/konto-uzytkownika': + return PAGE_USER_ACCOUNT_PL; + + case '/services': + return PAGE_SERVICE_LIST_EN; + case '/dienstleistungen': + return PAGE_SERVICE_LIST_DE; + case '/uslugi': + return PAGE_SERVICE_LIST_PL; + + case slug.match(/\/services\/.+/)?.[0]: + return { + ...PAGE_SERVICE_DETAILS_EN, + slug: `/services/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/dienstleistungen\/.+/)?.[0]: + return { + ...PAGE_SERVICE_DETAILS_DE, + slug: `/dienstleistungen/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/uslugi\/.+/)?.[0]: + return { + ...PAGE_SERVICE_DETAILS_PL, + slug: `/uslugi/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case '/orders': + return PAGE_ORDER_LIST_EN; + case '/bestellungen': + return PAGE_ORDER_LIST_DE; + case '/zamowienia': + return PAGE_ORDER_LIST_PL; + + case slug.match(/\/orders\/.+/)?.[0]: + return { + ...PAGE_ORDER_DETAILS_EN, + slug: `/orders/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/bestellungen\/.+/)?.[0]: + return { + ...PAGE_ORDER_DETAILS_DE, + slug: `/bestellungen/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + case slug.match(/\/zamowienia\/.+/)?.[0]: + return { + ...PAGE_ORDER_DETAILS_PL, + slug: `/zamowienia/${slug.match(/(.+)\/(.+)/)?.[2]}`, + updatedAt: '2025-01-01', + }; + + case '/contact-us': + return PAGE_CONTACT_US_EN; + case '/kontaktiere-uns': + return PAGE_CONTACT_US_DE; + case '/skontaktuj-sie-z-nami': + return PAGE_CONTACT_US_PL; + + case '/submit-complaint': + return PAGE_COMPLAINT_FORM_EN; + case '/einreichen-reklamacji': + return PAGE_COMPLAINT_FORM_DE; + case '/wyslij-reklamacje': + return PAGE_COMPLAINT_FORM_PL; + + case '/request-device-maintenance': + return PAGE_REQUEST_DEVICE_MAINTENANCE_EN; + case '/geratewartungsanfrage': + return PAGE_REQUEST_DEVICE_MAINTENANCE_DE; + case '/zglos-naprawe-urzadzenia': + return PAGE_REQUEST_DEVICE_MAINTENANCE_PL; + + case '/help-and-support': + return PAGE_HELP_AND_SUPPORT_EN; + case '/hilfe-und-support': + return PAGE_HELP_AND_SUPPORT_DE; + case '/pomoc-i-wsparcie': + return PAGE_HELP_AND_SUPPORT_PL; + + case '/help-and-support/warranty-and-repair': + return PAGE_WARRANTY_AND_REPAIR_EN; + case '/hilfe-und-support/garantie-und-reparaturt': + return PAGE_WARRANTY_AND_REPAIR_DE; + case '/pomoc-i-wsparcie/gwarancja-i-naprawa': + return PAGE_WARRANTY_AND_REPAIR_PL; + + case '/help-and-support/maintenance': + return PAGE_MAINTENANCE_EN; + case '/hilfe-und-support/wartung': + return PAGE_MAINTENANCE_DE; + case '/pomoc-i-wsparcie/konserwacja': + return PAGE_MAINTENANCE_PL; + + case '/help-and-support/safety': + return PAGE_SAFETY_EN; + case '/hilfe-und-support/sicherheit': + return PAGE_SAFETY_DE; + case '/pomoc-i-wsparcie/bezpieczenstwo': + return PAGE_SAFETY_PL; + + case '/help-and-support/accessories': + return PAGE_ACCESSORIES_EN; + case '/hilfe-und-support/zubehoer': + return PAGE_ACCESSORIES_DE; + case '/pomoc-i-wsparcie/akcesoria': + return PAGE_ACCESSORIES_PL; + + case '/help-and-support/troubleshooting': + return PAGE_TROUBLESHOOTING_EN; + case '/hilfe-und-support/fehlerbehebung': + return PAGE_TROUBLESHOOTING_DE; + case '/pomoc-i-wsparcie/rozwiązywanie-problemów': + return PAGE_TROUBLESHOOTING_PL; + + default: + return undefined; + } +}; + +export const getAllPages = (locale: string): CMS.Model.Page.Page[] => { + switch (locale) { + case 'pl': + return [ + PAGE_DASHBOARD_PL, + PAGE_TICKET_LIST_PL, + PAGE_TICKET_DETAILS_PL, + PAGE_NOTIFICATION_LIST_PL, + PAGE_NOTIFICATION_DETAILS_PL, + PAGE_INVOICE_LIST_PL, + PAGE_USER_ACCOUNT_PL, + PAGE_SERVICE_LIST_PL, + PAGE_SERVICE_DETAILS_PL, + PAGE_CONTACT_US_PL, + PAGE_COMPLAINT_FORM_PL, + PAGE_REQUEST_DEVICE_MAINTENANCE_PL, + PAGE_ORDER_LIST_PL, + PAGE_ORDER_DETAILS_PL, + PAGE_WARRANTY_AND_REPAIR_PL, + PAGE_MAINTENANCE_PL, + PAGE_SAFETY_PL, + PAGE_ACCESSORIES_PL, + ]; + case 'de': + return [ + PAGE_DASHBOARD_DE, + PAGE_TICKET_LIST_DE, + PAGE_TICKET_DETAILS_DE, + PAGE_NOTIFICATION_LIST_DE, + PAGE_NOTIFICATION_DETAILS_DE, + PAGE_INVOICE_LIST_DE, + PAGE_USER_ACCOUNT_DE, + PAGE_SERVICE_LIST_DE, + PAGE_SERVICE_DETAILS_DE, + PAGE_CONTACT_US_DE, + PAGE_COMPLAINT_FORM_DE, + PAGE_REQUEST_DEVICE_MAINTENANCE_DE, + PAGE_ORDER_LIST_DE, + PAGE_ORDER_DETAILS_DE, + PAGE_WARRANTY_AND_REPAIR_DE, + PAGE_MAINTENANCE_DE, + PAGE_SAFETY_DE, + PAGE_ACCESSORIES_DE, + ]; + case 'en': + return [ + PAGE_DASHBOARD_EN, + PAGE_TICKET_LIST_EN, + PAGE_TICKET_DETAILS_EN, + PAGE_NOTIFICATION_LIST_EN, + PAGE_NOTIFICATION_DETAILS_EN, + PAGE_INVOICE_LIST_EN, + PAGE_USER_ACCOUNT_EN, + PAGE_SERVICE_LIST_EN, + PAGE_SERVICE_DETAILS_EN, + PAGE_CONTACT_US_EN, + PAGE_COMPLAINT_FORM_EN, + PAGE_REQUEST_DEVICE_MAINTENANCE_EN, + PAGE_ORDER_LIST_EN, + PAGE_ORDER_DETAILS_EN, + PAGE_WARRANTY_AND_REPAIR_EN, + PAGE_MAINTENANCE_EN, + PAGE_SAFETY_EN, + PAGE_ACCESSORIES_EN, + ]; + default: + return []; + } +}; + +export const getAlternativePages = (id: string, slug: string, locale: string): CMS.Model.Page.Page[] => { + return [ + PAGE_DASHBOARD_PL, + PAGE_TICKET_LIST_PL, + PAGE_TICKET_DETAILS_PL, + PAGE_NOTIFICATION_LIST_PL, + PAGE_NOTIFICATION_DETAILS_PL, + PAGE_INVOICE_LIST_PL, + PAGE_USER_ACCOUNT_PL, + PAGE_SERVICE_LIST_PL, + PAGE_DASHBOARD_DE, + PAGE_TICKET_LIST_DE, + PAGE_TICKET_DETAILS_DE, + PAGE_NOTIFICATION_LIST_DE, + PAGE_NOTIFICATION_DETAILS_DE, + PAGE_INVOICE_LIST_DE, + PAGE_USER_ACCOUNT_DE, + PAGE_SERVICE_LIST_DE, + PAGE_DASHBOARD_EN, + PAGE_TICKET_LIST_EN, + PAGE_TICKET_DETAILS_EN, + PAGE_NOTIFICATION_LIST_EN, + PAGE_NOTIFICATION_DETAILS_EN, + PAGE_INVOICE_LIST_EN, + PAGE_USER_ACCOUNT_EN, + PAGE_SERVICE_LIST_EN, + PAGE_SERVICE_DETAILS_EN, + PAGE_SERVICE_DETAILS_DE, + PAGE_SERVICE_DETAILS_PL, + PAGE_CONTACT_US_EN, + PAGE_CONTACT_US_DE, + PAGE_CONTACT_US_PL, + PAGE_COMPLAINT_FORM_EN, + PAGE_COMPLAINT_FORM_DE, + PAGE_COMPLAINT_FORM_PL, + PAGE_REQUEST_DEVICE_MAINTENANCE_EN, + PAGE_REQUEST_DEVICE_MAINTENANCE_DE, + PAGE_REQUEST_DEVICE_MAINTENANCE_PL, + PAGE_ORDER_LIST_EN, + PAGE_ORDER_LIST_DE, + PAGE_ORDER_LIST_PL, + PAGE_ORDER_DETAILS_EN, + PAGE_ORDER_DETAILS_DE, + PAGE_ORDER_DETAILS_PL, + PAGE_WARRANTY_AND_REPAIR_EN, + PAGE_WARRANTY_AND_REPAIR_DE, + PAGE_WARRANTY_AND_REPAIR_PL, + PAGE_MAINTENANCE_EN, + PAGE_MAINTENANCE_DE, + PAGE_MAINTENANCE_PL, + PAGE_SAFETY_EN, + PAGE_SAFETY_DE, + PAGE_SAFETY_PL, + PAGE_ACCESSORIES_EN, + PAGE_ACCESSORIES_DE, + PAGE_ACCESSORIES_PL, + ] + .filter((page) => page.id === id) + .map((page) => mapMockPage(page.slug, locale)!) + .map((page) => { + return { + ...page, + slug: page.slug.replace('(.+)', slug.match(/(.+)\/(.+)/)?.[2] || ''), + }; + }); +}; + +export const mapPage = (entryPage: PageFragment): CMS.Model.Page.Page => { + const template = mapTemplate(entryPage.template); + + if (!template) throw new NotFoundException(); + + const seo = mapSeo(entryPage.seo); + + return { + id: entryPage.sys.id, + slug: entryPage.slug || '', + locale: entryPage.sys.locale || process.env.DEFAULT_LOCALE!, + template: template, + updatedAt: entryPage.sys.publishedAt, + createdAt: entryPage.sys.publishedAt, + seo: seo, + hasOwnTitle: !!entryPage.hasOwnTitle, + parent: entryPage.parent + ? { + slug: entryPage.parent.slug ?? '', + seo: mapSeo(entryPage.parent.seo), + parent: entryPage.parent.parent + ? { + slug: entryPage.parent.parent.slug ?? '', + seo: mapSeo(entryPage.parent.parent.seo), + parent: entryPage.parent.parent.parent + ? { + slug: entryPage.parent.parent.parent.slug ?? '', + seo: mapSeo(entryPage.parent.parent.parent.seo), + } + : undefined, + } + : undefined, + } + : undefined, + }; +}; + +const mapSeo = (seo?: SeoFragment): Models.SEO.Page => { + if (!seo) throw new NotFoundException(); + + return { + title: seo.title ?? '', + noIndex: seo.noIndex ?? false, + noFollow: seo.noFollow ?? false, + description: seo.description ?? '', + keywords: seo.keywords || [], + // TODO: implement image + // image: seo?.image, + }; +}; + +const mapTemplate = (template?: OneColumnTemplateFragment): CMS.Model.Page.PageTemplate => { + if (!template) throw new NotFoundException(); + + switch (template.__typename) { + case 'PageOneColumnTemplate': + return { + __typename: 'OneColumnTemplate', + slots: { + main: mapSlot(template.mainSlotCollection?.items), + }, + }; + // TODO: add two column template + // case 'pageTwoColumnTemplate': + // return { + // __typename: 'TwoColumnTemplate', + // slots: { + // top: mapSlot(template.topSlot), + // left: mapSlot(template.leftSlot), + // right: mapSlot(template.rightSlot), + // bottom: mapSlot(template.bottomSlot), + // }, + // }; + } +}; + +const mapSlot = (slot?: ComponentBaseFragment[]): CMS.Model.Page.SlotBlock[] => { + if (!slot) { + return []; + } + + return slot.reduce((acc, component) => { + const __typename = mapComponent(component); + + if (!__typename) return acc; + + return [ + ...acc, + { + __typename, + id: component.sys.id, + layout: mapLayout(component), + }, + ]; + }, [] as CMS.Model.Page.SlotBlock[]); +}; + +const mapLayout = ({ spacing }: ComponentBaseFragment): CMS.Model.Page.LayoutSection => { + return { + spacing: spacing as CMS.Model.Page.LayoutSection['spacing'], + // TODO: add the rest of the layout properties + // background: background, + // variant: variant, + // theme: theme?.name, + }; +}; + +// TODO: check where component names should be defined, currently they are placed in the api-harmonization so we cannot access them here +const mapComponent = (component: ComponentBaseFragment) => { + switch (component.content?.__typename) { + case 'BlockFaq': + return 'FaqBlock'; + case 'BlockTicketList': + return 'TicketListBlock'; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.pagination.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.pagination.mapper.ts new file mode 100644 index 00000000..aadcf114 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.pagination.mapper.ts @@ -0,0 +1,15 @@ +import { Models } from '@o2s/framework/modules'; + +import { PaginationFragment } from '@/generated/contentful'; + +export const mapPagination = (component?: PaginationFragment): Models.Pagination.Pagination | undefined => { + if (!component) return undefined; + + return { + limit: component.perPage || 10, + legend: component.description || '', + prev: component.previousLabel || '', + next: component.nextLabel || '', + selectPage: component.selectPageLabel || '', + }; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.quick-links.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.quick-links.mapper.ts new file mode 100644 index 00000000..43c31315 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.quick-links.mapper.ts @@ -0,0 +1,123 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_QUICK_LINKS_BLOCK_EN: CMS.Model.QuickLinksBlock.QuickLinksBlock = { + id: 'quick-links-1', + title: 'Find it in an instant', + description: 'Quick access to our most popular tools and services to help you get what you need without delay.', + items: [ + { + label: 'Find a retailer', + url: '/contact-us', + description: + 'Locate authorized retailers and service centers near you for in-person assistance, product demos, and expert advice.', + icon: 'MapPin', + }, + { + label: 'Online repair', + url: '/help-and-support/warranty-and-repair/managing-your-powerpro-tools-online', + description: + 'Diagnose and schedule repairs for your tools online. Get quick service estimates and track repair status in real-time.', + icon: 'Drill', + }, + { + label: 'View Invoices', + url: '/invoices', + description: + 'Access and download your invoices and payment history. Keep track of all your transactions in one place.', + icon: 'CreditCard', + }, + { + label: 'View Orders', + url: '/orders', + description: + 'Track and manage your orders. View order history, check status, and access order details in one place.', + icon: 'ShoppingBag', + }, + ], +}; + +const MOCK_QUICK_LINKS_BLOCK_DE: CMS.Model.QuickLinksBlock.QuickLinksBlock = { + id: 'quick-links-1', + title: 'Finden Sie es im Handumdrehen', + description: + 'Schneller Zugriff auf unsere beliebtesten Tools und Dienste, um Ihnen zu helfen, das zu bekommen, was Sie ohne Verzögerung benötigen.', + items: [ + { + label: 'Händler finden', + url: '/kontaktiere-uns', + description: + 'Finden Sie autorisierte Händler und Servicezentren in Ihrer Nähe für persönliche Unterstützung, Produktdemonstrationen und Expertenberatung.', + icon: 'MapPin', + }, + { + label: 'Reparatur online', + url: '/hilfe-und-support/garantie-und-reparatur/verwalten-ihrer-powerpro-werkzeuge-online', + description: + 'Diagnostizieren und planen Sie Reparaturen für Ihre Werkzeuge online. Erhalten Sie schnelle Serviceschätzungen und verfolgen Sie den Reparaturstatus in Echtzeit.', + icon: 'Drill', + }, + { + label: 'Rechnungen anzeigen', + url: '/rechnungen', + description: + 'Greifen Sie auf Ihre Rechnungen und Zahlungshistorie zu. Behalten Sie alle Ihre Transaktionen an einem Ort im Blick.', + icon: 'CreditCard', + }, + { + label: 'Bestellungen anzeigen', + url: '/bestellungen', + description: + 'Verfolgen und verwalten Sie Ihre Bestellungen. Sehen Sie Ihre Bestellhistorie, prüfen Sie den Status und greifen Sie auf Bestelldetails an einem Ort zu.', + icon: 'ShoppingBag', + }, + ], +}; + +const MOCK_QUICK_LINKS_BLOCK_PL: CMS.Model.QuickLinksBlock.QuickLinksBlock = { + id: 'quick-links-1', + title: 'Znajdź to w mgnieniu oka', + description: + 'Szybki dostęp do naszych najpopularniejszych narzędzi i usług, aby pomóc Ci uzyskać to, czego potrzebujesz bez opóźnień.', + items: [ + { + label: 'Znajdź sprzedawcę', + url: '/skontaktuj-sie-z-nami', + description: + 'Znajdź autoryzowanych sprzedawców i centra serwisowe w Twojej okolicy, aby uzyskać osobistą pomoc, demonstracje produktów i porady ekspertów.', + icon: 'MapPin', + }, + { + label: 'Naprawa online', + url: '/pomoc-i-wsparcie/gwarancja-i-naprawa/zarzadzanie-narzedziami-powerpro-online', + description: + 'Diagnozuj i planuj naprawy swoich narzędzi online. Otrzymuj szybkie wyceny serwisowe i śledź status naprawy w czasie rzeczywistym.', + icon: 'Drill', + }, + { + label: 'Przeglądaj faktury', + url: '/rachunki', + description: + 'Uzyskaj dostęp do swoich faktur i historii płatności. Śledź wszystkie swoje transakcje w jednym miejscu.', + icon: 'CreditCard', + }, + { + label: 'Przeglądaj zamówienia', + url: '/zamowienia', + description: + 'Śledź i zarządzaj swoimi zamówieniami. Przeglądaj historię zamówień, sprawdzaj status i uzyskaj dostęp do szczegółów zamówień w jednym miejscu.', + icon: 'ShoppingBag', + }, + ], +}; + +export const mapQuickLinksBlock = (locale: string): CMS.Model.QuickLinksBlock.QuickLinksBlock => { + switch (locale) { + case 'de': + return MOCK_QUICK_LINKS_BLOCK_DE; + case 'pl': + return MOCK_QUICK_LINKS_BLOCK_PL; + case 'en': + default: + return MOCK_QUICK_LINKS_BLOCK_EN; + } +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.survey.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.survey.mapper.ts new file mode 100644 index 00000000..5ced09fb --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.survey.mapper.ts @@ -0,0 +1,34 @@ +import { CMS } from '@o2s/framework/modules'; + +const MOCK_SURVEY_1: CMS.Model.Survey.Survey = { + code: 'contact-us', + surveyId: '72c90a02-6bfe-4e83-ba48-01f11752c234', + surveyType: 'survey', + submitDestination: ['surveyjs'], + requiredRoles: [], + postId: 'a91349b1-0c4c-4b7a-b712-91f04a1e6e99', +}; + +const MOCK_SURVEY_2: CMS.Model.Survey.Survey = { + code: 'complaint-form', + surveyId: '3897de9c-279b-4c50-b359-09f5c73a3c49', + surveyType: 'survey', + submitDestination: ['surveyjs'], + requiredRoles: ['selfservice_org_user'], + postId: 'e0f1b26b-a434-44ab-9608-c49dcd0658ec', +}; + +const MOCK_SURVEY_3: CMS.Model.Survey.Survey = { + code: 'request-device-maintenance', + surveyId: 'd93ccc83-4aff-418b-9e9b-c9c3447908cf', + surveyType: 'survey', + submitDestination: ['surveyjs'], + requiredRoles: ['selfservice_org_user'], + postId: '17931fe3-2492-408c-8f91-8fc062606604', +}; + +const MOCK_SURVEYS = [MOCK_SURVEY_1, MOCK_SURVEY_2, MOCK_SURVEY_3]; + +export const mapSurvey = (code: string): CMS.Model.Survey.Survey => { + return MOCK_SURVEYS.find((survey) => survey.code === code) ?? MOCK_SURVEY_1; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.table.mapper.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.table.mapper.ts new file mode 100644 index 00000000..800034d8 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/cms.table.mapper.ts @@ -0,0 +1,48 @@ +import { Models } from '@o2s/framework/modules'; + +import { TableFragment } from '@/generated/contentful'; + +export const mapTable = (component?: TableFragment): Models.DataTable.DataTable => { + if (!component) { + return {} as Models.DataTable.DataTable; + } + + return { + columns: + component.columnsCollection?.items.map( + (column, index): Models.DataTable.DataTableColumn => ({ + id: (column.field || String(index)) as keyof T, + title: column.title || '', + }), + ) || [], + actions: component.actionsTitle + ? { + title: component.actionsTitle, + label: component.actionsLabel, + } + : undefined, + }; +}; + +export const mapTableMeta = (component?: TableFragment): Models.DataTable.DataTableMeta => { + if (!component) { + return {} as Models.DataTable.DataTableMeta; + } + + return { + __id: component.sys.id, + columns: + component.columnsCollection?.items.map((column) => ({ + __id: column.sys.id, + id: 'id', + title: 'title', + })) || [], + actions: component.actionsTitle + ? { + __id: component.sys.id, + title: 'title', + label: 'label', + } + : undefined, + }; +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/category.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/category.page.ts new file mode 100644 index 00000000..64871724 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/category.page.ts @@ -0,0 +1,528 @@ +import { CMS } from '@o2s/framework/modules'; + +// Warranty & Repair category pages +export const PAGE_WARRANTY_AND_REPAIR_EN: CMS.Model.Page.Page = { + id: 'warranty-and-repair', + slug: '/help-and-support/warranty-and-repair', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Warranty & Repair', + description: 'Warranty & Repair', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_WARRANTY_AND_REPAIR_DE: CMS.Model.Page.Page = { + id: 'warranty-and-repair', + slug: '/hilfe-und-support/garantie-und-reparaturt', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Garantie & Reparatur', + description: 'Garantie & Reparatur', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_WARRANTY_AND_REPAIR_PL: CMS.Model.Page.Page = { + id: 'warranty-and-repair', + slug: '/pomoc-i-wsparcie/gwarancja-i-naprawa', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Gwarancja i Naprawa', + description: 'Gwarancja i Naprawa', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +// Maintenance category pages +export const PAGE_MAINTENANCE_EN: CMS.Model.Page.Page = { + id: 'maintenance', + slug: '/help-and-support/maintenance', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Maintenance', + description: 'Maintenance', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-2', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_MAINTENANCE_DE: CMS.Model.Page.Page = { + id: 'maintenance', + slug: '/hilfe-und-support/wartung', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Wartung', + description: 'Wartung', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-2', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_MAINTENANCE_PL: CMS.Model.Page.Page = { + id: 'maintenance', + slug: '/pomoc-i-wsparcie/konserwacja', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Konserwacja', + description: 'Konserwacja', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-2', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +// Safety category pages +export const PAGE_SAFETY_EN: CMS.Model.Page.Page = { + id: 'safety', + slug: '/help-and-support/safety', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Safety', + description: 'Safety', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-3', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_SAFETY_DE: CMS.Model.Page.Page = { + id: 'safety', + slug: '/hilfe-und-support/sicherheit', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Sicherheit', + description: 'Sicherheit', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-3', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_SAFETY_PL: CMS.Model.Page.Page = { + id: 'safety', + slug: '/pomoc-i-wsparcie/bezpieczenstwo', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Bezpieczeństwo', + description: 'Bezpieczeństwo', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-3', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +// Accessories category pages +export const PAGE_ACCESSORIES_EN: CMS.Model.Page.Page = { + id: 'accessories', + slug: '/help-and-support/accessories', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Accessories', + description: 'Accessories', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-4', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_ACCESSORIES_DE: CMS.Model.Page.Page = { + id: 'accessories', + slug: '/hilfe-und-support/zubehoer', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Zubehör', + description: 'Zubehör', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-4', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_ACCESSORIES_PL: CMS.Model.Page.Page = { + id: 'accessories', + slug: '/pomoc-i-wsparcie/akcesoria', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Akcesoria', + description: 'Akcesoria', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-4', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +// Troubleshooting category pages +export const PAGE_TROUBLESHOOTING_EN: CMS.Model.Page.Page = { + id: 'troubleshooting', + slug: '/help-and-support/troubleshooting', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Troubleshooting', + description: 'Troubleshooting', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-5', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_TROUBLESHOOTING_DE: CMS.Model.Page.Page = { + id: 'troubleshooting', + slug: '/hilfe-und-support/fehlerbehebung', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Fehlerbehebung', + description: 'Fehlerbehebung', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-5', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_TROUBLESHOOTING_PL: CMS.Model.Page.Page = { + id: 'troubleshooting', + slug: '/pomoc-i-wsparcie/rozwiązywanie-problemów', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Rozwiązywanie problemów', + description: 'Rozwiązywanie problemów', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'CategoryBlock', + id: 'category-5', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/dashboard.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/dashboard.page.ts new file mode 100644 index 00000000..6ee2bac1 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/dashboard.page.ts @@ -0,0 +1,166 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_DASHBOARD_PL: CMS.Model.Page.Page = { + slug: '/', + id: '1', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Strona główna', + description: 'Strona główna', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.PROSPECT, Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'TwoColumnTemplate', + slots: { + top: [], + left: [ + { + __typename: 'PaymentsSummaryBlock', + id: 'payments-summary-1', + }, + ], + right: [ + { + __typename: 'TicketRecentBlock', + id: 'ticket-recent-1', + }, + ], + bottom: [ + { + __typename: 'QuickLinksBlock', + id: 'quick-links-1', + }, + { + __typename: 'CategoryListBlock', + id: 'category-list-1', + }, + { + __typename: 'ArticleListBlock', + id: 'article-list-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_DASHBOARD_EN: CMS.Model.Page.Page = { + slug: '/', + id: '1', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Dashboard', + description: 'Dashboard', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.PROSPECT, Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'TwoColumnTemplate', + slots: { + top: [], + left: [ + { + __typename: 'PaymentsSummaryBlock', + id: 'payments-summary-1', + }, + ], + right: [ + { + __typename: 'TicketRecentBlock', + id: 'ticket-recent-1', + }, + ], + bottom: [ + { + __typename: 'QuickLinksBlock', + id: 'quick-links-1', + }, + { + __typename: 'CategoryListBlock', + id: 'category-list-1', + }, + { + __typename: 'ArticleListBlock', + id: 'article-list-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_DASHBOARD_DE: CMS.Model.Page.Page = { + slug: '/', + id: '1', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Startseite', + description: 'Startseite', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.PROSPECT, Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'TwoColumnTemplate', + slots: { + top: [], + left: [ + { + __typename: 'PaymentsSummaryBlock', + id: 'payments-summary-1', + }, + ], + right: [ + { + __typename: 'TicketRecentBlock', + id: 'ticket-recent-1', + }, + ], + bottom: [ + { + __typename: 'QuickLinksBlock', + id: 'quick-links-1', + }, + { + __typename: 'CategoryListBlock', + id: 'category-list-1', + }, + { + __typename: 'ArticleListBlock', + id: 'article-list-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/invoice-list.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/invoice-list.page.ts new file mode 100644 index 00000000..b5ac8b61 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/invoice-list.page.ts @@ -0,0 +1,154 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_INVOICE_LIST_EN: CMS.Model.Page.Page = { + id: '5', + slug: '/invoices', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Invoices', + description: 'Invoices', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'TwoColumnTemplate', + slots: { + top: [], + left: [ + { + __typename: 'PaymentsSummaryBlock', + id: 'payments-summary-1', + }, + ], + right: [ + { + __typename: 'PaymentsHistoryBlock', + id: 'payments-history-1', + }, + ], + bottom: [ + { + __typename: 'InvoiceListBlock', + id: 'invoice-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_INVOICE_LIST_DE: CMS.Model.Page.Page = { + id: '5', + slug: '/rechnungen', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Rechnungen', + description: 'Rechnungen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'TwoColumnTemplate', + slots: { + top: [], + left: [ + { + __typename: 'PaymentsSummaryBlock', + id: 'payments-summary-1', + }, + ], + right: [ + { + __typename: 'PaymentsHistoryBlock', + id: 'payments-history-1', + }, + ], + bottom: [ + { + __typename: 'InvoiceListBlock', + id: 'invoice-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_INVOICE_LIST_PL: CMS.Model.Page.Page = { + id: '5', + slug: '/rachunki', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Rachunki', + description: 'Rachunki', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'TwoColumnTemplate', + slots: { + top: [], + left: [ + { + __typename: 'PaymentsSummaryBlock', + id: 'payments-summary-1', + }, + ], + right: [ + { + __typename: 'PaymentsHistoryBlock', + id: 'payments-history-1', + }, + ], + bottom: [ + { + __typename: 'InvoiceListBlock', + id: 'invoice-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/knowledge-base.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/knowledge-base.page.ts new file mode 100644 index 00000000..1590042b --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/knowledge-base.page.ts @@ -0,0 +1,151 @@ +import { CMS } from '@o2s/framework/modules'; + +export const PAGE_HELP_AND_SUPPORT_EN: CMS.Model.Page.Page = { + id: 'help-and-support', + slug: '/help-and-support', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Welcome Hub', + description: 'Welcome Hub', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ArticleSearchBlock', + id: 'article-search-1', + }, + { + __typename: 'QuickLinksBlock', + id: 'quick-links-1', + }, + { + __typename: 'CategoryListBlock', + id: 'category-list-1', + }, + { + __typename: 'ArticleListBlock', + id: 'article-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_HELP_AND_SUPPORT_DE: CMS.Model.Page.Page = { + id: 'help-and-support', + slug: '/hilfe-und-support', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Willkommen Hub', + description: 'Willkommen Hub', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ArticleSearchBlock', + id: 'article-search-1', + }, + { + __typename: 'QuickLinksBlock', + id: 'quick-links-1', + }, + { + __typename: 'CategoryListBlock', + id: 'category-list-1', + }, + { + __typename: 'ArticleListBlock', + id: 'article-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_HELP_AND_SUPPORT_PL: CMS.Model.Page.Page = { + id: 'help-and-support', + slug: '/pomoc-i-wsparcie', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Centrum powitalne', + description: 'Centrum powitalne', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ArticleSearchBlock', + id: 'article-search-1', + }, + { + __typename: 'QuickLinksBlock', + id: 'quick-links-1', + }, + { + __typename: 'CategoryListBlock', + id: 'category-list-1', + }, + { + __typename: 'ArticleListBlock', + id: 'article-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/notification-details.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/notification-details.page.ts new file mode 100644 index 00000000..c3839f44 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/notification-details.page.ts @@ -0,0 +1,133 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_NOTIFICATION_DETAILS_EN: CMS.Model.Page.Page = { + id: '6', + slug: '/notifications/(.+)', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Notification Details', + description: 'Notification Details', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/notifications', + seo: { + title: 'Notifications', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'NotificationDetailsBlock', + id: 'notification-details-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_NOTIFICATION_DETAILS_DE: CMS.Model.Page.Page = { + id: '6', + slug: '/benachrichtigungen/(.+)', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Benachrichtigung Details', + description: 'Benachrichtigung Details', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/benachrichtigungen', + seo: { + title: 'Benachrichtigungen', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'NotificationDetailsBlock', + id: 'notification-details-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_NOTIFICATION_DETAILS_PL: CMS.Model.Page.Page = { + id: '6', + slug: '/powiadomienia/(.+)', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Powiadomienia', + description: 'Powiadomienia', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/powiadomienia', + seo: { + title: 'Powiadomienia', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'NotificationDetailsBlock', + id: 'notification-details-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/notification-list.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/notification-list.page.ts new file mode 100644 index 00000000..b06989c6 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/notification-list.page.ts @@ -0,0 +1,115 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_NOTIFICATION_LIST_EN: CMS.Model.Page.Page = { + id: '4', + slug: '/notifications', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Notifications', + description: 'Notifications', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'NotificationListBlock', + id: 'notification-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_NOTIFICATION_LIST_DE: CMS.Model.Page.Page = { + id: '4', + slug: '/benachrichtigungen', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Benachrichtigungen', + description: 'Benachrichtigungen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'NotificationListBlock', + id: 'notification-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_NOTIFICATION_LIST_PL: CMS.Model.Page.Page = { + id: '4', + slug: '/powiadomienia', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Powiadomienia', + description: 'Powiadomienia', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'NotificationListBlock', + id: 'notification-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/order-details.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/order-details.page.ts new file mode 100644 index 00000000..f10486e8 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/order-details.page.ts @@ -0,0 +1,121 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_ORDER_DETAILS_EN: CMS.Model.Page.Page = { + id: '14', + slug: '/orders/(.+)', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Order Details', + description: 'Order Details', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/orders', + seo: { + title: 'Orders', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'OrderDetailsBlock', + id: 'order-details-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_ORDER_DETAILS_DE: CMS.Model.Page.Page = { + id: '14', + slug: '/bestellungen/(.+)', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Bestellungen', + description: 'Bestellungen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/bestellungen', + seo: { + title: 'Bestellungen', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'OrderDetailsBlock', + id: 'order-details-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_ORDER_DETAILS_PL: CMS.Model.Page.Page = { + id: '14', + slug: '/zamowienia/(.+)', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Zamówienia', + description: 'Zamówienia', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/zamowienia', + seo: { + title: 'Zamówienia', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'OrderDetailsBlock', + id: 'order-details-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/order-list.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/order-list.page.ts new file mode 100644 index 00000000..17fbc4a5 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/order-list.page.ts @@ -0,0 +1,115 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_ORDER_LIST_EN: CMS.Model.Page.Page = { + id: '13', + slug: '/orders', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Orders', + description: 'Orders', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'OrdersSummaryBlock', + id: 'orders-summary-1', + }, + { + __typename: 'OrderListBlock', + id: 'order-list-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_ORDER_LIST_DE: CMS.Model.Page.Page = { + id: '13', + slug: '/bestellungen', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Bestellungen', + description: 'Bestellungen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'OrdersSummaryBlock', + id: 'orders-summary-1', + }, + { + __typename: 'OrderListBlock', + id: 'order-list-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_ORDER_LIST_PL: CMS.Model.Page.Page = { + id: '13', + slug: '/zamowienia', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Zamówienia', + description: 'Zamówienia', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'OrdersSummaryBlock', + id: 'orders-summary-1', + }, + { + __typename: 'OrderListBlock', + id: 'order-list-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/service-details.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/service-details.page.ts new file mode 100644 index 00000000..4e17d008 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/service-details.page.ts @@ -0,0 +1,145 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_SERVICE_DETAILS_EN: CMS.Model.Page.Page = { + id: '3', + slug: '/services/(.+)', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Service Details', + description: 'Service Details', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/services', + seo: { + title: 'Services', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ServiceDetailsBlock', + id: 'service-details-1', + }, + { + __typename: 'FeaturedServiceListBlock', + id: 'featured-service-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_SERVICE_DETAILS_DE: CMS.Model.Page.Page = { + id: '3', + slug: '/dienstleistungen/(.+)', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Dienstleistungen', + description: 'Dienstleistungen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/dienstleistungen', + seo: { + title: 'Dienstleistungen', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ServiceDetailsBlock', + id: 'service-details-1', + }, + { + __typename: 'FeaturedServiceListBlock', + id: 'featured-service-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_SERVICE_DETAILS_PL: CMS.Model.Page.Page = { + id: '3', + slug: '/uslugi/(.+)', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Usługi', + description: 'Usługi', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/uslugi', + seo: { + title: 'Usługi', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ServiceDetailsBlock', + id: 'service-details-1', + }, + { + __typename: 'FeaturedServiceListBlock', + id: 'featured-service-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/service-list.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/service-list.page.ts new file mode 100644 index 00000000..b7968bdd --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/service-list.page.ts @@ -0,0 +1,127 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_SERVICE_LIST_EN: CMS.Model.Page.Page = { + id: '8', + slug: '/services', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Services', + description: 'Services', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ServiceListBlock', + id: 'service-list-1', + }, + { + __typename: 'FeaturedServiceListBlock', + id: 'featured-service-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_SERVICE_LIST_DE: CMS.Model.Page.Page = { + id: '8', + slug: '/dienstleistungen', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Dienstleistungen', + description: 'Dienstleistungen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ServiceListBlock', + id: 'service-list-1', + }, + { + __typename: 'FeaturedServiceListBlock', + id: 'featured-service-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_SERVICE_LIST_PL: CMS.Model.Page.Page = { + id: '8', + slug: '/uslugi', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Usługi', + description: 'Usługi', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'ServiceListBlock', + id: 'service-list-1', + }, + { + __typename: 'FeaturedServiceListBlock', + id: 'featured-service-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/surveyjs-forms.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/surveyjs-forms.page.ts new file mode 100644 index 00000000..bedd0fc8 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/surveyjs-forms.page.ts @@ -0,0 +1,307 @@ +import { CMS } from '@o2s/framework/modules'; + +export const PAGE_CONTACT_US_EN: CMS.Model.Page.Page = { + id: '9', + slug: '/contact-us', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Contact us', + description: 'Contact us', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_CONTACT_US_DE: CMS.Model.Page.Page = { + id: '9', + slug: '/kontaktiere-uns', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Kontaktiere uns', + description: 'Kontaktiere uns', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_CONTACT_US_PL: CMS.Model.Page.Page = { + id: '9', + slug: '/skontaktuj-sie-z-nami', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Skontaktuj się z nami', + description: 'Skontaktuj się z nami', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_COMPLAINT_FORM_EN: CMS.Model.Page.Page = { + id: '10', + slug: '/submit-complaint', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Submit a complaint', + description: 'Submit a complaint', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-2', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_COMPLAINT_FORM_DE: CMS.Model.Page.Page = { + id: '10', + slug: '/einreichen-reklamacji', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Beschwerdeformular einreichen', + description: 'Beschwerdeformular einreichen', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-2', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_COMPLAINT_FORM_PL: CMS.Model.Page.Page = { + id: '10', + slug: '/wyslij-reklamacje', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Wyslij reklamacje', + description: 'Wyslij reklamacje', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-2', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_REQUEST_DEVICE_MAINTENANCE_EN: CMS.Model.Page.Page = { + id: '12', + slug: '/request-device-maintenance', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Request device maintenance', + description: 'Request device maintenance', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-3', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_REQUEST_DEVICE_MAINTENANCE_DE: CMS.Model.Page.Page = { + id: '12', + slug: '/geratewartungsanfrage', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Gerätewartungsanfrage', + description: 'Gerätewartungsanfrage', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-3', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_REQUEST_DEVICE_MAINTENANCE_PL: CMS.Model.Page.Page = { + id: '12', + slug: '/zglos-naprawe-urzadzenia', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Zgłoś naprawę urządzenia', + description: 'Zgłoś naprawę urządzenia', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [], + hasOwnTitle: false, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'SurveyJsBlock', + id: 'survey-3', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/ticket-details.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/ticket-details.page.ts new file mode 100644 index 00000000..f25162e5 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/ticket-details.page.ts @@ -0,0 +1,133 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_TICKET_DETAILS_EN: CMS.Model.Page.Page = { + id: '3', + slug: '/cases/(.+)', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Ticket Details', + description: 'Ticket Details', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/cases', + seo: { + title: 'Cases', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'TicketDetailsBlock', + id: 'ticket-details-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_TICKET_DETAILS_DE: CMS.Model.Page.Page = { + id: '3', + slug: '/faelle/(.+)', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Fälle', + description: 'Fälle', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/faelle', + seo: { + title: 'Fälle', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'TicketDetailsBlock', + id: 'ticket-details-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_TICKET_DETAILS_PL: CMS.Model.Page.Page = { + id: '3', + slug: '/zgloszenia/(.+)', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Zgłoszenia', + description: 'Zgłoszenia', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + parent: { + slug: '/zgloszenia', + seo: { + title: 'Zgłoszenia', + }, + }, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'TicketDetailsBlock', + id: 'ticket-details-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/ticket-list.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/ticket-list.page.ts new file mode 100644 index 00000000..1298c78c --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/ticket-list.page.ts @@ -0,0 +1,115 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_TICKET_LIST_EN: CMS.Model.Page.Page = { + id: '2', + slug: '/cases', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'Cases', + description: 'Cases', + keywords: ['cases', 'case', 'casescase'], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + hasOwnTitle: true, + permissions: [Auth.Constants.Roles.ORG_USER], + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'TicketListBlock', + id: 'ticket-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_TICKET_LIST_DE: CMS.Model.Page.Page = { + id: '2', + slug: '/faelle', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Fälle', + description: 'Fälle', + keywords: ['kassen', 'kassenfall', 'kassenfallfall'], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + hasOwnTitle: true, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'TicketListBlock', + id: 'ticket-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_TICKET_LIST_PL: CMS.Model.Page.Page = { + id: '2', + slug: '/zgloszenia', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Zgłoszenia', + description: 'Zgłoszenia', + keywords: ['zgloszenia', 'zgloszenie', 'zgloszeniazgloszenia'], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + hasOwnTitle: true, + permissions: [Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'TicketListBlock', + id: 'ticket-list-1', + }, + { + __typename: 'FaqBlock', + id: 'faq-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/user-account.page.ts b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/user-account.page.ts new file mode 100644 index 00000000..d310d8dd --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/cms/mappers/mocks/pages/user-account.page.ts @@ -0,0 +1,103 @@ +import { Auth, CMS } from '@o2s/framework/modules'; + +export const PAGE_USER_ACCOUNT_EN: CMS.Model.Page.Page = { + id: '7', + slug: '/user-account', + locale: 'en', + seo: { + noIndex: false, + noFollow: false, + title: 'User Account', + description: 'User Account', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.PROSPECT, Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'UserAccountBlock', + id: 'user-account-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_USER_ACCOUNT_DE: CMS.Model.Page.Page = { + id: '7', + slug: '/benutzerkonto', + locale: 'de', + seo: { + noIndex: false, + noFollow: false, + title: 'Benutzerkonto', + description: 'Benutzerkonto', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.PROSPECT, Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'UserAccountBlock', + id: 'user-account-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; + +export const PAGE_USER_ACCOUNT_PL: CMS.Model.Page.Page = { + id: '7', + slug: '/konto-uzytkownika', + locale: 'pl', + seo: { + noIndex: false, + noFollow: false, + title: 'Konto użytkownika', + description: 'Konto użytkownika', + keywords: [], + image: { + url: 'https://picsum.photos/150', + width: 150, + height: 150, + alt: 'Placeholder', + }, + }, + permissions: [Auth.Constants.Roles.PROSPECT, Auth.Constants.Roles.ORG_USER, Auth.Constants.Roles.ORG_ADMIN], + hasOwnTitle: true, + template: { + __typename: 'OneColumnTemplate', + slots: { + main: [ + { + __typename: 'UserAccountBlock', + id: 'user-account-1', + }, + ], + }, + }, + updatedAt: '2025-01-01', + createdAt: '2025-01-01', +}; diff --git a/packages/integrations/contentful-cms/src/modules/graphql/graphql.module.ts b/packages/integrations/contentful-cms/src/modules/graphql/graphql.module.ts new file mode 100644 index 00000000..db78a226 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/graphql/graphql.module.ts @@ -0,0 +1,10 @@ +import { Global, Module } from '@nestjs/common'; + +import { GraphqlService } from './graphql.service'; + +@Global() +@Module({ + providers: [GraphqlService], + exports: [GraphqlService], +}) +export class GraphqlModule {} diff --git a/packages/integrations/contentful-cms/src/modules/graphql/graphql.service.ts b/packages/integrations/contentful-cms/src/modules/graphql/graphql.service.ts new file mode 100644 index 00000000..3eec9b46 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/graphql/graphql.service.ts @@ -0,0 +1,43 @@ +import { Global, Injectable } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { GraphQLClient } from 'graphql-request'; + +import { + GetComponentQueryVariables, + GetPageQueryVariables, + GetPagesQueryVariables, + Sdk, + getSdk, +} from '@/generated/contentful'; + +@Global() +@Injectable() +export class GraphqlService { + private readonly client: GraphQLClient; + private readonly sdk: Sdk; + + constructor(private readonly config: ConfigService) { + this.client = new GraphQLClient( + `https://graphql.contentful.com/content/v1/spaces/${process.env.CF_SPACE_ID}/environments/${process.env.CF_ENV}`, + { + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${process.env.CF_PREVIEW_TOKEN}`, + }, + }, + ); + this.sdk = getSdk(this.client); + } + + public getPage(params: GetPageQueryVariables) { + return this.sdk.getPage(params); + } + + public getPages(params: GetPagesQueryVariables) { + return this.sdk.getPages(params); + } + + public getComponent(params: GetComponentQueryVariables) { + return this.sdk.getComponent(params); + } +} diff --git a/packages/integrations/contentful-cms/src/modules/graphql/index.ts b/packages/integrations/contentful-cms/src/modules/graphql/index.ts new file mode 100644 index 00000000..88b5613b --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/graphql/index.ts @@ -0,0 +1,2 @@ +export { GraphqlService as Service } from './graphql.service'; +export { GraphqlModule as Module } from './graphql.module'; diff --git a/packages/integrations/contentful-cms/src/modules/index.ts b/packages/integrations/contentful-cms/src/modules/index.ts new file mode 100644 index 00000000..8b781e92 --- /dev/null +++ b/packages/integrations/contentful-cms/src/modules/index.ts @@ -0,0 +1,2 @@ +export * as CMS from './cms'; +export * as GraphQl from './graphql'; diff --git a/packages/integrations/contentful-cms/tsconfig.json b/packages/integrations/contentful-cms/tsconfig.json new file mode 100644 index 00000000..9ecfb1a2 --- /dev/null +++ b/packages/integrations/contentful-cms/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@o2s/typescript-config/api.json", + "compilerOptions": { + "paths": { + "@/*": ["./src/*"], + "@/generated/*": ["./generated/*"] + }, + "outDir": "./dist" + }, + "include": ["src", "*.ts", "generated/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/integrations/contentful-cms/tsconfig.lint.json b/packages/integrations/contentful-cms/tsconfig.lint.json new file mode 100644 index 00000000..102692d6 --- /dev/null +++ b/packages/integrations/contentful-cms/tsconfig.lint.json @@ -0,0 +1,8 @@ +{ + "extends": "@o2s/typescript-config/ui.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src", "turbo"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/integrations/contentful-cms/turbo.json b/packages/integrations/contentful-cms/turbo.json new file mode 100644 index 00000000..0c4e08c4 --- /dev/null +++ b/packages/integrations/contentful-cms/turbo.json @@ -0,0 +1,23 @@ +{ + "extends": ["//"], + "tasks": { + "dev": { + "dependsOn": ["@o2s/utils.logger#build", "@o2s/framework#build"], + "env": [ + "CF_TOKEN", + "CF_SPACE_ID", + "CF_ENV", + "CF_MANAGEMENT_TOKEN" + ] + }, + "build": { + "dependsOn": ["@o2s/utils.logger#build", "@o2s/framework#build"], + "env": [ + "CF_TOKEN", + "CF_SPACE_ID", + "CF_ENV", + "CF_MANAGEMENT_TOKEN" + ] + } + } +} diff --git a/packages/ui/src/components/RichText/RichText.tsx b/packages/ui/src/components/RichText/RichText.tsx index bbb5ef93..68aadcb6 100644 --- a/packages/ui/src/components/RichText/RichText.tsx +++ b/packages/ui/src/components/RichText/RichText.tsx @@ -50,6 +50,7 @@ export const RichText: FC> = ({ baseFontSize = 'body', className, startingHeadingLevel = 1, + ...rest }) => { if (!content) { return null; @@ -242,6 +243,7 @@ export const RichText: FC> = ({ forceBlock: true, overrides, }} + {...rest} > {content}