package cn.sikey.mcdisk.feign;

import cn.sikey.mcdisk.entity.ActivateCloudPhotoAlbumMessage;
import cn.sikey.mcdisk.entity.MessagingPublishResponse;
import cn.sikey.mcdisk.entity.NotifyParentsSuccessfulActivationMessage;
import cn.sikey.mcdisk.entity.ReloginOnWwatchMessage;
import cn.sikey.mcdisk.feign.fallback.ApiMessageFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: nelson
 * @Date: 2025/5/29
 * @Description: 消息中心feign
 */
@FeignClient(value = "api-websocket", path = "/api/v2/messagectx/messaging/publish", fallbackFactory = ApiMessageFallbackFactory.class)
public interface ApiMessageFeignService {

    /**
     * 手表重新登录
     *
     * @param request 请求
     * @return
     */
    @PostMapping("/reloginWatch")
    MessagingPublishResponse reloginOnWwatch(@Validated @RequestBody ReloginOnWwatchMessage request);

    /**
     * 通知手表开通云相册服务
     *
     * @param request 请求
     * @return
     */
    @PostMapping("/activateCloudPhotoAlbum")
    MessagingPublishResponse activateCloudPhotoAlbum(@Validated @RequestBody ActivateCloudPhotoAlbumMessage request);

    /**
     * 开通成功通知家长
     *
     * @param request 请求
     * @return
     */
    @PostMapping("/wristwatch/notifyParentsSuccessful/activation")
    MessagingPublishResponse notifyParentsSuccessfulActivation(@Validated @RequestBody NotifyParentsSuccessfulActivationMessage request);

    /**
     * 通知家长授权
     *
     * @param request 请求
     * @return
     */
    @PostMapping("/wristwatch/notifyParentsAuthorization")
    MessagingPublishResponse notifyParentsAuthorization(@Validated @RequestBody NotifyParentsSuccessfulActivationMessage request);
}
