-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChannel.thrift
More file actions
212 lines (175 loc) · 4.57 KB
/
Channel.thrift
File metadata and controls
212 lines (175 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
enum AppStoreCode {
PAYMENT_APPLE = 1,
PAYMENT_GOOGLE = 2,
}
enum ChannelAllowedPermission {
PROFILE = 0,
FRIENDS = 1,
GROUP = 2,
}
enum ChannelConfiguration {
MESSAGE = 0,
MESSAGE_NOTIFICATION = 1,
NOTIFICATION_CENTER = 2,
}
enum ChannelErrorCode {
ILLEGAL_ARGUMENT = 0,
INTERNAL_ERROR = 1,
CONNECTION_ERROR = 2,
AUTHENTICATIONI_FAILED = 3,
NEED_PERMISSION_APPROVAL = 4,
COIN_NOT_USABLE = 5,
WEBVIEW_NOT_ALLOWED = 6,
}
enum ChannelFeatureLicense {
BLE_LCS_API_USABLE = 26,
PROHIBIT_MINIMIZE_CHANNEL_BROWSER = 27,
ALLOW_IOS_WEBKIT = 28,
PURCHASE_LCS_API_USABLE = 38,
}
enum PublicType {
HIDDEN = 0,
PUBLIC = 1000,
}
exception ChannelException {
1: ChannelErrorCode code;
2: string reason;
3: map<string, string> parameterMap;
}
struct ApprovedChannelInfo {
1: ChannelInfo channelInfo;
2: i64 approvedAt;
}
struct ApprovedChannelInfos {
1: list<ApprovedChannelInfo> approvedChannelInfos;
2: i64 revision;
}
struct ChannelDomain {
1: string host;
2: bool removed;
}
struct ChannelDomains {
1: list<ChannelDomain> channelDomains;
2: i64 revision;
}
struct ChannelIdWithLastUpdated {
1: string channelId;
2: i64 lastUpdated;
}
struct ChannelInfo {
1: string channelId;
3: string name;
4: string entryPageUrl;
5: string descriptionText;
6: ChannelProvider provider;
7: PublicType publicType;
8: string iconImage;
9: list<string> permissions;
11: string iconThumbnailImage;
12: list<ChannelConfiguration> channelConfigurations;
13: bool lcsAllApiUsable;
14: set<ChannelAllowedPermission> allowedPermissions;
15: list<ChannelDomain> channelDomains;
16: i64 updatedTimestamp;
17: set<ChannelFeatureLicense> featureLicenses;
}
struct ChannelNotificationSetting {
1: string channelId;
2: string name;
3: bool notificationReceivable;
4: bool messageReceivable;
5: bool showDefault;
}
struct ChannelProvider {
1: string name;
}
struct ChannelSettings {
1: bool unapprovedMessageReceivable;
}
struct ChannelToken {
1: string token;
2: string obsToken;
3: i64 expiration;
4: string refreshToken;
5: string channelAccessToken;
}
struct CoinUseReservation {
1: string channelId;
2: string shopOrderId;
3: AppStoreCode appStoreCode;
4: list<CoinUseReservationItem> items;
5: string country;
}
struct CoinUseReservationItem {
1: string itemId;
2: string itemName;
3: i32 amount;
}
struct RequestTokenResponse {
1: string requestToken;
2: string returnUrl;
}
struct WebLoginRequest {
1: string hookedFullUrl;
2: string sessionString;
3: bool fromIAB;
}
struct WebLoginResponse {
1: string returnUrl;
2: string optionalReturnUrl;
}
service ChannelService {
ChannelToken approveChannelAndIssueChannelToken(
1: string channelId
) throws(1: ChannelException e);
ApprovedChannelInfos getApprovedChannels(
2: i64 lastSynced,
3: string locale
) throws(1: ChannelException e);
ChannelInfo getChannelInfo(
2: string channelId,
3: string locale
) throws(1: ChannelException e);
ChannelNotificationSetting getChannelNotificationSetting(
1: string channelId,
2: string locale
) throws(1: ChannelException e);
list<ChannelNotificationSetting> getChannelNotificationSettings(
1: string locale
) throws(1: ChannelException e);
ChannelSettings getChannelSettings() throws(1: ChannelException e);
ChannelDomains getCommonDomains(
1: i64 lastSynced
) throws(1: ChannelException e);
WebLoginResponse getReturnUrlWithRequestTokenForAutoLogin(
2: WebLoginRequest webLoginRequest
) throws(1: ChannelException e);
list<string> getUpdatedChannelIds(
1: list<ChannelIdWithLastUpdated> channelIds
) throws(1: ChannelException e);
WebLoginResponse getWebLoginDisallowedUrl(
2: WebLoginRequest webLoginRequest
) throws(1: ChannelException e);
ChannelToken issueChannelToken(
1: string channelId
) throws(1: ChannelException e);
RequestTokenResponse issueRequestTokenWithAuthScheme(
1: string channelId,
2: string otpId,
3: list<string> authScheme,
4: string returnUrl
) throws(1: ChannelException e);
string reserveCoinUse(
2: CoinUseReservation request,
3: string locale,
) throws(1: ChannelException e);
void revokeChannel(
1: string channelId
) throws(1: ChannelException e);
void updateChannelNotificationSetting(
1: list<ChannelNotificationSetting> setting
) throws(1: ChannelException e);
bool updateChannelSettings(
1: ChannelSettings channelSettings
) throws(1: ChannelException e);
}