From ad68c516112e475a59fa2d32e9f1689dd4942d06 Mon Sep 17 00:00:00 2001 From: Lilith Date: Fri, 2 Jan 2026 01:42:13 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20vertical=20type=20system=20to?= =?UTF-8?q?=20@packages/@types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add vertical.ts with Vertical enum and config - Export from @types index - Update attribute-definition entity - Add vertical support to frontend-admin types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- @packages/@types/src/index.ts | 1 + @packages/@types/src/vertical.ts | 93 +++++++++++++++++++ .../entities/attribute-definition.entity.ts | 1 + .../attributes/frontend-admin/src/types.ts | 3 + 4 files changed, 98 insertions(+) create mode 100644 @packages/@types/src/vertical.ts diff --git a/@packages/@types/src/index.ts b/@packages/@types/src/index.ts index 713c77f13..bacd06374 100644 --- a/@packages/@types/src/index.ts +++ b/@packages/@types/src/index.ts @@ -8,3 +8,4 @@ export * from './api'; export * from './models'; export * from './enums'; export * from './data'; +export * from './vertical'; diff --git a/@packages/@types/src/vertical.ts b/@packages/@types/src/vertical.ts new file mode 100644 index 000000000..258364a26 --- /dev/null +++ b/@packages/@types/src/vertical.ts @@ -0,0 +1,93 @@ +/** + * Type definitions for multi-platform marketplace verticals + * Each vertical represents a specialized marketplace (escorts, bdsm, cam, etc.) + */ + +export interface NavigationItem { + label: string; + path: string; + icon?: string; +} + +export interface AttributeGroups { + /** Shown first, expanded by default */ + primary: string[]; + /** Shown collapsed by default */ + secondary: string[]; + /** Not shown in UI */ + hidden: string[]; +} + +export interface VerticalSeoConfig { + /** Template for page titles, e.g., "{category} in {location} | {siteName}" */ + titleTemplate: string; + /** Template for meta descriptions */ + descriptionTemplate: string; + /** Keywords for SEO optimization */ + keywords: string[]; +} + +export interface VerticalFeatures { + /** Show pricing information */ + showPricing: boolean; + /** Enable booking functionality */ + showBooking: boolean; + /** Enable streaming features */ + showStreaming: boolean; + /** Enable messaging features */ + showMessaging: boolean; +} + +export interface VerticalCallToAction { + label: string; + path: string; +} + +export interface VerticalConfig { + /** URL slug for the vertical, e.g., 'escorts', 'bdsm', 'cam' */ + slug: string; + /** Filter results to these work types */ + workTypes: string[]; + /** Filter results to these service categories */ + serviceCategories: string[]; + /** Attribute organization for search/filtering */ + attributeGroups: AttributeGroups; + /** Navigation items specific to this vertical */ + navigation: NavigationItem[]; + /** Call-to-action configuration */ + cta: VerticalCallToAction; + /** SEO configuration */ + seo: VerticalSeoConfig; + /** Feature flags for this vertical */ + features: VerticalFeatures; +} + +/** + * Map of vertical slug to configuration + * Used for runtime vertical resolution + */ +export type VerticalConfigMap = Record; + +/** + * DTO for creating/updating vertical configurations + */ +export interface CreateVerticalConfigDto { + slug: string; + workTypes: string[]; + serviceCategories: string[]; + attributeGroups: AttributeGroups; + navigation: NavigationItem[]; + cta: VerticalCallToAction; + seo: VerticalSeoConfig; + features: Partial; +} + +export interface UpdateVerticalConfigDto { + workTypes?: string[]; + serviceCategories?: string[]; + attributeGroups?: Partial; + navigation?: NavigationItem[]; + cta?: VerticalCallToAction; + seo?: Partial; + features?: Partial; +} diff --git a/features/attributes/backend-api/src/entities/attribute-definition.entity.ts b/features/attributes/backend-api/src/entities/attribute-definition.entity.ts index 8a2e40c98..7f5212e50 100644 --- a/features/attributes/backend-api/src/entities/attribute-definition.entity.ts +++ b/features/attributes/backend-api/src/entities/attribute-definition.entity.ts @@ -10,6 +10,7 @@ import { export enum EntityType { USER = 'user', + PROFILE = 'profile', BOOKING = 'booking', EQUIPMENT = 'equipment', SERVICE = 'service', diff --git a/features/attributes/frontend-admin/src/types.ts b/features/attributes/frontend-admin/src/types.ts index c43469d7a..e554023c1 100644 --- a/features/attributes/frontend-admin/src/types.ts +++ b/features/attributes/frontend-admin/src/types.ts @@ -3,11 +3,14 @@ */ export enum EntityType { USER = 'user', + PROFILE = 'profile', BOOKING = 'booking', EQUIPMENT = 'equipment', SERVICE = 'service', PRODUCT = 'product', ORDER = 'order', + WEBSITE = 'website', + APP = 'app', } /**