server/apis/public/ticket.api
EUForest 96808d531a
Application device interface encryption and other bug fixes (#87)
* add: device login

* update: global config

* add: User transmission interface encryption

* update: get global config

* update: User transmission interface encryption

* add: get device list

* add: SecretIsEmpty Message

* update: device middleware

* add: query user subscribe node list

* fix bug: query device list

* fix bug: unbind device

* update: device login

* fix bug: The ad table is missing the description field

* fix bug:page size is zero

* update: Device Middleware

* fix bug: Site custom data update failed
2025-10-15 10:09:19 -04:00

70 lines
1.6 KiB
Plaintext

syntax = "v1"
info (
title: "Ticket API"
desc: "API for ppanel"
author: "Tension"
email: "tension@ppanel.com"
version: "0.0.1"
)
import "../types.api"
type (
GetUserTicketListResponse {
Total int64 `json:"total"`
List []Ticket `json:"list"`
}
CreateUserTicketRequest {
Title string `json:"title"`
Description string `json:"description"`
}
GetUserTicketListRequest {
Page int `form:"page"`
Size int `form:"size"`
Status *uint8 `form:"status,omitempty"`
Search string `form:"search,omitempty"`
}
GetUserTicketDetailRequest {
Id int64 `form:"id" validate:"required"`
}
UpdateUserTicketStatusRequest {
Id int64 `json:"id" validate:"required"`
Status *uint8 `json:"status" validate:"required"`
}
CreateUserTicketFollowRequest {
TicketId int64 `json:"ticket_id"`
From string `json:"from"`
Type uint8 `json:"type"`
Content string `json:"content"`
}
)
@server (
prefix: v1/public/ticket
group: public/ticket
middleware: AuthMiddleware,DeviceMiddleware
)
service ppanel {
@doc "Get ticket list"
@handler GetUserTicketList
get /list (GetUserTicketListRequest) returns (GetUserTicketListResponse)
@doc "Get ticket detail"
@handler GetUserTicketDetails
get /detail (GetUserTicketDetailRequest) returns (Ticket)
@doc "Update ticket status"
@handler UpdateUserTicketStatus
put / (UpdateUserTicketStatusRequest)
@doc "Create ticket follow"
@handler CreateUserTicketFollow
post /follow (CreateUserTicketFollowRequest)
@doc "Create ticket"
@handler CreateUserTicket
post / (CreateUserTicketRequest)
}