forked from ValvePython/steam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsteammessages_cloud.proto
286 lines (236 loc) · 14 KB
/
steammessages_cloud.proto
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
syntax = "proto2";
import "steammessages_unified_base.proto";
option py_generic_services = true;
message CCloud_GetUploadServerInfo_Request {
optional uint32 appid = 1 [(description) = "App ID to which a file will be uploaded to."];
}
message CCloud_GetUploadServerInfo_Response {
optional string server_url = 1;
}
message CCloud_BeginHTTPUpload_Request {
optional uint32 appid = 1 [(description) = "App ID for which the file is being uploaded."];
optional uint32 file_size = 2 [(description) = "Original file size in bytes."];
optional string filename = 3 [(description) = "Name of the file to store in the cloud."];
optional string file_sha = 4 [(description) = "Hex string (40 digits) representing the SHA1 digest of the file."];
optional bool is_public = 5 [(description) = "True if the file should be marked public on the UFS, false otherwise."];
repeated string platforms_to_sync = 6 [(description) = "Array of string specifying which platforms to sync; value values: all, Windows, MacOS, linux, Switch, iPhoneOS, Android."];
repeated string request_headers_names = 7 [(description) = "Names for headers you'll want to set on your upload request. May be left blank."];
repeated string request_headers_values = 8 [(description) = "Values for headers you'll want to set on your upload request. The number of names must equal the number of values."];
}
message CCloud_BeginHTTPUpload_Response {
message HTTPHeaders {
optional string name = 1;
optional string value = 2;
}
optional fixed64 ugcid = 1 [(description) = "UGC ID of the uploaded file."];
optional fixed32 timestamp = 2 [(description) = "Server timestamp of file."];
optional string url_host = 3 [(description) = "Host name of server to which file should be uploaded via HTTP PUT."];
optional string url_path = 4 [(description) = "Relative path on server to which file should be uploaded."];
optional bool use_https = 5 [(description) = "If true, use https, otherwise use http."];
repeated .CCloud_BeginHTTPUpload_Response.HTTPHeaders request_headers = 6 [(description) = "Name-value pairs to be sent in HTTP PUT request."];
}
message CCloud_CommitHTTPUpload_Request {
optional bool transfer_succeeded = 1 [(description) = "True if the HTTP PUT to the upload URL succeeded (URL provided in response to Cloud.BeginHTTPUpload), false if a failure occurred."];
optional uint32 appid = 2 [(description) = "App ID for which the file is being uploaded. Must match the app ID provided to Cloud.BeginHTTPUpload."];
optional string file_sha = 3 [(description) = "Hex string (40 digits) representing the SHA1 digest of the file. Must match the SHA1 digest provided to Cloud.BeginHTTPUpload."];
optional string filename = 4 [(description) = "Filename as specified in the Cloud.BeginHTTPUpload request."];
}
message CCloud_CommitHTTPUpload_Response {
optional bool file_committed = 1 [(description) = "True if the file was successfully committed, false otherwise."];
}
message CCloud_GetFileDetails_Request {
optional uint64 ugcid = 1 [(description) = "ID of the Cloud file to get details for."];
optional uint32 appid = 2 [(description) = "App ID the file belongs to."];
}
message CCloud_UserFile {
optional uint32 appid = 1;
optional uint64 ugcid = 2;
optional string filename = 3;
optional uint64 timestamp = 4;
optional uint32 file_size = 5;
optional string url = 6;
optional fixed64 steamid_creator = 7;
optional uint32 flags = 8;
repeated string platforms_to_sync = 9 [(description) = "Array of string specifying which platforms to sync; value values: all, Windows, MacOS, linux, Switch, iPhoneOS, Android."];
optional string file_sha = 10 [(description) = "Hex string (40 digits) representing the SHA1 digest of the file."];
}
message CCloud_GetFileDetails_Response {
optional .CCloud_UserFile details = 1;
}
message CCloud_EnumerateUserFiles_Request {
optional uint32 appid = 1 [(description) = "App ID to enumerate the files of."];
optional bool extended_details = 2 [(description) = "(Optional) Get extended details back on the files found. Defaults to only returned the app Id and UGC Id of the files found."];
optional uint32 count = 3 [(description) = "(Optional) Maximum number of results to return on this call. Defaults to a maximum of 500 files returned."];
optional uint32 start_index = 4 [(description) = "(Optional) Starting index to begin enumeration at. Defaults to the beginning of the list."];
}
message CCloud_EnumerateUserFiles_Response {
repeated .CCloud_UserFile files = 1;
optional uint32 total_files = 2;
}
message CCloud_Delete_Request {
optional string filename = 1;
optional uint32 appid = 2 [(description) = "App ID the file belongs to."];
}
message CCloud_Delete_Response {
}
message CCloud_GetClientEncryptionKey_Request {
}
message CCloud_GetClientEncryptionKey_Response {
optional bytes key = 1 [(description) = "AES-256 encryption key"];
optional int32 crc = 2 [(description) = "CRC of key"];
}
message CCloud_CDNReport_Notification {
optional fixed64 steamid = 1;
optional string url = 2;
optional bool success = 3;
optional uint32 http_status_code = 4;
optional uint64 expected_bytes = 5;
optional uint64 received_bytes = 6;
optional uint32 duration = 7;
}
message CCloud_ExternalStorageTransferReport_Notification {
optional string host = 1;
optional string path = 2;
optional bool is_upload = 3;
optional bool success = 4;
optional uint32 http_status_code = 5;
optional uint64 bytes_expected = 6;
optional uint64 bytes_actual = 7;
optional uint32 duration_ms = 8;
optional uint32 cellid = 9;
optional bool proxied = 10;
optional bool ipv6_local = 11;
optional bool ipv6_remote = 12;
}
message CCloud_ClientBeginFileUpload_Request {
optional uint32 appid = 1 [(description) = "App ID for which the file is being uploaded."];
optional uint32 file_size = 2 [(description) = "file size as transmitted and stored in Cloud."];
optional uint32 raw_file_size = 3 [(description) = "file size before any compression and/or encryption."];
optional bytes file_sha = 4 [(description) = "SHA-1 of raw file."];
optional uint64 time_stamp = 5 [(description) = "Timestamp of file."];
optional string filename = 6 [(description) = "Name of the file to store in the cloud."];
optional uint32 platforms_to_sync = 7 [default = 4294967295];
optional uint32 cell_id = 9 [(description) = "Client's cell ID so we can pick storage location."];
optional bool can_encrypt = 10 [(description) = "if true, client can encrypt the file before uploading it"];
optional bool is_shared_file = 11 [(description) = "if true, this is going to be UGC or a screenshot or some other shared file"];
optional uint32 realm = 12 [(description) = "Steam Realm"];
}
message ClientCloudFileUploadBlockDetails {
message HTTPHeaders {
optional string name = 1;
optional string value = 2;
}
optional string url_host = 1 [(description) = "Host name of server to which file should be uploaded via HTTP PUT."];
optional string url_path = 2 [(description) = "Relative path on server to which file should be uploaded."];
optional bool use_https = 3 [(description) = "If true, use https, otherwise use http."];
optional int32 http_method = 4 [(description) = "EHTTPMethod to use for this block."];
repeated .ClientCloudFileUploadBlockDetails.HTTPHeaders request_headers = 5 [(description) = "Name-value pairs to be sent in HTTP PUT request."];
optional uint64 block_offset = 6 [(description) = "offset of file block to upload"];
optional uint32 block_length = 7 [(description) = "length of file block to upload - if zero, no part of the file is part of this block"];
optional bytes explicit_body_data = 8 [(description) = "explicit body data to use, instead of file data, for this block"];
optional bool may_parallelize = 9 [(description) = "if true, this request may be done in parallel with other similarly-marked requests"];
}
message CCloud_ClientBeginFileUpload_Response {
optional bool encrypt_file = 1 [(description) = "If true, the file should be encrypted by the client before upload"];
repeated .ClientCloudFileUploadBlockDetails block_requests = 2 [(description) = "HTTP requests to make to perform upload"];
}
message CCloud_ClientCommitFileUpload_Request {
optional bool transfer_succeeded = 1 [(description) = "True if all block uploads succeeded, false if any of them failed."];
optional uint32 appid = 2 [(description) = "App ID for which the file is being uploaded. Must match the app ID provided to Cloud.BeginFileUpload."];
optional bytes file_sha = 3 [(description) = "SHA1 digest of the raw file. Must match the SHA1 digest provided to Cloud.BeginFileUpload."];
optional string filename = 4 [(description) = "Filename as specified in the Cloud.BeginFileUpload request."];
}
message CCloud_ClientCommitFileUpload_Response {
optional bool file_committed = 1 [(description) = "True if the file was successfully committed, false otherwise."];
}
message CCloud_ClientFileDownload_Request {
optional uint32 appid = 1 [(description) = "App ID the file is part of."];
optional string filename = 2 [(description) = "Filename of the file."];
optional uint32 realm = 3 [(description) = "Steam Realm"];
}
message CCloud_ClientFileDownload_Response {
message HTTPHeaders {
optional string name = 1;
optional string value = 2;
}
optional uint32 appid = 1 [(description) = "Application the file belongs to"];
optional uint32 file_size = 2 [(description) = "file size as transmitted and stored in the Cloud"];
optional uint32 raw_file_size = 3 [(description) = "file size when decompressed and/or decrypted"];
optional bytes sha_file = 4 [(description) = "SHA of file"];
optional uint64 time_stamp = 5 [(description) = "Timestamp of file"];
optional bool is_explicit_delete = 6 [(description) = "True if this is an explicitly deleted file"];
optional string url_host = 7 [(description) = "Host to GET the file from"];
optional string url_path = 8 [(description) = "Path on that host to use, including URL parameters if any"];
optional bool use_https = 9 [(description) = "If set, use HTTPS, else use HTTP"];
repeated .CCloud_ClientFileDownload_Response.HTTPHeaders request_headers = 10 [(description) = "Name-value pairs to be sent in HTTP GET request."];
optional bool encrypted = 11;
}
message CCloud_ClientDeleteFile_Request {
optional uint32 appid = 1 [(description) = "App ID for which the file is being deleted."];
optional string filename = 2 [(description) = "Filename of file."];
optional bool is_explicit_delete = 3 [(description) = "If true, this is a 'delete'; if false, it is a 'forget'"];
}
message CCloud_ClientDeleteFile_Response {
}
message CCloud_ClientConflictResolution_Notification {
optional uint32 appid = 1 [(description) = "App ID for which the conflict was resolved."];
optional bool chose_local_files = 2 [(description) = "Did the user choose to keep the files local to the machine they are on right now?"];
}
message CCloud_EnumerateUserApps_Request {
}
message CCloud_EnumerateUserApps_Response {
message Apps {
optional uint32 appid = 1;
optional int32 totalcount = 2;
optional int64 totalsize = 3;
}
repeated .CCloud_EnumerateUserApps_Response.Apps apps = 1;
}
service Cloud {
option (service_description) = "A service for Steam Cloud operations.";
rpc GetUploadServerInfo (.CCloud_GetUploadServerInfo_Request) returns (.CCloud_GetUploadServerInfo_Response) {
option (method_description) = "Returns the URL of the proper cloud server for a user.";
}
rpc BeginHTTPUpload (.CCloud_BeginHTTPUpload_Request) returns (.CCloud_BeginHTTPUpload_Response) {
option (method_description) = "Begins the process of uploading a file to Steam external storage services. File should be uploaded via HTTP PUT to the returned URL, after which the upload must be finalized by a call to CommitHTTPUpload.";
}
rpc CommitHTTPUpload (.CCloud_CommitHTTPUpload_Request) returns (.CCloud_CommitHTTPUpload_Response) {
option (method_description) = "Commits a file upload initiated by BeginHTTPUpload and transferred via HTTP PUT.";
}
rpc GetFileDetails (.CCloud_GetFileDetails_Request) returns (.CCloud_GetFileDetails_Response) {
option (method_description) = "Returns details on a Cloud file.";
}
rpc EnumerateUserFiles (.CCloud_EnumerateUserFiles_Request) returns (.CCloud_EnumerateUserFiles_Response) {
option (method_description) = "Enumerates Cloud files for a user of a given app ID. Returns up to 500 files at a time.";
}
rpc Delete (.CCloud_Delete_Request) returns (.CCloud_Delete_Response) {
option (method_description) = "Deletes a file from the user's cloud.";
}
rpc GetClientEncryptionKey (.CCloud_GetClientEncryptionKey_Request) returns (.CCloud_GetClientEncryptionKey_Response) {
option (method_description) = "Gets the user's Cloud file encryption key.";
}
rpc CDNReport (.CCloud_CDNReport_Notification) returns (.NoResponse) {
option (method_description) = "Reports the result of a CDN transfer.";
}
rpc ExternalStorageTransferReport (.CCloud_ExternalStorageTransferReport_Notification) returns (.NoResponse) {
option (method_description) = "Reports the result of an external Cloud storage transfer.";
}
rpc ClientBeginFileUpload (.CCloud_ClientBeginFileUpload_Request) returns (.CCloud_ClientBeginFileUpload_Response) {
option (method_description) = "Initiate an upload to Cloud.";
}
rpc ClientCommitFileUpload (.CCloud_ClientCommitFileUpload_Request) returns (.CCloud_ClientCommitFileUpload_Response) {
option (method_description) = "Commit the file upload or indicate failure.";
}
rpc ClientFileDownload (.CCloud_ClientFileDownload_Request) returns (.CCloud_ClientFileDownload_Response) {
option (method_description) = "Initiate a file download.";
}
rpc ClientDeleteFile (.CCloud_ClientDeleteFile_Request) returns (.CCloud_ClientDeleteFile_Response) {
option (method_description) = "Delete or forget a file.";
}
rpc ClientConflictResolution (.CCloud_ClientConflictResolution_Notification) returns (.NoResponse) {
option (method_description) = "User has picked a resolution for a Cloud conflict.";
}
rpc EnumerateUserApps (.CCloud_EnumerateUserApps_Request) returns (.CCloud_EnumerateUserApps_Response) {
option (method_description) = "Enumerates apps stroing cloud files for a user.";
}
}