yt-dlp-dags/thrift_model/services/yt_tokens_ops.thrift
2025-08-26 18:00:55 +03:00

41 lines
3.0 KiB
Thrift

namespace py pangramia.yt.tokens_ops
namespace java com.pangramia.yt.tokens_ops
include "../data/common.thrift"
include "../data/exceptions.thrift"
include "yt_management.thrift"
// The unified service that combines token operations and management functions.
// The server implementation will decide which functions are active based on its role.
service YTTokenOpService extends yt_management.YTManagementService {
common.JobTokenData getOrRefreshTokenWithReport ( 1: string accountId,
2: string oldUrl,
3: common.JobState status,
4: optional string details,
5: optional string jobId,
6: optional common.TokenUpdateMode updateType = common.TokenUpdateMode.AUTO,
7: optional string url,
8: optional string clients) throws (1: exceptions.PBServiceException serviceExp,
2: exceptions.PBUserException userExp)
common.JobTokenData getOrRefreshToken ( 1: string accountId,
2: optional common.TokenUpdateMode updateType = common.TokenUpdateMode.AUTO,
3: optional string url,
4: optional string clients,
5: optional string machineId) throws (1: exceptions.PBServiceException serviceExp,
2: exceptions.PBUserException userExp)
common.JobTokenData getLatestToken (1: string accountId) throws (1: exceptions.PBServiceException serviceExp,
2: exceptions.PBUserException userExp),
common.JobTokenData refreshToken ( 1: string accountId,
2: optional common.TokenUpdateMode updateType = common.TokenUpdateMode.AUTO,
3: optional string url ) throws (1: exceptions.PBServiceException serviceExp,
2: exceptions.PBUserException userExp)
bool reportState( 1: string url,
2: common.JobState status,
3: optional string details,
4: optional string jobId) throws (1: exceptions.PBServiceException serviceExp,
2: exceptions.PBUserException userExp)
}