2026-06-29 15:49:13 +03:30
|
|
|
export type BookingStatus =
|
|
|
|
|
| 'pending'
|
|
|
|
|
| 'awaiting_payment'
|
|
|
|
|
| 'confirmed'
|
|
|
|
|
| 'cancelled'
|
|
|
|
|
| 'completed';
|
2026-06-12 20:16:14 +03:30
|
|
|
|
2026-05-23 13:14:52 +03:30
|
|
|
export type BusinessCategory = {
|
|
|
|
|
id: string;
|
|
|
|
|
slug: string;
|
|
|
|
|
title: string;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type BusinessImage = {
|
|
|
|
|
id: string;
|
|
|
|
|
url: string;
|
2026-06-12 20:16:14 +03:30
|
|
|
originalName?: string | null;
|
2026-05-23 13:14:52 +03:30
|
|
|
sortOrder: number;
|
2026-06-12 20:16:14 +03:30
|
|
|
isCover: boolean;
|
2026-05-23 13:14:52 +03:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type Business = {
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
2026-06-12 20:16:14 +03:30
|
|
|
subtitle?: string | null;
|
2026-05-23 13:14:52 +03:30
|
|
|
slug: string;
|
2026-06-12 20:16:14 +03:30
|
|
|
description?: string | null;
|
|
|
|
|
address?: string | null;
|
2026-06-13 10:19:31 +03:30
|
|
|
contactPhone?: string | null;
|
2026-06-12 20:16:14 +03:30
|
|
|
phone?: string | null;
|
2026-05-23 13:14:52 +03:30
|
|
|
isActive: boolean;
|
|
|
|
|
categoryId: string;
|
|
|
|
|
category?: BusinessCategory;
|
|
|
|
|
images?: BusinessImage[];
|
2026-06-12 20:16:14 +03:30
|
|
|
concurrentCapacity?: number;
|
|
|
|
|
slotStepMinutes?: number;
|
|
|
|
|
serviceClassesEnabled?: boolean;
|
2026-06-29 15:49:13 +03:30
|
|
|
autoApproveBookings?: boolean;
|
2026-06-12 20:16:14 +03:30
|
|
|
createdAt?: string;
|
|
|
|
|
updatedAt?: string;
|
2026-05-23 18:13:25 +03:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type UpdateBusinessPayload = {
|
|
|
|
|
title?: string;
|
2026-06-12 20:16:14 +03:30
|
|
|
subtitle?: string | null;
|
2026-05-23 18:13:25 +03:30
|
|
|
description?: string | null;
|
|
|
|
|
address?: string | null;
|
2026-06-13 10:19:31 +03:30
|
|
|
contactPhone?: string | null;
|
2026-06-12 20:16:14 +03:30
|
|
|
phone?: string | null;
|
|
|
|
|
isActive?: boolean;
|
2026-06-01 13:22:07 +03:30
|
|
|
concurrentCapacity?: number;
|
2026-06-01 21:01:45 +03:30
|
|
|
slotStepMinutes?: number;
|
2026-06-12 20:16:14 +03:30
|
|
|
serviceClassesEnabled?: boolean;
|
2026-06-29 15:49:13 +03:30
|
|
|
autoApproveBookings?: boolean;
|
2026-05-23 18:13:25 +03:30
|
|
|
};
|
|
|
|
|
|
2026-05-23 13:14:52 +03:30
|
|
|
export type ServiceTemplate = {
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
|
|
|
|
slug: string;
|
2026-06-12 20:16:14 +03:30
|
|
|
description?: string | null;
|
|
|
|
|
defaultDurationMinutes?: number | null;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
categoryId: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type BusinessServiceClassPrice = {
|
|
|
|
|
id: string;
|
|
|
|
|
classId: string;
|
|
|
|
|
price: string;
|
|
|
|
|
durationMinutes?: number | null;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type BusinessServiceClass = {
|
|
|
|
|
id: string;
|
|
|
|
|
businessId: string;
|
|
|
|
|
title: string;
|
|
|
|
|
description?: string | null;
|
|
|
|
|
sortOrder: number;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
classPrices?: BusinessServiceClassPrice[];
|
2026-05-23 13:14:52 +03:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type BusinessService = {
|
|
|
|
|
id: string;
|
|
|
|
|
businessId: string;
|
|
|
|
|
serviceTemplateId: string;
|
|
|
|
|
price: string;
|
2026-06-12 20:16:14 +03:30
|
|
|
durationMinutes?: number | null;
|
2026-05-23 13:14:52 +03:30
|
|
|
isActive: boolean;
|
|
|
|
|
serviceTemplate?: ServiceTemplate;
|
2026-05-31 21:38:09 +03:30
|
|
|
classPrices?: BusinessServiceClassPrice[];
|
2026-05-23 13:14:52 +03:30
|
|
|
};
|
2026-05-25 17:49:48 +03:30
|
|
|
|
|
|
|
|
export type Booking = {
|
|
|
|
|
id: string;
|
|
|
|
|
customerId: string;
|
|
|
|
|
businessId: string;
|
|
|
|
|
businessServiceId: string;
|
2026-05-31 21:38:09 +03:30
|
|
|
serviceClassId?: string | null;
|
|
|
|
|
bookingGroupId?: string | null;
|
2026-05-25 17:49:48 +03:30
|
|
|
scheduledAt: string;
|
|
|
|
|
status: BookingStatus;
|
2026-06-12 20:16:14 +03:30
|
|
|
note?: string | null;
|
2026-06-13 13:43:40 +03:30
|
|
|
cancellationReason?: string | null;
|
2026-06-29 15:49:13 +03:30
|
|
|
paymentToken?: string | null;
|
|
|
|
|
paymentAmount?: string | null;
|
2026-05-25 17:49:48 +03:30
|
|
|
business?: Business;
|
|
|
|
|
businessService?: BusinessService;
|
2026-05-31 21:38:09 +03:30
|
|
|
serviceClass?: BusinessServiceClass;
|
2026-06-12 20:16:14 +03:30
|
|
|
customer?: {
|
|
|
|
|
id: string;
|
|
|
|
|
mobile: string;
|
|
|
|
|
fullName?: string | null;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type BusinessRegistrationRequest = {
|
|
|
|
|
id: string;
|
|
|
|
|
status: string;
|
|
|
|
|
businessTitle: string;
|
|
|
|
|
categoryId: string;
|
|
|
|
|
ownerMobile: string;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type CreateBusinessRegistrationPayload = {
|
|
|
|
|
businessTitle: string;
|
|
|
|
|
categoryId: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
address?: string;
|
|
|
|
|
phone?: string;
|
|
|
|
|
};
|
|
|
|
|
|
2026-06-13 10:19:31 +03:30
|
|
|
export type BusinessServiceRequestStatus = 'pending' | 'approved' | 'rejected';
|
|
|
|
|
|
2026-06-12 20:16:14 +03:30
|
|
|
export type BusinessServiceRequest = {
|
|
|
|
|
id: string;
|
|
|
|
|
businessId: string;
|
2026-06-13 10:19:31 +03:30
|
|
|
status: BusinessServiceRequestStatus;
|
2026-06-12 20:16:14 +03:30
|
|
|
title: string;
|
|
|
|
|
description?: string | null;
|
|
|
|
|
price: string;
|
|
|
|
|
durationMinutes?: number | null;
|
2026-06-13 10:19:31 +03:30
|
|
|
adminNote?: string | null;
|
2026-06-12 20:16:14 +03:30
|
|
|
createdAt: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type CreateBusinessServiceRequestPayload = {
|
|
|
|
|
businessId: string;
|
|
|
|
|
title: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
price: number;
|
|
|
|
|
durationMinutes?: number;
|
2026-05-25 17:49:48 +03:30
|
|
|
};
|