import api from './index' import type { IdType } from '@/utils/id' export interface NailArtistAvailabilityVO { startTime: string endTime: string dateText: string timeText: string available: boolean } export interface NailArtistWorkVO { id: IdType title?: string description?: string price?: number | string coverImageUrl?: string imageUrls?: string[] tags?: string[] likeCount?: number collectCount?: number } export interface NailArtistReviewVO { id: IdType artistId: IdType customerId?: IdType customerName?: string customerAvatar?: string productId?: IdType productTitle?: string rating?: number | string content?: string imageFileIds?: IdType[] imageUrls?: string[] submittedAt?: string } export interface NailArtistListItemVO { id?: IdType userId?: IdType identity?: string experience?: number skills?: string rating?: number | string status?: number participateProduction?: number workStartTime?: string workEndTime?: string userType?: number userTypeName?: string portfolio?: string nickname?: string shopId?: IdType shopName?: string signature?: string } export interface NailArtistProfileVO { artistId: IdType artistName?: string avatar?: string identity?: string signature?: string experience?: number status?: number shopId?: IdType shopName?: string rating?: number | string serviceCount?: number | string workStartTime?: string workEndTime?: string styleTags?: string[] works?: NailArtistWorkVO[] reviews?: NailArtistReviewVO[] availability?: NailArtistAvailabilityVO[] } export const nailArtistApi = { getPublicProfile: async (artistId: IdType): Promise => { return await api.get(`/nail-artist/profile/${artistId}`) as unknown as NailArtistProfileVO }, getAvailability: async (artistId: IdType): Promise => { return await api.get(`/nail-artist/${artistId}/availability`) as unknown as NailArtistAvailabilityVO[] }, listReviews: async (artistId: IdType): Promise => { return await api.get(`/nail-artist/${artistId}/reviews`) as unknown as NailArtistReviewVO[] }, listByShopId: async (shopId: IdType): Promise => { return await api.get(`/nail-artist/list/shop/${shopId}`) as unknown as NailArtistListItemVO[] } }