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', } /**