Snapshot of uncommitted work: landing, bots, prod infra, partner cabinet, backoffice stage 1

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
zabudko-ruandClaude Opus 5.5 committed 2026-10-21 01:23:32 +04:00
1 parent 45d7512d2b
commit d452824c62
314 files changed
+44394 -121

No files matched your search

+38 -4
View File
@@ -1,5 +1,5 @@
import type { ParamsSchema } from './params.ts';
import type { Pricing } from './pricing.ts';
import type { ExtraUnit, Pricing } from './pricing.ts';
import type { SlotConfig } from './slots.ts';
import type { CategoryCode, ProviderRole, ServiceFlow } from './types.ts';
@@ -24,6 +24,32 @@ export interface CatalogService {
const DAY_WINDOW: SlotConfig = { dayStartMinute: 9 * 60, dayEndMinute: 20 * 60, stepMinutes: 60, leadHours: 3, horizonDays: 14 };
const fixed = (price: number, minutes: number): Pricing => ({ kind: 'fixed', price, minutes });
/**
* Доп. услуги клининга (референс — qlean.ru). Цены — заглушки в драмах, владелец меняет их в админке.
* max — сколько единиц клиент может выбрать; minutes — сколько времени добавляет одна единица.
*/
export const CLEANING_EXTRAS: { code: string; unit: ExtraUnit; price: number; minutes: number; max: number }[] = [
{ code: 'windows', unit: 'item', price: 3500, minutes: 20, max: 20 },
{ code: 'balconyGlazing', unit: 'item', price: 8000, minutes: 45, max: 3 },
{ code: 'balcony', unit: 'item', price: 4500, minutes: 30, max: 3 },
{ code: 'fridge', unit: 'service', price: 3000, minutes: 30, max: 1 },
{ code: 'oven', unit: 'service', price: 2500, minutes: 30, max: 1 },
{ code: 'microwave', unit: 'service', price: 1500, minutes: 15, max: 1 },
{ code: 'kitchenCabinets', unit: 'service', price: 4000, minutes: 45, max: 1 },
{ code: 'complexKitchen', unit: 'service', price: 7500, minutes: 60, max: 1 },
{ code: 'chandelier', unit: 'item', price: 2500, minutes: 20, max: 10 },
{ code: 'wardrobe', unit: 'service', price: 3500, minutes: 30, max: 1 },
{ code: 'limescale', unit: 'service', price: 4000, minutes: 30, max: 1 },
{ code: 'petHair', unit: 'service', price: 2000, minutes: 20, max: 1 },
{ code: 'litter', unit: 'item', price: 1500, minutes: 10, max: 5 },
{ code: 'ironing', unit: 'hour', price: 3500, minutes: 60, max: 4 },
{ code: 'extraTime', unit: 'halfHour', price: 2500, minutes: 30, max: 8 },
{ code: 'keys', unit: 'service', price: 3500, minutes: 0, max: 1 },
{ code: 'experienced', unit: 'service', price: 5000, minutes: 0, max: 1 },
{ code: 'vacuum', unit: 'service', price: 4000, minutes: 0, max: 1 },
];
const CLEANING_EXTRAS_PRICES = Object.fromEntries(CLEANING_EXTRAS.map(({ code, unit, price, minutes }) => [code, { unit, price, minutes }]));
export const CATALOG: CatalogService[] = [
{
code: 'cleaning',
@@ -32,20 +58,26 @@ export const CATALOG: CatalogService[] = [
providerRole: 'CLEANER',
stage: 1,
isOnline: false,
// модель цены как у Qlean: тип уборки × комнаты × санузлы + доп. услуги, которые выбирает клиент
pricing: {
kind: 'rooms',
variantParam: 'cleaningType',
roomsParam: 'rooms',
bathroomsParam: 'bathrooms',
extrasParam: 'extras',
tiers: {
regular: { base: 15000, perRoom: 4000, baseMinutes: 120, perRoomMinutes: 45 },
general: { base: 25000, perRoom: 7000, baseMinutes: 210, perRoomMinutes: 75 },
renovation: { base: 35000, perRoom: 10000, baseMinutes: 300, perRoomMinutes: 90 },
regular: { base: 15000, perRoom: 4000, baseMinutes: 120, perRoomMinutes: 45, perBathroom: 3000, perBathroomMinutes: 30 },
general: { base: 25000, perRoom: 7000, baseMinutes: 210, perRoomMinutes: 75, perBathroom: 5000, perBathroomMinutes: 45 },
renovation: { base: 35000, perRoom: 10000, baseMinutes: 300, perRoomMinutes: 90, perBathroom: 7000, perBathroomMinutes: 60 },
},
extras: CLEANING_EXTRAS_PRICES,
},
paramsSchema: {
fields: [
{ key: 'cleaningType', type: 'select', options: ['regular', 'general', 'renovation'], default: 'regular', required: true },
{ key: 'rooms', type: 'int', min: 1, max: 6, default: 2, required: true },
{ key: 'bathrooms', type: 'int', min: 1, max: 4, default: 1, required: true },
{ key: 'extras', type: 'extras', items: CLEANING_EXTRAS.map(({ code, max }) => ({ code, max })), required: false },
],
},
slotConfig: DAY_WINDOW,
@@ -182,6 +214,8 @@ export const CATALOG: CatalogService[] = [
/** Скидка Barev+ по направлениям — заглушки */
export const DEFAULT_CATEGORY_DISCOUNTS: Record<CategoryCode, number> = { HOME: 10, DOCS: 10, LEARNING: 15, PERKS: 0 };
/** скидки Barev Elite по направлениям, % — по умолчанию «до −35%» с главной */
export const DEFAULT_ELITE_DISCOUNTS: Record<CategoryCode, number> = { HOME: 35, DOCS: 35, LEARNING: 35, PERKS: 0 };
/** 12 административных районов Еревана; названия — i18n districts.<code> */
export const YEREVAN_DISTRICTS = [