96 lines
2.0 KiB
Thrift
96 lines
2.0 KiB
Thrift
namespace py pangramia.yt.common
|
|
namespace java com.pangramia.yt.common
|
|
|
|
typedef string JobID
|
|
typedef string Timestamp
|
|
|
|
|
|
enum JobState {
|
|
SUCCESS,
|
|
FAIL,
|
|
BOT_FORBIDDEN_ON_URL_ACCESS,
|
|
BOT_FORBIDDEN_ON_FILE_DOWNLOAD,
|
|
BOT_CAPTCHA,
|
|
BOT_AUTH_RELOGIN_REQUIRED,
|
|
BOT_AUTH_SMS_REQUIRED,
|
|
BOT_AUTH_DEVICE_QR_REQUIRED,
|
|
BOT_ACCOUNT_BANNED,
|
|
BOT_IP_BANNED
|
|
}
|
|
|
|
struct JobTokenData {
|
|
1: optional string infoJson,
|
|
2: optional string ytdlpCommand,
|
|
3: optional string socks,
|
|
4: optional JobID jobId,
|
|
5: optional string url,
|
|
6: optional string cookiesBlob,
|
|
}
|
|
|
|
|
|
enum TokenUpdateMode {
|
|
AUTOREFRESH_AND_REMAIN_ANONYMOUS,
|
|
AUTOREFRESH_AND_ALLOW_AUTH,
|
|
AUTOREFRESH_AND_ONLY_AUTH,
|
|
CLEANUP_THEN_AUTOREFRESH_AND_ONLY_AUTH,
|
|
CLEANUP_THEN_AUTOREFRESH_AND_REMAIN_ANONYMOUS,
|
|
CLEANUP_THEN_AUTOREFRESH_AND_ALLOW_AUTH,
|
|
AUTO,// AUTOREFRESH_AND_ONLY_AUTH,
|
|
}
|
|
|
|
|
|
struct AccountData {
|
|
1: required string username,
|
|
2: required string password,
|
|
3: optional string countryCode
|
|
}
|
|
|
|
struct ProxyData {
|
|
1: required string proxyUrl,
|
|
2: optional string countryCode
|
|
}
|
|
|
|
|
|
enum AccountPairState {
|
|
ACTIVE,
|
|
PAUSED,
|
|
REMOVED,
|
|
IN_PROGRESS,
|
|
ALL
|
|
}
|
|
|
|
|
|
struct AccountPairWithState {
|
|
1: required string accountId,
|
|
2: required string proxyId,
|
|
3: optional AccountPairState accountPairState
|
|
4: optional string machineId,
|
|
}
|
|
|
|
struct JobData {
|
|
1: required string jobId,
|
|
2: required string url,
|
|
3: required string cookiesBlob,
|
|
4: required string potoken,
|
|
5: required string visitorId,
|
|
6: required string ytdlpCommand,
|
|
7: required string createdTime,
|
|
8: required map<string,string> telemetry,
|
|
9: required JobState state,
|
|
10: optional string errorMessage,
|
|
11: optional string socks5Id
|
|
}
|
|
|
|
struct RichCollectionPagination {
|
|
1: required bool hasNext,
|
|
2: required i32 totalCount,
|
|
3: required i32 page,
|
|
4: required i32 pageSize
|
|
}
|
|
|
|
struct RichCollectionJobData {
|
|
1: required list<JobData> items,
|
|
2: required RichCollectionPagination pagination
|
|
}
|
|
|