MM-32421: Extend channel sidebar category APIs for Plugins (#17821)
* extend plugin api with sidebar functionalities * include generated mocks for tests * bump up version requirements for plugin api * update tag to 'ChannelSidebar' Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a9b3e423e6
Коммит
b4f6cb8cb7
@@ -168,6 +168,31 @@ func (_m *API) CreateChannel(channel *model.Channel) (*model.Channel, *model.App
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateChannelSidebarCategory provides a mock function with given fields: userID, teamID, newCategory
|
||||
func (_m *API) CreateChannelSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
|
||||
ret := _m.Called(userID, teamID, newCategory)
|
||||
|
||||
var r0 *model.SidebarCategoryWithChannels
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok {
|
||||
r0 = rf(userID, teamID, newCategory)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) *model.AppError); ok {
|
||||
r1 = rf(userID, teamID, newCategory)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateCommand provides a mock function with given fields: cmd
|
||||
func (_m *API) CreateCommand(cmd *model.Command) (*model.Command, error) {
|
||||
ret := _m.Called(cmd)
|
||||
@@ -814,6 +839,31 @@ func (_m *API) GetChannelMembersForUser(teamID string, userID string, page int,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelSidebarCategories provides a mock function with given fields: userID, teamID
|
||||
func (_m *API) GetChannelSidebarCategories(userID string, teamID string) (*model.OrderedSidebarCategories, *model.AppError) {
|
||||
ret := _m.Called(userID, teamID)
|
||||
|
||||
var r0 *model.OrderedSidebarCategories
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok {
|
||||
r0 = rf(userID, teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.OrderedSidebarCategories)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
|
||||
r1 = rf(userID, teamID)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelStats provides a mock function with given fields: channelId
|
||||
func (_m *API) GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError) {
|
||||
ret := _m.Called(channelId)
|
||||
@@ -3196,6 +3246,31 @@ func (_m *API) UpdateChannelMemberRoles(channelId string, userID string, newRole
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateChannelSidebarCategories provides a mock function with given fields: userID, teamID, categories
|
||||
func (_m *API) UpdateChannelSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) {
|
||||
ret := _m.Called(userID, teamID, categories)
|
||||
|
||||
var r0 []*model.SidebarCategoryWithChannels
|
||||
if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok {
|
||||
r0 = rf(userID, teamID, categories)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.SidebarCategoryWithChannels)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string, []*model.SidebarCategoryWithChannels) *model.AppError); ok {
|
||||
r1 = rf(userID, teamID, categories)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateCommand provides a mock function with given fields: commandID, updatedCmd
|
||||
func (_m *API) UpdateCommand(commandID string, updatedCmd *model.Command) (*model.Command, error) {
|
||||
ret := _m.Called(commandID, updatedCmd)
|
||||
|
||||
Ссылка в новой задаче
Block a user