import 'dart:io'; import 'package:dio/dio.dart'; import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart'; import 'package:eatvio_app/features/profile/models/chosen_diets_pagination_model.dart'; import 'package:eatvio_app/features/profile/models/circumference_model.dart'; import 'package:eatvio_app/features/profile/models/profile_model.dart'; import 'package:eatvio_app/features/profile/models/sub_model.dart'; import 'package:eatvio_app/features/profile/models/weight_model.dart'; import 'package:retrofit/retrofit.dart'; part 'profile_service.g.dart'; @RestApi() abstract class ProfileService { factory ProfileService(Dio dio, {String baseUrl}) = _ProfileService; @GET('/api/profile/show/{slug}') Future getProfileBySlug({@Path() required String slug}); @GET('/api/profile/index') Future getMyProfile(); @GET('/api/profile/detailz') Future getMyProfileDetails(); @GET('/api/profile/detailz/{slug}') Future getProfileDetailsBySlug({@Path() required String slug}); @POST('/api/profile/addCircumference') Future addCircumference({ @Part(name: 'chest_circumference') required int chestCircumference, @Part(name: 'waist_circumference') required int waistCircumference, @Part(name: 'hip_circumference') required int hipCircumference, }); @POST('/api/profile/addWeight') Future addWeight({@Part() required double weight}); @GET('/api/blogPosts/search_by_author/{slug}') Future> getBlogPostByAuthorSlug({@Path() required String slug}); @GET('/api/profile/measure/weight/{period}') Future> getWeight({@Path() required String period}); @GET('/api/profile/measure/weight/{period}/{slug}') Future> getWeightBySlug({@Path() required String period, @Path() required String slug}); @GET('/api/profile/measure/circumferences/{period}') Future> getCircumferences({@Path() required String period}); @GET('/api/profile/measure/circumferences/{period}/{slug}') Future> getCircumferencesBySlug({@Path() required String period, @Path() required String slug}); @GET('/api/profile/{slug}/subscribers') Future getSubscribers({@Path() required String slug, @Query('filters[name][\$startsWith]') String? query}); @GET('/api/profile/{slug}/subscriptions') Future getSubscriptions({@Path() required String slug, @Query('filters[name][\$startsWith]') String? query}); @POST('/api/profile/subscribe/{slug}') Future subscribe({@Path() required String slug}); @POST('/api/profile/unsubscribe/{slug}') Future unsubscribe({@Path() required String slug}); @POST('/api/profile/photo/upload') @MultiPart() Future uploadPhoto({@Part(name: 'photo') required File photo}); @DELETE('/api/profile/photo/delete') Future deletePhoto(); @GET('/api/profile/chosen_diets') Future getChosenDiets(); @POST('/api/profile/make_pass_key') Future getPassKey({@Body() required String json}); @GET('/api/profile/my_phone') Future getMyPhone(); @POST('/api/profile/send_email_code') Future sendEmailCode({@Body() Map data = const {}}); @POST('/api/profile/verificate_email_code') Future tryVerifyEmailByCode({@Body() required String code}); @DELETE('/api/profile/delete_my_account') Future deleteAccount(); }