[MM-36664] Added plugin API methods for user access tokens and OAuth apps (#17832)

Этот коммит содержится в:
Ben Schumacher
2021-07-14 15:08:22 +02:00
коммит произвёл GitHub
родитель 2637a326fb
Коммит 54b0ef574b
5 изменённых файлов: 414 добавлений и 0 удалений

Просмотреть файл

@@ -186,6 +186,16 @@ type API interface {
// Minimum server version: 5.26
DeletePreferencesForUser(userID string, preferences []model.Preference) *model.AppError
// CreateUserAccessToken creates a new access token.
// @tag User
// Minimum server version: 5.38
CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
// RevokeUserAccessToken revokes an existing access token.
// @tag User
// Minimum server version: 5.38
RevokeUserAccessToken(tokenID string) *model.AppError
// GetTeamIcon gets the team icon.
//
// @tag Team
@@ -1075,6 +1085,30 @@ type API interface {
// Minimum server version: 5.28
DeleteCommand(commandID string) error
// CreateOAuthApp creates a new OAuth App.
//
// @tag OAuth
// Minimum server version: 5.38
CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
// GetOAuthApp gets an existing OAuth App by id.
//
// @tag OAuth
// Minimum server version: 5.38
GetOAuthApp(appID string) (*model.OAuthApp, *model.AppError)
// UpdateOAuthApp updates an existing OAuth App.
//
// @tag OAuth
// Minimum server version: 5.38
UpdateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
// DeleteOAuthApp deletes an existing OAuth App by id.
//
// @tag OAuth
// Minimum server version: 5.38
DeleteOAuthApp(appID string) *model.AppError
// PublishPluginClusterEvent broadcasts a plugin event to all other running instances of
// the calling plugin that are present in the cluster.
//