package com.fabledsword.minstrel.api.endpoints

import com.fabledsword.minstrel.models.wire.RequestWire
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

/**
 * Retrofit interface for `/api/admin/requests`. Mirrors
 * `flutter_client/lib/api/endpoints/admin_requests.dart`.
 *
 * Server returns the same `requestView` shape as the user-side
 * `/api/requests`, so RequestWire is reused. Different listing scope —
 * admin sees all users' requests, not just the caller's.
 */
interface AdminRequestsApi {
    @GET("api/admin/requests")
    suspend fun list(): List<RequestWire>

    @POST("api/admin/requests/{id}/approve")
    suspend fun approve(@Path("id") id: String)

    @POST("api/admin/requests/{id}/reject")
    suspend fun reject(@Path("id") id: String)
}
