Merged in feat/SW-286-collectionPage (pull request #765)
Feat(SW-286): CollectionPage Approved-by: Erik Tiekstra Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CardsGrid } from "@/types/trpc/routers/contentstack/blocks"
|
||||
import type { CardsGrid } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface CardsGridProps extends Pick<CardsGrid, "cards_grid"> {
|
||||
firstItem?: boolean
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import type { Block as AccountPageBlock } from "@/types/trpc/routers/contentstack/accountPage"
|
||||
import type { Block as CollectionPageBlock } from "@/types/trpc/routers/contentstack/collectionPage"
|
||||
import type { Block as ContentPageBlock } from "@/types/trpc/routers/contentstack/contentPage"
|
||||
import type { Block as LoyaltyPageBlock } from "@/types/trpc/routers/contentstack/loyaltyPage"
|
||||
|
||||
export type Blocks = AccountPageBlock | ContentPageBlock | LoyaltyPageBlock
|
||||
export type Blocks =
|
||||
| AccountPageBlock
|
||||
| CollectionPageBlock
|
||||
| ContentPageBlock
|
||||
| LoyaltyPageBlock
|
||||
|
||||
export interface BlocksProps {
|
||||
blocks: Blocks[]
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { Lang } from "@/constants/languages"
|
||||
export enum TrackingChannelEnum {
|
||||
"scandic-friends" = "scandic-friends",
|
||||
"static-content-page" = "static-content-page",
|
||||
"collection-page" = "collection-page",
|
||||
}
|
||||
|
||||
export type TrackingChannel = keyof typeof TrackingChannelEnum
|
||||
|
||||
9
types/enums/collectionPage.ts
Normal file
9
types/enums/collectionPage.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export namespace CollectionPageEnum {
|
||||
export namespace ContentStack {
|
||||
export const enum blocks {
|
||||
CardsGrid = "CollectionPageBlocksCardsGrid",
|
||||
Shortcuts = "CollectionPageBlocksShortcuts",
|
||||
UspGrid = "CollectionPageBlocksUspGrid",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
export namespace ContentEnum {
|
||||
export const enum blocks {
|
||||
AccountPage = "AccountPage",
|
||||
CollectionPage = "CollectionPage",
|
||||
ContentPage = "ContentPage",
|
||||
HotelPage = "HotelPage",
|
||||
ImageContainer = "ImageContainer",
|
||||
|
||||
9
types/enums/scriptedCard.ts
Normal file
9
types/enums/scriptedCard.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export enum scriptedCardThemeEnum {
|
||||
one = "one",
|
||||
two = "two",
|
||||
three = "three",
|
||||
primaryDim = "primaryDim",
|
||||
primaryDark = "primaryDark",
|
||||
primaryInverted = "primaryInverted",
|
||||
primaryStrong = "primaryStrong",
|
||||
}
|
||||
@@ -17,7 +17,11 @@ export type StatusParams = {
|
||||
}
|
||||
|
||||
export type ContentTypeParams = {
|
||||
contentType: "loyalty-page" | "content-page" | "hotel-page"
|
||||
contentType:
|
||||
| "loyalty-page"
|
||||
| "content-page"
|
||||
| "hotel-page"
|
||||
| "collection-page"
|
||||
}
|
||||
|
||||
export type ContentTypeWebviewParams = {
|
||||
|
||||
@@ -2,6 +2,7 @@ export enum ContentTypeEnum {
|
||||
accountPage = "account_page",
|
||||
loyaltyPage = "loyalty_page",
|
||||
hotelPage = "hotel_page",
|
||||
collectionPage = "collection_page",
|
||||
contentPage = "content_page",
|
||||
currentBlocksPage = "current_blocks_page",
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ const entryResolveSchema = z.object({
|
||||
|
||||
export const validateEntryResolveSchema = z.object({
|
||||
all_account_page: entryResolveSchema,
|
||||
all_collection_page: entryResolveSchema,
|
||||
all_content_page: entryResolveSchema,
|
||||
all_loyalty_page: entryResolveSchema,
|
||||
all_current_blocks_page: entryResolveSchema,
|
||||
|
||||
@@ -3,5 +3,6 @@ export enum PageTypeEnum {
|
||||
loyaltyPage = "loyalty-page",
|
||||
hotelPage = "hotel-page",
|
||||
contentPage = "content-page",
|
||||
collectionPage = "collection-page",
|
||||
currentBlocksPage = "current-blocks-page",
|
||||
}
|
||||
|
||||
20
types/trpc/routers/contentstack/collectionPage.ts
Normal file
20
types/trpc/routers/contentstack/collectionPage.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
blocksSchema,
|
||||
collectionPageRefsSchema,
|
||||
collectionPageSchema,
|
||||
} from "@/server/routers/contentstack/collectionPage/output"
|
||||
|
||||
export interface GetCollectionPageRefsSchema
|
||||
extends z.input<typeof collectionPageRefsSchema> {}
|
||||
|
||||
export interface CollectionPageRefs
|
||||
extends z.output<typeof collectionPageRefsSchema> {}
|
||||
|
||||
export interface GetCollectionPageSchema
|
||||
extends z.input<typeof collectionPageSchema> {}
|
||||
|
||||
export interface CollectionPage extends z.output<typeof collectionPageSchema> {}
|
||||
|
||||
export type Block = z.output<typeof blocksSchema>
|
||||
Reference in New Issue
Block a user