/** * Near-Me Business Schemas * ======================== * Create / update / search request bodies + wire types for a business listing. * * Refine gotcha: `.partial()` on a `.refine()`d object throws at module load * in Zod v4, so the create body is split — `createBusinessBaseSchema` (plain * object, the source for `.partial()`) and `createBusinessSchema` (base + * refine). See the memory note feedback_zod4_partial_on_refined. */ import { z } from 'zod'; import type { NearMeDay, NearMeStatus, NearMeTag } from './enums.js'; import type { GeoJsonPoint } from './helpers.js'; import type { NearMeCategory, NearMeSubcategory } from './taxonomy.js'; /** * A branch/outlet. Multi-branch collects address + geo only (not a separate * listing). The first branch in the array is treated as primary. */ export declare const branchSchema: z.ZodObject<{ label: z.ZodPreprocess>; address: z.ZodString; location: z.ZodObject<{ type: z.ZodLiteral<"Point">; coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; }, z.core.$strip>; locality: z.ZodPreprocess>; city: z.ZodPreprocess>; landmark: z.ZodPreprocess>; phone: z.ZodPreprocess>; areaId: z.ZodOptional; }, z.core.$strip>; /** One day's opening hours. `closed` days omit open/close. */ export declare const dayHoursSchema: z.ZodObject<{ day: z.ZodEnum<{ readonly MONDAY: "monday"; readonly TUESDAY: "tuesday"; readonly WEDNESDAY: "wednesday"; readonly THURSDAY: "thursday"; readonly FRIDAY: "friday"; readonly SATURDAY: "saturday"; readonly SUNDAY: "sunday"; }>; closed: z.ZodDefault; open: z.ZodOptional; close: z.ZodOptional; }, z.core.$strip>; /** Business contact block. Primary phone is required. */ export declare const contactSchema: z.ZodObject<{ phone: z.ZodString; whatsapp: z.ZodPreprocess>; email: z.ZodPreprocess>; website: z.ZodPreprocess>; }, z.core.$strip>; /** Plain create body (no refine) — the source for `.partial()`. */ export declare const createBusinessBaseSchema: z.ZodObject<{ name: z.ZodString; category: z.ZodEnum<{ readonly FOOD_AND_DINING: "food_and_dining"; readonly GROCERY_AND_ESSENTIALS: "grocery_and_essentials"; readonly BEAUTY_AND_WELLNESS: "beauty_and_wellness"; readonly HEALTH_AND_MEDICAL: "health_and_medical"; readonly FITNESS_AND_SPORTS: "fitness_and_sports"; readonly EDUCATION_AND_COACHING: "education_and_coaching"; readonly PROFESSIONAL_SERVICES: "professional_services"; readonly HOME_SERVICES: "home_services"; readonly RETAIL_AND_SHOPPING: "retail_and_shopping"; readonly AUTOMOTIVE: "automotive"; readonly EVENTS_AND_PHOTOGRAPHY: "events_and_photography"; readonly TRAVEL_AND_STAY: "travel_and_stay"; readonly REPAIR_AND_ELECTRONICS: "repair_and_electronics"; readonly REAL_ESTATE_SERVICES: "real_estate_services"; readonly FINANCIAL_SERVICES: "financial_services"; readonly OTHER: "other"; }>; subcategory: z.ZodEnum<{ readonly RESTAURANT: "restaurant"; readonly CAFE: "cafe"; readonly BAKERY: "bakery"; readonly SWEET_SHOP: "sweet_shop"; readonly FAST_FOOD: "fast_food"; readonly CLOUD_KITCHEN: "cloud_kitchen"; readonly TIFFIN_SERVICE: "tiffin_service"; readonly ICE_CREAM_PARLOUR: "ice_cream_parlour"; readonly JUICE_BAR: "juice_bar"; readonly DHABA: "dhaba"; readonly CATERING: "catering"; readonly KIRANA_STORE: "kirana_store"; readonly SUPERMARKET: "supermarket"; readonly DAIRY_SHOP: "dairy_shop"; readonly VEGETABLE_FRUIT_SHOP: "vegetable_fruit_shop"; readonly GENERAL_STORE: "general_store"; readonly ORGANIC_STORE: "organic_store"; readonly MEAT_FISH_SHOP: "meat_fish_shop"; readonly SALON: "salon"; readonly SPA: "spa"; readonly BEAUTY_PARLOUR: "beauty_parlour"; readonly BARBER_SHOP: "barber_shop"; readonly NAIL_STUDIO: "nail_studio"; readonly MAKEUP_ARTIST: "makeup_artist"; readonly MASSAGE_CENTRE: "massage_centre"; readonly COSMETIC_CLINIC: "cosmetic_clinic"; readonly DOCTOR_CLINIC: "doctor_clinic"; readonly HOSPITAL: "hospital"; readonly DENTAL_CLINIC: "dental_clinic"; readonly PHARMACY: "pharmacy"; readonly DIAGNOSTIC_LAB: "diagnostic_lab"; readonly PHYSIOTHERAPY: "physiotherapy"; readonly OPTICAL_STORE: "optical_store"; readonly VETERINARY_CLINIC: "veterinary_clinic"; readonly AYURVEDIC_CLINIC: "ayurvedic_clinic"; readonly MENTAL_HEALTH: "mental_health"; readonly GYM: "gym"; readonly YOGA_STUDIO: "yoga_studio"; readonly FITNESS_TRAINER: "fitness_trainer"; readonly SPORTS_ACADEMY: "sports_academy"; readonly DANCE_STUDIO: "dance_studio"; readonly MARTIAL_ARTS: "martial_arts"; readonly SWIMMING_POOL: "swimming_pool"; readonly SPORTS_SHOP: "sports_shop"; readonly TUITION_CLASSES: "tuition_classes"; readonly COACHING_INSTITUTE: "coaching_institute"; readonly SCHOOL: "school"; readonly PLAYSCHOOL: "playschool"; readonly COMPUTER_TRAINING: "computer_training"; readonly MUSIC_CLASSES: "music_classes"; readonly HOBBY_CLASSES: "hobby_classes"; readonly LANGUAGE_CLASSES: "language_classes"; readonly LIBRARY: "library"; readonly SKILL_TRAINING: "skill_training"; readonly CHARTERED_ACCOUNTANT: "chartered_accountant"; readonly LAWYER: "lawyer"; readonly BUSINESS_CONSULTANT: "business_consultant"; readonly ARCHITECT: "architect"; readonly INTERIOR_DESIGNER: "interior_designer"; readonly TAX_CONSULTANT: "tax_consultant"; readonly NOTARY: "notary"; readonly HR_RECRUITMENT: "hr_recruitment"; readonly ELECTRICIAN: "electrician"; readonly PLUMBER: "plumber"; readonly CARPENTER: "carpenter"; readonly PAINTER: "painter"; readonly PEST_CONTROL: "pest_control"; readonly HOME_CLEANING: "home_cleaning"; readonly APPLIANCE_REPAIR: "appliance_repair"; readonly AC_SERVICE: "ac_service"; readonly PACKERS_MOVERS: "packers_movers"; readonly MASON: "mason"; readonly GARDENER: "gardener"; readonly CLOTHING_STORE: "clothing_store"; readonly FOOTWEAR_STORE: "footwear_store"; readonly JEWELLERY_STORE: "jewellery_store"; readonly MOBILE_STORE: "mobile_store"; readonly ELECTRONICS_STORE: "electronics_store"; readonly FURNITURE_STORE: "furniture_store"; readonly GIFT_SHOP: "gift_shop"; readonly STATIONERY_STORE: "stationery_store"; readonly HARDWARE_STORE: "hardware_store"; readonly BOOK_STORE: "book_store"; readonly TOY_STORE: "toy_store"; readonly CAR_DEALER: "car_dealer"; readonly BIKE_DEALER: "bike_dealer"; readonly CAR_SERVICE: "car_service"; readonly BIKE_SERVICE: "bike_service"; readonly CAR_WASH: "car_wash"; readonly TYRE_SHOP: "tyre_shop"; readonly SPARE_PARTS: "spare_parts"; readonly DRIVING_SCHOOL: "driving_school"; readonly CAR_RENTAL: "car_rental"; readonly EVENT_PLANNER: "event_planner"; readonly PHOTOGRAPHER: "photographer"; readonly VIDEOGRAPHER: "videographer"; readonly BANQUET_HALL: "banquet_hall"; readonly DECORATOR: "decorator"; readonly DJ_SERVICES: "dj_services"; readonly TENT_HOUSE: "tent_house"; readonly PARTY_SUPPLIES: "party_supplies"; readonly HOTEL: "hotel"; readonly GUEST_HOUSE: "guest_house"; readonly HOMESTAY: "homestay"; readonly TRAVEL_AGENCY: "travel_agency"; readonly TOUR_OPERATOR: "tour_operator"; readonly TAXI_SERVICE: "taxi_service"; readonly BUS_OPERATOR: "bus_operator"; readonly MOBILE_REPAIR: "mobile_repair"; readonly COMPUTER_REPAIR: "computer_repair"; readonly WATCH_REPAIR: "watch_repair"; readonly CCTV_INSTALLATION: "cctv_installation"; readonly ELECTRONICS_REPAIR: "electronics_repair"; readonly RO_WATER_SERVICE: "ro_water_service"; readonly PROPERTY_DEALER: "property_dealer"; readonly BUILDER_DEVELOPER: "builder_developer"; readonly RENTAL_AGENT: "rental_agent"; readonly PG_HOSTEL: "pg_hostel"; readonly PROPERTY_VALUATION: "property_valuation"; readonly INSURANCE_AGENT: "insurance_agent"; readonly LOAN_AGENT: "loan_agent"; readonly INVESTMENT_ADVISOR: "investment_advisor"; readonly MONEY_TRANSFER: "money_transfer"; readonly BANKING_CORRESPONDENT: "banking_correspondent"; readonly OTHER_BUSINESS: "other_business"; }>; tagline: z.ZodPreprocess>; description: z.ZodPreprocess>; tags: z.ZodDefault>>; branches: z.ZodArray>; address: z.ZodString; location: z.ZodObject<{ type: z.ZodLiteral<"Point">; coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; }, z.core.$strip>; locality: z.ZodPreprocess>; city: z.ZodPreprocess>; landmark: z.ZodPreprocess>; phone: z.ZodPreprocess>; areaId: z.ZodOptional; }, z.core.$strip>>; contact: z.ZodObject<{ phone: z.ZodString; whatsapp: z.ZodPreprocess>; email: z.ZodPreprocess>; website: z.ZodPreprocess>; }, z.core.$strip>; hours: z.ZodOptional; closed: z.ZodDefault; open: z.ZodOptional; close: z.ZodOptional; }, z.core.$strip>>>; logo: z.ZodPreprocess>; coverImage: z.ZodPreprocess>; photos: z.ZodDefault>; establishedYear: z.ZodOptional; }, z.core.$strip>; /** Create body — enforces subcategory belongs to the chosen category. */ export declare const createBusinessSchema: z.ZodObject<{ name: z.ZodString; category: z.ZodEnum<{ readonly FOOD_AND_DINING: "food_and_dining"; readonly GROCERY_AND_ESSENTIALS: "grocery_and_essentials"; readonly BEAUTY_AND_WELLNESS: "beauty_and_wellness"; readonly HEALTH_AND_MEDICAL: "health_and_medical"; readonly FITNESS_AND_SPORTS: "fitness_and_sports"; readonly EDUCATION_AND_COACHING: "education_and_coaching"; readonly PROFESSIONAL_SERVICES: "professional_services"; readonly HOME_SERVICES: "home_services"; readonly RETAIL_AND_SHOPPING: "retail_and_shopping"; readonly AUTOMOTIVE: "automotive"; readonly EVENTS_AND_PHOTOGRAPHY: "events_and_photography"; readonly TRAVEL_AND_STAY: "travel_and_stay"; readonly REPAIR_AND_ELECTRONICS: "repair_and_electronics"; readonly REAL_ESTATE_SERVICES: "real_estate_services"; readonly FINANCIAL_SERVICES: "financial_services"; readonly OTHER: "other"; }>; subcategory: z.ZodEnum<{ readonly RESTAURANT: "restaurant"; readonly CAFE: "cafe"; readonly BAKERY: "bakery"; readonly SWEET_SHOP: "sweet_shop"; readonly FAST_FOOD: "fast_food"; readonly CLOUD_KITCHEN: "cloud_kitchen"; readonly TIFFIN_SERVICE: "tiffin_service"; readonly ICE_CREAM_PARLOUR: "ice_cream_parlour"; readonly JUICE_BAR: "juice_bar"; readonly DHABA: "dhaba"; readonly CATERING: "catering"; readonly KIRANA_STORE: "kirana_store"; readonly SUPERMARKET: "supermarket"; readonly DAIRY_SHOP: "dairy_shop"; readonly VEGETABLE_FRUIT_SHOP: "vegetable_fruit_shop"; readonly GENERAL_STORE: "general_store"; readonly ORGANIC_STORE: "organic_store"; readonly MEAT_FISH_SHOP: "meat_fish_shop"; readonly SALON: "salon"; readonly SPA: "spa"; readonly BEAUTY_PARLOUR: "beauty_parlour"; readonly BARBER_SHOP: "barber_shop"; readonly NAIL_STUDIO: "nail_studio"; readonly MAKEUP_ARTIST: "makeup_artist"; readonly MASSAGE_CENTRE: "massage_centre"; readonly COSMETIC_CLINIC: "cosmetic_clinic"; readonly DOCTOR_CLINIC: "doctor_clinic"; readonly HOSPITAL: "hospital"; readonly DENTAL_CLINIC: "dental_clinic"; readonly PHARMACY: "pharmacy"; readonly DIAGNOSTIC_LAB: "diagnostic_lab"; readonly PHYSIOTHERAPY: "physiotherapy"; readonly OPTICAL_STORE: "optical_store"; readonly VETERINARY_CLINIC: "veterinary_clinic"; readonly AYURVEDIC_CLINIC: "ayurvedic_clinic"; readonly MENTAL_HEALTH: "mental_health"; readonly GYM: "gym"; readonly YOGA_STUDIO: "yoga_studio"; readonly FITNESS_TRAINER: "fitness_trainer"; readonly SPORTS_ACADEMY: "sports_academy"; readonly DANCE_STUDIO: "dance_studio"; readonly MARTIAL_ARTS: "martial_arts"; readonly SWIMMING_POOL: "swimming_pool"; readonly SPORTS_SHOP: "sports_shop"; readonly TUITION_CLASSES: "tuition_classes"; readonly COACHING_INSTITUTE: "coaching_institute"; readonly SCHOOL: "school"; readonly PLAYSCHOOL: "playschool"; readonly COMPUTER_TRAINING: "computer_training"; readonly MUSIC_CLASSES: "music_classes"; readonly HOBBY_CLASSES: "hobby_classes"; readonly LANGUAGE_CLASSES: "language_classes"; readonly LIBRARY: "library"; readonly SKILL_TRAINING: "skill_training"; readonly CHARTERED_ACCOUNTANT: "chartered_accountant"; readonly LAWYER: "lawyer"; readonly BUSINESS_CONSULTANT: "business_consultant"; readonly ARCHITECT: "architect"; readonly INTERIOR_DESIGNER: "interior_designer"; readonly TAX_CONSULTANT: "tax_consultant"; readonly NOTARY: "notary"; readonly HR_RECRUITMENT: "hr_recruitment"; readonly ELECTRICIAN: "electrician"; readonly PLUMBER: "plumber"; readonly CARPENTER: "carpenter"; readonly PAINTER: "painter"; readonly PEST_CONTROL: "pest_control"; readonly HOME_CLEANING: "home_cleaning"; readonly APPLIANCE_REPAIR: "appliance_repair"; readonly AC_SERVICE: "ac_service"; readonly PACKERS_MOVERS: "packers_movers"; readonly MASON: "mason"; readonly GARDENER: "gardener"; readonly CLOTHING_STORE: "clothing_store"; readonly FOOTWEAR_STORE: "footwear_store"; readonly JEWELLERY_STORE: "jewellery_store"; readonly MOBILE_STORE: "mobile_store"; readonly ELECTRONICS_STORE: "electronics_store"; readonly FURNITURE_STORE: "furniture_store"; readonly GIFT_SHOP: "gift_shop"; readonly STATIONERY_STORE: "stationery_store"; readonly HARDWARE_STORE: "hardware_store"; readonly BOOK_STORE: "book_store"; readonly TOY_STORE: "toy_store"; readonly CAR_DEALER: "car_dealer"; readonly BIKE_DEALER: "bike_dealer"; readonly CAR_SERVICE: "car_service"; readonly BIKE_SERVICE: "bike_service"; readonly CAR_WASH: "car_wash"; readonly TYRE_SHOP: "tyre_shop"; readonly SPARE_PARTS: "spare_parts"; readonly DRIVING_SCHOOL: "driving_school"; readonly CAR_RENTAL: "car_rental"; readonly EVENT_PLANNER: "event_planner"; readonly PHOTOGRAPHER: "photographer"; readonly VIDEOGRAPHER: "videographer"; readonly BANQUET_HALL: "banquet_hall"; readonly DECORATOR: "decorator"; readonly DJ_SERVICES: "dj_services"; readonly TENT_HOUSE: "tent_house"; readonly PARTY_SUPPLIES: "party_supplies"; readonly HOTEL: "hotel"; readonly GUEST_HOUSE: "guest_house"; readonly HOMESTAY: "homestay"; readonly TRAVEL_AGENCY: "travel_agency"; readonly TOUR_OPERATOR: "tour_operator"; readonly TAXI_SERVICE: "taxi_service"; readonly BUS_OPERATOR: "bus_operator"; readonly MOBILE_REPAIR: "mobile_repair"; readonly COMPUTER_REPAIR: "computer_repair"; readonly WATCH_REPAIR: "watch_repair"; readonly CCTV_INSTALLATION: "cctv_installation"; readonly ELECTRONICS_REPAIR: "electronics_repair"; readonly RO_WATER_SERVICE: "ro_water_service"; readonly PROPERTY_DEALER: "property_dealer"; readonly BUILDER_DEVELOPER: "builder_developer"; readonly RENTAL_AGENT: "rental_agent"; readonly PG_HOSTEL: "pg_hostel"; readonly PROPERTY_VALUATION: "property_valuation"; readonly INSURANCE_AGENT: "insurance_agent"; readonly LOAN_AGENT: "loan_agent"; readonly INVESTMENT_ADVISOR: "investment_advisor"; readonly MONEY_TRANSFER: "money_transfer"; readonly BANKING_CORRESPONDENT: "banking_correspondent"; readonly OTHER_BUSINESS: "other_business"; }>; tagline: z.ZodPreprocess>; description: z.ZodPreprocess>; tags: z.ZodDefault>>; branches: z.ZodArray>; address: z.ZodString; location: z.ZodObject<{ type: z.ZodLiteral<"Point">; coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; }, z.core.$strip>; locality: z.ZodPreprocess>; city: z.ZodPreprocess>; landmark: z.ZodPreprocess>; phone: z.ZodPreprocess>; areaId: z.ZodOptional; }, z.core.$strip>>; contact: z.ZodObject<{ phone: z.ZodString; whatsapp: z.ZodPreprocess>; email: z.ZodPreprocess>; website: z.ZodPreprocess>; }, z.core.$strip>; hours: z.ZodOptional; closed: z.ZodDefault; open: z.ZodOptional; close: z.ZodOptional; }, z.core.$strip>>>; logo: z.ZodPreprocess>; coverImage: z.ZodPreprocess>; photos: z.ZodDefault>; establishedYear: z.ZodOptional; }, z.core.$strip>; export type CreateBusinessInput = z.infer; /** Update body — all fields optional; re-checks the pair only when both given. */ export declare const updateBusinessSchema: z.ZodObject<{ name: z.ZodOptional; category: z.ZodOptional>; subcategory: z.ZodOptional>; tagline: z.ZodOptional>>; description: z.ZodOptional>>; tags: z.ZodOptional>>>; branches: z.ZodOptional>; address: z.ZodString; location: z.ZodObject<{ type: z.ZodLiteral<"Point">; coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; }, z.core.$strip>; locality: z.ZodPreprocess>; city: z.ZodPreprocess>; landmark: z.ZodPreprocess>; phone: z.ZodPreprocess>; areaId: z.ZodOptional; }, z.core.$strip>>>; contact: z.ZodOptional>; email: z.ZodPreprocess>; website: z.ZodPreprocess>; }, z.core.$strip>>; hours: z.ZodOptional; closed: z.ZodDefault; open: z.ZodOptional; close: z.ZodOptional; }, z.core.$strip>>>>; logo: z.ZodOptional>>; coverImage: z.ZodOptional>>; photos: z.ZodOptional>>; establishedYear: z.ZodOptional>; }, z.core.$strip>; export type UpdateBusinessInput = z.infer; /** Public discovery / search query. Radius defaults to 1km (the "near me" core). */ export declare const searchBusinessesQuerySchema: z.ZodObject<{ page: z.ZodDefault>; limit: z.ZodDefault>; q: z.ZodPreprocess>; category: z.ZodOptional>; subcategory: z.ZodOptional>; tags: z.ZodPreprocess>>>; lng: z.ZodOptional>; lat: z.ZodOptional>; radiusKm: z.ZodDefault>; openNow: z.ZodPreprocess>; sortBy: z.ZodDefault>; sortOrder: z.ZodDefault>; }, z.core.$strip>; export type SearchBusinessesQuery = z.infer; /** Owner's "my businesses" list query. */ export declare const myBusinessesQuerySchema: z.ZodObject<{ page: z.ZodDefault>; limit: z.ZodDefault>; status: z.ZodOptional>; }, z.core.$strip>; export type MyBusinessesQuery = z.infer; export interface NearMeBranch { label?: string; address: string; location: GeoJsonPoint; locality?: string; city?: string; landmark?: string; phone?: string; areaId?: string; } export interface NearMeDayHours { day: NearMeDay; closed: boolean; open?: string; close?: string; } export interface NearMeContact { phone: string; whatsapp?: string; email?: string; website?: string; } /** * Full business entity as returned by detail / owner / search endpoints. * Matches the backend lean document shape (house `createdBy` + `creatorName` * convention); geo searches also carry `distanceKm`. */ export interface NearMeBusiness { _id: string; createdBy: string; creatorName: string; name: string; slug: string; category: NearMeCategory; subcategory: NearMeSubcategory; tagline?: string; description?: string; tags: NearMeTag[]; branches: NearMeBranch[]; contact: NearMeContact; hours?: NearMeDayHours[]; logo?: string; coverImage?: string; photos: string[]; establishedYear?: number; status: NearMeStatus; verified: boolean; /** Premium-plan featured placement — a discovery sort boost + a badge. */ featured: boolean; ratingAvg: number; ratingCount: number; viewCount: number; leadCount: number; savedCount: number; /** Distance in km from the search origin, present only on geo searches. */ distanceKm?: number; createdAt: string; updatedAt: string; } /** Paginated search envelope (mirrors every list endpoint). */ export interface NearMeBusinessSearchResult { items: NearMeBusiness[]; total: number; page: number; limit: number; totalPages: number; } //# sourceMappingURL=business.schema.d.ts.map