feat: support tickets between accounts and platform admins
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 7m0s
ci / test (pull_request) Successful in 12m1s
ci / build (pull_request) Successful in 18m14s
ci / image (pull_request) Successful in 5m9s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 7m0s
ci / test (pull_request) Successful in 12m1s
ci / build (pull_request) Successful in 18m14s
ci / image (pull_request) Successful in 5m9s
Accounts open tickets under Support and admins answer them under Admin → Support tickets. - A ticket is open while it waits for the admins and answered while it waits for the account. Either side can close or reopen it, and a reply reopens it. - The admins are mailed about new tickets and replies, and the account about answers. - A ticket can name the active organization and point at a monitor, notification channel, alert group, status page or incident in it. Each must be something the account can read. - Next to the conversation, admins see the account at a glance: state, sign-in, organizations with their limits and usage, and open tickets. - Admins switch support off and limit how many tickets an account has open at once. - Suspended accounts and those yet to accept the terms reach support too; a suspended account opens one ticket. - Tickets are part of the account export and are deleted with the account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
9fc3c6b050
commit
f3d402705e
25 files changed
+5296
-451
No files matched your search
@@ -53,6 +53,8 @@ type Server struct {
|
||||
checkerNet *versioned[bool]
|
||||
// limits caches the platform's default limits.
|
||||
limits *versioned[Limits]
|
||||
// support caches how the platform runs support tickets.
|
||||
support *versioned[supportSettings]
|
||||
}
|
||||
|
||||
// Deps are the external resources a Server needs.
|
||||
@@ -88,6 +90,7 @@ func New(cfg config.API, d Deps) *Server {
|
||||
checkTypes: newVersioned[map[string]bool]("check-types"),
|
||||
checkerNet: newVersioned[bool]("checker-network"),
|
||||
limits: newVersioned[Limits]("limits"),
|
||||
support: newVersioned[supportSettings]("support"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +135,13 @@ func (s *Server) Mount(r gin.IRouter) {
|
||||
me.GET("/export", s.exportAccount)
|
||||
me.POST("/delete", s.deleteAccount)
|
||||
|
||||
support := v1.Group("/support", auth.Require(), s.requireSupport())
|
||||
support.GET("/tickets", s.listMyTickets)
|
||||
support.POST("/tickets", s.createTicket)
|
||||
support.GET("/tickets/:id", s.getMyTicket)
|
||||
support.POST("/tickets/:id/messages", s.replyMyTicket)
|
||||
support.PUT("/tickets/:id/status", s.setMyTicketStatus)
|
||||
|
||||
v1.POST("/invitations/:token/accept", auth.Require(), s.acceptInvitation)
|
||||
v1.POST("/invitations/:token/signup", s.inviteSignup)
|
||||
|
||||
@@ -203,6 +213,12 @@ func (s *Server) Mount(r gin.IRouter) {
|
||||
admin.GET("/regions", s.adminListRegions)
|
||||
admin.POST("/regions", s.adminCreateRegion)
|
||||
admin.DELETE("/regions/:id", s.adminDeleteRegion)
|
||||
admin.GET("/support/settings", s.adminGetSupportSettings)
|
||||
admin.PUT("/support/settings", s.adminSetSupportSettings)
|
||||
admin.GET("/support/tickets", s.adminListTickets)
|
||||
admin.GET("/support/tickets/:id", s.adminGetTicket)
|
||||
admin.POST("/support/tickets/:id/messages", s.adminReplyTicket)
|
||||
admin.PUT("/support/tickets/:id/status", s.adminSetTicketStatus)
|
||||
admin.GET("/agents", s.adminListAgents)
|
||||
admin.POST("/agents", s.adminCreateAgent)
|
||||
admin.DELETE("/agents/:id", s.adminDeleteAgent)
|
||||
|
||||
Reference in new issue
Block a user