2021-09-16 12:18:11 +02:00
|
|
|
package ws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mattermost/focalboard/server/model"
|
|
|
|
)
|
|
|
|
|
2022-03-22 16:24:34 +02:00
|
|
|
// UpdateCategoryMessage is sent on block updates.
|
|
|
|
type UpdateCategoryMessage struct {
|
2022-12-14 10:51:53 +02:00
|
|
|
Action string `json:"action"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
Category *model.Category `json:"category,omitempty"`
|
|
|
|
BoardCategories []*model.BoardCategoryWebsocketData `json:"blockCategories,omitempty"`
|
2022-03-22 16:24:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateBlockMsg is sent on block updates.
|
|
|
|
type UpdateBlockMsg struct {
|
2022-10-25 22:46:43 +02:00
|
|
|
Action string `json:"action"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
Block *model.Block `json:"block"`
|
2021-09-16 12:18:11 +02:00
|
|
|
}
|
|
|
|
|
2022-03-22 16:24:34 +02:00
|
|
|
// UpdateBoardMsg is sent on block updates.
|
|
|
|
type UpdateBoardMsg struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
Board *model.Board `json:"board"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateMemberMsg is sent on membership updates.
|
|
|
|
type UpdateMemberMsg struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
Member *model.BoardMember `json:"member"`
|
|
|
|
}
|
|
|
|
|
2021-12-10 17:46:37 +02:00
|
|
|
// UpdateSubscription is sent on subscription updates.
|
|
|
|
type UpdateSubscription struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
Subscription *model.Subscription `json:"subscription"`
|
|
|
|
}
|
|
|
|
|
2022-06-15 12:17:44 +02:00
|
|
|
// UpdateClientConfig is sent on block updates.
|
|
|
|
type UpdateClientConfig struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
ClientConfig model.ClientConfig `json:"clientconfig"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateClientConfig is sent on block updates.
|
|
|
|
type UpdateCardLimitTimestamp struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
Timestamp int64 `json:"timestamp"`
|
|
|
|
}
|
|
|
|
|
2021-09-16 12:18:11 +02:00
|
|
|
// WebsocketCommand is an incoming command from the client.
|
|
|
|
type WebsocketCommand struct {
|
2022-03-22 16:24:34 +02:00
|
|
|
Action string `json:"action"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
Token string `json:"token"`
|
|
|
|
ReadToken string `json:"readToken"`
|
|
|
|
BlockIDs []string `json:"blockIds"`
|
2021-09-16 12:18:11 +02:00
|
|
|
}
|
2022-12-14 10:51:53 +02:00
|
|
|
|
|
|
|
type CategoryReorderMessage struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
CategoryOrder []string `json:"categoryOrder"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CategoryBoardReorderMessage struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
CategoryID string `json:"CategoryId"`
|
|
|
|
BoardOrder []string `json:"BoardOrder"`
|
|
|
|
TeamID string `json:"teamId"`
|
|
|
|
}
|