package com.example.ops_android.data.remote.api

import com.example.ops_android.data.model.ScheduleEvent
import com.example.ops_android.data.remote.ApiResponse
import retrofit2.http.Body
import retrofit2.http.POST

data class GetEventsRequest(
    val start: String? = null,
    val end: String? = null
)

data class EventsResponse(
    val events: List<ScheduleEvent>?
)

interface ScheduleApi {

    @POST("/schedule/getevents")
    suspend fun getEvents(@Body request: GetEventsRequest): ApiResponse<EventsResponse>

    @POST("/schedule/addevent")
    suspend fun addEvent(@Body request: Map<String, @JvmSuppressWildcards Any>): ApiResponse<Any>

    @POST("/schedule/editevent")
    suspend fun editEvent(@Body request: Map<String, @JvmSuppressWildcards Any>): ApiResponse<Any>

    @POST("/schedule/deleevent")
    suspend fun deleteEvent(@Body request: Map<String, @JvmSuppressWildcards Int>): ApiResponse<Any>
}
