This commit is contained in:
Юрий Першин
2022-01-22 07:40:36 +05:00
parent bd5af5170e
commit 852166df6d
15 changed files with 243 additions and 87 deletions
+44 -8
View File
@@ -1,12 +1,33 @@
syntax = "proto2";
message NotableMoment {
optional uint64 f1 = 1;
optional uint32 f2 = 2;
optional uint32 f3 = 3;
optional uint32 f4 = 4;
optional string f5 = 5;
optional string f6 = 6;
optional string f7 = 7;
}
message SocialInteraction {
optional uint64 f1 = 1;
optional uint32 f2 = 2;
optional float f3 = 3;
optional string f4 = 4;
}
message ClubAttribution {
optional string f1 = 1;
optional float f2 = 2;
}
message Activity {
optional uint64 id = 1;
required uint64 player_id = 2;
required uint32 f3 = 3; /* world_id or player_type_id */
required uint64 f3 = 3; /* world_id or player_type_id */
required string name = 4;
optional uint32 f5 = 5;
optional uint32 f6 = 6;
optional string f5 = 5;
//optional bool f6 = 6;
required string start_date = 7;
optional string end_date = 8;
optional float distance = 9; /* in meters */
@@ -20,15 +41,30 @@ message Activity {
optional float max_speed = 17; /* in m/s */
optional float calories = 18;
optional float total_elevation = 19;
optional uint64 strava_upload_id = 20;
optional uint64 strava_activity_id = 21;
optional uint32 strava_upload_id = 20;
optional uint32 strava_activity_id = 21;
//optional string f22 = 22;
optional uint32 f23 = 23;
optional bytes fit = 24;
optional string fit_filename = 25;
optional uint32 f29 = 29;
//optional uint64 f26 = 26;
//optional uint64 f27 = 27;
//optional float f28 = 28;
optional sint64 f29 = 29;
//repeated string f30 = 30;
optional string date = 31;
/*optional float f32 = 32;
optional string f33 = 33;
optional string f34 = 34;
repeated NotableMoment f35 = 35;
repeated SocialInteraction f36 = 36;
optional sint64 f37 = 37;
optional sint64 f38 = 38;
optional string f39 = 39;
optional int64 f40 = 40;
repeated ClubAttribution f41 = 41;*/
}
message Activities {
message Activities { // real name: ActivityList
repeated Activity activities = 1;
}
+35 -5
View File
@@ -14,12 +14,36 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x61\x63tivity.proto\"\xe5\x03\n\x08\x41\x63tivity\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x11\n\tplayer_id\x18\x02 \x02(\x04\x12\n\n\x02\x66\x33\x18\x03 \x02(\r\x12\x0c\n\x04name\x18\x04 \x02(\t\x12\n\n\x02\x66\x35\x18\x05 \x01(\r\x12\n\n\x02\x66\x36\x18\x06 \x01(\r\x12\x12\n\nstart_date\x18\x07 \x02(\t\x12\x10\n\x08\x65nd_date\x18\x08 \x01(\t\x12\x10\n\x08\x64istance\x18\t \x01(\x02\x12\x16\n\x0e\x61vg_heart_rate\x18\n \x01(\x02\x12\x16\n\x0emax_heart_rate\x18\x0b \x01(\x02\x12\x11\n\tavg_watts\x18\x0c \x01(\x02\x12\x11\n\tmax_watts\x18\r \x01(\x02\x12\x13\n\x0b\x61vg_cadence\x18\x0e \x01(\x02\x12\x13\n\x0bmax_cadence\x18\x0f \x01(\x02\x12\x11\n\tavg_speed\x18\x10 \x01(\x02\x12\x11\n\tmax_speed\x18\x11 \x01(\x02\x12\x10\n\x08\x63\x61lories\x18\x12 \x01(\x02\x12\x17\n\x0ftotal_elevation\x18\x13 \x01(\x02\x12\x18\n\x10strava_upload_id\x18\x14 \x01(\x04\x12\x1a\n\x12strava_activity_id\x18\x15 \x01(\x04\x12\x0b\n\x03\x66\x32\x33\x18\x17 \x01(\r\x12\x0b\n\x03\x66it\x18\x18 \x01(\x0c\x12\x14\n\x0c\x66it_filename\x18\x19 \x01(\t\x12\x0b\n\x03\x66\x32\x39\x18\x1d \x01(\r\x12\x0c\n\x04\x64\x61te\x18\x1f \x01(\t\"+\n\nActivities\x12\x1d\n\nactivities\x18\x01 \x03(\x0b\x32\t.Activity')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x61\x63tivity.proto\"c\n\rNotableMoment\x12\n\n\x02\x66\x31\x18\x01 \x01(\x04\x12\n\n\x02\x66\x32\x18\x02 \x01(\r\x12\n\n\x02\x66\x33\x18\x03 \x01(\r\x12\n\n\x02\x66\x34\x18\x04 \x01(\r\x12\n\n\x02\x66\x35\x18\x05 \x01(\t\x12\n\n\x02\x66\x36\x18\x06 \x01(\t\x12\n\n\x02\x66\x37\x18\x07 \x01(\t\"C\n\x11SocialInteraction\x12\n\n\x02\x66\x31\x18\x01 \x01(\x04\x12\n\n\x02\x66\x32\x18\x02 \x01(\r\x12\n\n\x02\x66\x33\x18\x03 \x01(\x02\x12\n\n\x02\x66\x34\x18\x04 \x01(\t\")\n\x0f\x43lubAttribution\x12\n\n\x02\x66\x31\x18\x01 \x01(\t\x12\n\n\x02\x66\x32\x18\x02 \x01(\x02\"\xd9\x03\n\x08\x41\x63tivity\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x11\n\tplayer_id\x18\x02 \x02(\x04\x12\n\n\x02\x66\x33\x18\x03 \x02(\x04\x12\x0c\n\x04name\x18\x04 \x02(\t\x12\n\n\x02\x66\x35\x18\x05 \x01(\t\x12\x12\n\nstart_date\x18\x07 \x02(\t\x12\x10\n\x08\x65nd_date\x18\x08 \x01(\t\x12\x10\n\x08\x64istance\x18\t \x01(\x02\x12\x16\n\x0e\x61vg_heart_rate\x18\n \x01(\x02\x12\x16\n\x0emax_heart_rate\x18\x0b \x01(\x02\x12\x11\n\tavg_watts\x18\x0c \x01(\x02\x12\x11\n\tmax_watts\x18\r \x01(\x02\x12\x13\n\x0b\x61vg_cadence\x18\x0e \x01(\x02\x12\x13\n\x0bmax_cadence\x18\x0f \x01(\x02\x12\x11\n\tavg_speed\x18\x10 \x01(\x02\x12\x11\n\tmax_speed\x18\x11 \x01(\x02\x12\x10\n\x08\x63\x61lories\x18\x12 \x01(\x02\x12\x17\n\x0ftotal_elevation\x18\x13 \x01(\x02\x12\x18\n\x10strava_upload_id\x18\x14 \x01(\r\x12\x1a\n\x12strava_activity_id\x18\x15 \x01(\r\x12\x0b\n\x03\x66\x32\x33\x18\x17 \x01(\r\x12\x0b\n\x03\x66it\x18\x18 \x01(\x0c\x12\x14\n\x0c\x66it_filename\x18\x19 \x01(\t\x12\x0b\n\x03\x66\x32\x39\x18\x1d \x01(\x12\x12\x0c\n\x04\x64\x61te\x18\x1f \x01(\t\"+\n\nActivities\x12\x1d\n\nactivities\x18\x01 \x03(\x0b\x32\t.Activity')
_NOTABLEMOMENT = DESCRIPTOR.message_types_by_name['NotableMoment']
_SOCIALINTERACTION = DESCRIPTOR.message_types_by_name['SocialInteraction']
_CLUBATTRIBUTION = DESCRIPTOR.message_types_by_name['ClubAttribution']
_ACTIVITY = DESCRIPTOR.message_types_by_name['Activity']
_ACTIVITIES = DESCRIPTOR.message_types_by_name['Activities']
NotableMoment = _reflection.GeneratedProtocolMessageType('NotableMoment', (_message.Message,), {
'DESCRIPTOR' : _NOTABLEMOMENT,
'__module__' : 'activity_pb2'
# @@protoc_insertion_point(class_scope:NotableMoment)
})
_sym_db.RegisterMessage(NotableMoment)
SocialInteraction = _reflection.GeneratedProtocolMessageType('SocialInteraction', (_message.Message,), {
'DESCRIPTOR' : _SOCIALINTERACTION,
'__module__' : 'activity_pb2'
# @@protoc_insertion_point(class_scope:SocialInteraction)
})
_sym_db.RegisterMessage(SocialInteraction)
ClubAttribution = _reflection.GeneratedProtocolMessageType('ClubAttribution', (_message.Message,), {
'DESCRIPTOR' : _CLUBATTRIBUTION,
'__module__' : 'activity_pb2'
# @@protoc_insertion_point(class_scope:ClubAttribution)
})
_sym_db.RegisterMessage(ClubAttribution)
Activity = _reflection.GeneratedProtocolMessageType('Activity', (_message.Message,), {
'DESCRIPTOR' : _ACTIVITY,
'__module__' : 'activity_pb2'
@@ -37,8 +61,14 @@ _sym_db.RegisterMessage(Activities)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_ACTIVITY._serialized_start=19
_ACTIVITY._serialized_end=504
_ACTIVITIES._serialized_start=506
_ACTIVITIES._serialized_end=549
_NOTABLEMOMENT._serialized_start=18
_NOTABLEMOMENT._serialized_end=117
_SOCIALINTERACTION._serialized_start=119
_SOCIALINTERACTION._serialized_end=186
_CLUBATTRIBUTION._serialized_start=188
_CLUBATTRIBUTION._serialized_end=229
_ACTIVITY._serialized_start=232
_ACTIVITY._serialized_end=705
_ACTIVITIES._serialized_start=707
_ACTIVITIES._serialized_end=750
# @@protoc_insertion_point(module_scope)
+78 -32
View File
@@ -1,13 +1,14 @@
syntax = "proto2";
message Category {
message EventSubgroupProtobuf {
required uint64 id = 1; // 2395269
optional string description = 2; // "3R True2 Steady Ride [2.0w/kg avg] (C)"
optional string f3 = 3; // ""
optional uint32 f4 = 4; // ""
optional uint32 f5 = 5; // 154
optional uint32 f6 = 6; // 0
optional string f7 = 7; // "PT3600S"
optional uint32 rules_id = 8; // 320
optional uint64 rules_id = 8; // 320
optional uint64 registrationStart = 9;
optional uint64 registrationStartWT = 10;
optional uint64 registrationEnd = 11;
@@ -18,58 +19,103 @@ message Category {
optional uint64 lineUpEndWT = 16;
optional uint64 eventSubgroupStart = 17;
optional uint64 eventSubgroupStartWT = 18;
optional uint32 f21 = 21; // 0
optional uint64 f19 = 19;
optional uint64 f20 = 20; //tag416
optional bool f21 = 21; // 0, tag424
required uint64 route_id = 22; // 3366225080
repeated uint32 leaders = 23; // or sweepers?
optional fixed32 f24 = 24;
optional uint32 laps = 25; // 0
optional uint32 startLocation = 29; // 13
optional uint32 label = 30; // 3
optional uint32 f31 = 31; // 1
optional fixed32 f32 = 32; // 1076258406
optional fixed32 f33 = 33; // 1078774989
optional uint32 duration = 34; // Duration of event in seconds
optional uint64 f36 = 36; // 493134166
optional uint32 f37 = 37; // 0
optional string audio = 39; // "https://cdn.zwift.com/AudioBroadcasts/wbrgrouprideaudiov4"
repeated uint32 sweepers = 41; // or leaders?
optional string f43 = 43;
optional uint32 f44 = 44; // 0
optional string tags = 45; // semi-colon delimited tags eg: "fenced;3r;created_ryan;communityevent;no_kick_mode;timestamp=1603911177622"
optional uint32 lateJoinInMinutes = 46;
optional uint32 map_id = 47; // 1
repeated uint64 leaders = 23; // or sweepers? tag440
optional fixed32 f24 = 24; //tag453
optional uint32 laps = 25; // 0, tag456
/* no 26-28 */
optional uint32 startLocation = 29; // 13, tag488
optional uint32 label = 30; // 3, tag496
optional uint32 f31 = 31; // 1, tag504
optional fixed32 f32 = 32; // 1076258406, tag645
optional fixed32 f33 = 33; // 1078774989, tag653
optional uint32 duration = 34; // Duration of event in seconds, tag656
optional uint32 f35 = 35; // tag664
optional uint64 f36 = 36; // 493134166, tag672
optional bool f37 = 37; // 0, tag680
optional uint64 f38 = 38; // tag688
optional string audio = 39; // "https://cdn.zwift.com/AudioBroadcasts/wbrgrouprideaudiov4", tag698
optional uint64 f40 = 40; // tag704
repeated uint64 sweepers = 41; // or leaders?, tag712
optional uint64 f42 = 42; // tag720
optional string f43 = 43; // tag730
optional bool f44 = 44; // 0, tag736
optional string tags = 45; // tag746, semi-colon delimited tags eg: "fenced;3r;created_ryan;communityevent;no_kick_mode;timestamp=1603911177622"
optional uint32 lateJoinInMinutes = 46; //tag752
optional uint64 map_id = 47; // 1, tag760
optional uint32 f48 = 48; //tag898
optional string f49 = 49; //tag906
repeated int32 f50 = 50; //tag912
optional bool f51 = 51; //tag920
}
message Event {
message MicroserviceEventData {
optional string f1 = 1;
optional string f2 = 2;
optional uint64 f3 = 3;
}
message EventSeriesProtobuf {
optional uint64 f1 = 1;
optional string f2 = 2;
optional string f3 = 3;
}
message EventTimeTrialOptions {
optional uint32 f1 = 1;
optional uint32 f2 = 2;
optional uint32 f3 = 3;
optional uint32 f4 = 4;
optional uint64 f5 = 5;
}
message Event { //real name: EventProtobuf
required uint64 id = 1;
optional uint32 world_id = 2;
required string title = 3;
optional string description = 4;
optional uint64 eventStart = 5; // Start time (epoch time in ms)
optional string f6 = 6;
optional fixed32 f7 = 7;
optional uint64 laps = 8;
optional uint64 f9 = 9;
repeated Category category = 10;
optional uint32 laps = 8;
optional uint32 f9 = 9;
repeated EventSubgroupProtobuf category = 10;
optional string f11 = 11;
optional string pic_url = 12;
optional uint32 duration = 13; // Duration in seconds?
optional uint64 route_id = 14;
optional uint64 rules_id = 15;
optional uint64 f16 = 16;
optional uint64 f17 = 17;
optional uint32 f16 = 16;
optional bool f17 = 17;
optional uint64 f18 = 18;
optional string f19 = 19;
optional uint32 f22 = 22;
optional string f20 = 20;
optional string f21 = 21;
optional uint32 f22 = 22; //sport
optional uint64 f23 = 23;
optional uint32 f24 = 24;
optional uint64 f25 = 25;
optional string f26 = 26;
optional uint32 f27 = 27;
optional uint32 f28 = 28;
optional uint32 f29 = 29;
optional bool f28 = 28;
optional bool f29 = 29;
optional EventSeriesProtobuf f30 = 30;
optional string tags = 31; // semi-colon delimited tags
optional uint64 f32 = 32;
optional bool f33 = 33;
optional uint32 lateJoinInMinutes = 34;
optional uint32 map_id = 35;
optional uint64 map_id = 35;
optional EventTimeTrialOptions f36 = 36;
optional string f37 = 37;
optional string f38 = 38;
optional uint32 f39 = 39;
optional MicroserviceEventData f40 = 40;
repeated uint32 f41 = 41;
}
message Events {
message Events { //real name: EventsProtobuf
repeated Event events = 1;
}
+42 -12
View File
@@ -14,19 +14,43 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65vents.proto\"\x9f\x05\n\x08\x43\x61tegory\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\n\n\x02\x66\x33\x18\x03 \x01(\t\x12\n\n\x02\x66\x35\x18\x05 \x01(\r\x12\n\n\x02\x66\x36\x18\x06 \x01(\r\x12\n\n\x02\x66\x37\x18\x07 \x01(\t\x12\x10\n\x08rules_id\x18\x08 \x01(\r\x12\x19\n\x11registrationStart\x18\t \x01(\x04\x12\x1b\n\x13registrationStartWT\x18\n \x01(\x04\x12\x17\n\x0fregistrationEnd\x18\x0b \x01(\x04\x12\x19\n\x11registrationEndWT\x18\x0c \x01(\x04\x12\x13\n\x0blineUpStart\x18\r \x01(\x04\x12\x15\n\rlineUpStartWT\x18\x0e \x01(\x04\x12\x11\n\tlineUpEnd\x18\x0f \x01(\x04\x12\x13\n\x0blineUpEndWT\x18\x10 \x01(\x04\x12\x1a\n\x12\x65ventSubgroupStart\x18\x11 \x01(\x04\x12\x1c\n\x14\x65ventSubgroupStartWT\x18\x12 \x01(\x04\x12\x0b\n\x03\x66\x32\x31\x18\x15 \x01(\r\x12\x10\n\x08route_id\x18\x16 \x02(\x04\x12\x0f\n\x07leaders\x18\x17 \x03(\r\x12\x0b\n\x03\x66\x32\x34\x18\x18 \x01(\x07\x12\x0c\n\x04laps\x18\x19 \x01(\r\x12\x15\n\rstartLocation\x18\x1d \x01(\r\x12\r\n\x05label\x18\x1e \x01(\r\x12\x0b\n\x03\x66\x33\x31\x18\x1f \x01(\r\x12\x0b\n\x03\x66\x33\x32\x18 \x01(\x07\x12\x0b\n\x03\x66\x33\x33\x18! \x01(\x07\x12\x10\n\x08\x64uration\x18\" \x01(\r\x12\x0b\n\x03\x66\x33\x36\x18$ \x01(\x04\x12\x0b\n\x03\x66\x33\x37\x18% \x01(\r\x12\r\n\x05\x61udio\x18\' \x01(\t\x12\x10\n\x08sweepers\x18) \x03(\r\x12\x0b\n\x03\x66\x34\x33\x18+ \x01(\t\x12\x0b\n\x03\x66\x34\x34\x18, \x01(\r\x12\x0c\n\x04tags\x18- \x01(\t\x12\x19\n\x11lateJoinInMinutes\x18. \x01(\r\x12\x0e\n\x06map_id\x18/ \x01(\r\"\xaf\x03\n\x05\x45vent\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x10\n\x08world_id\x18\x02 \x01(\r\x12\r\n\x05title\x18\x03 \x02(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x12\n\neventStart\x18\x05 \x01(\x04\x12\n\n\x02\x66\x37\x18\x07 \x01(\x07\x12\x0c\n\x04laps\x18\x08 \x01(\x04\x12\n\n\x02\x66\x39\x18\t \x01(\x04\x12\x1b\n\x08\x63\x61tegory\x18\n \x03(\x0b\x32\t.Category\x12\x0b\n\x03\x66\x31\x31\x18\x0b \x01(\t\x12\x0f\n\x07pic_url\x18\x0c \x01(\t\x12\x10\n\x08\x64uration\x18\r \x01(\r\x12\x10\n\x08route_id\x18\x0e \x01(\x04\x12\x10\n\x08rules_id\x18\x0f \x01(\x04\x12\x0b\n\x03\x66\x31\x36\x18\x10 \x01(\x04\x12\x0b\n\x03\x66\x31\x37\x18\x11 \x01(\x04\x12\x0b\n\x03\x66\x31\x38\x18\x12 \x01(\x04\x12\x0b\n\x03\x66\x31\x39\x18\x13 \x01(\t\x12\x0b\n\x03\x66\x32\x32\x18\x16 \x01(\r\x12\x0b\n\x03\x66\x32\x34\x18\x18 \x01(\r\x12\x0b\n\x03\x66\x32\x36\x18\x1a \x01(\t\x12\x0b\n\x03\x66\x32\x37\x18\x1b \x01(\r\x12\x0b\n\x03\x66\x32\x38\x18\x1c \x01(\r\x12\x0b\n\x03\x66\x32\x39\x18\x1d \x01(\r\x12\x0c\n\x04tags\x18\x1f \x01(\t\x12\x19\n\x11lateJoinInMinutes\x18\" \x01(\r\x12\x0e\n\x06map_id\x18# \x01(\r\" \n\x06\x45vents\x12\x16\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x06.Event')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65vents.proto\"\xba\x06\n\x15\x45ventSubgroupProtobuf\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\n\n\x02\x66\x33\x18\x03 \x01(\t\x12\n\n\x02\x66\x34\x18\x04 \x01(\r\x12\n\n\x02\x66\x35\x18\x05 \x01(\r\x12\n\n\x02\x66\x36\x18\x06 \x01(\r\x12\n\n\x02\x66\x37\x18\x07 \x01(\t\x12\x10\n\x08rules_id\x18\x08 \x01(\x04\x12\x19\n\x11registrationStart\x18\t \x01(\x04\x12\x1b\n\x13registrationStartWT\x18\n \x01(\x04\x12\x17\n\x0fregistrationEnd\x18\x0b \x01(\x04\x12\x19\n\x11registrationEndWT\x18\x0c \x01(\x04\x12\x13\n\x0blineUpStart\x18\r \x01(\x04\x12\x15\n\rlineUpStartWT\x18\x0e \x01(\x04\x12\x11\n\tlineUpEnd\x18\x0f \x01(\x04\x12\x13\n\x0blineUpEndWT\x18\x10 \x01(\x04\x12\x1a\n\x12\x65ventSubgroupStart\x18\x11 \x01(\x04\x12\x1c\n\x14\x65ventSubgroupStartWT\x18\x12 \x01(\x04\x12\x0b\n\x03\x66\x31\x39\x18\x13 \x01(\x04\x12\x0b\n\x03\x66\x32\x30\x18\x14 \x01(\x04\x12\x0b\n\x03\x66\x32\x31\x18\x15 \x01(\x08\x12\x10\n\x08route_id\x18\x16 \x02(\x04\x12\x0f\n\x07leaders\x18\x17 \x03(\x04\x12\x0b\n\x03\x66\x32\x34\x18\x18 \x01(\x07\x12\x0c\n\x04laps\x18\x19 \x01(\r\x12\x15\n\rstartLocation\x18\x1d \x01(\r\x12\r\n\x05label\x18\x1e \x01(\r\x12\x0b\n\x03\x66\x33\x31\x18\x1f \x01(\r\x12\x0b\n\x03\x66\x33\x32\x18 \x01(\x07\x12\x0b\n\x03\x66\x33\x33\x18! \x01(\x07\x12\x10\n\x08\x64uration\x18\" \x01(\r\x12\x0b\n\x03\x66\x33\x35\x18# \x01(\r\x12\x0b\n\x03\x66\x33\x36\x18$ \x01(\x04\x12\x0b\n\x03\x66\x33\x37\x18% \x01(\x08\x12\x0b\n\x03\x66\x33\x38\x18& \x01(\x04\x12\r\n\x05\x61udio\x18\' \x01(\t\x12\x0b\n\x03\x66\x34\x30\x18( \x01(\x04\x12\x10\n\x08sweepers\x18) \x03(\x04\x12\x0b\n\x03\x66\x34\x32\x18* \x01(\x04\x12\x0b\n\x03\x66\x34\x33\x18+ \x01(\t\x12\x0b\n\x03\x66\x34\x34\x18, \x01(\x08\x12\x0c\n\x04tags\x18- \x01(\t\x12\x19\n\x11lateJoinInMinutes\x18. \x01(\r\x12\x0e\n\x06map_id\x18/ \x01(\x04\x12\x0b\n\x03\x66\x34\x38\x18\x30 \x01(\r\x12\x0b\n\x03\x66\x34\x39\x18\x31 \x01(\t\x12\x0b\n\x03\x66\x35\x30\x18\x32 \x03(\x05\x12\x0b\n\x03\x66\x35\x31\x18\x33 \x01(\x08\";\n\x15MicroserviceEventData\x12\n\n\x02\x66\x31\x18\x01 \x01(\t\x12\n\n\x02\x66\x32\x18\x02 \x01(\t\x12\n\n\x02\x66\x33\x18\x03 \x01(\x04\"9\n\x13\x45ventSeriesProtobuf\x12\n\n\x02\x66\x31\x18\x01 \x01(\x04\x12\n\n\x02\x66\x32\x18\x02 \x01(\t\x12\n\n\x02\x66\x33\x18\x03 \x01(\t\"S\n\x15\x45ventTimeTrialOptions\x12\n\n\x02\x66\x31\x18\x01 \x01(\r\x12\n\n\x02\x66\x32\x18\x02 \x01(\r\x12\n\n\x02\x66\x33\x18\x03 \x01(\r\x12\n\n\x02\x66\x34\x18\x04 \x01(\r\x12\n\n\x02\x66\x35\x18\x05 \x01(\x04\"\xb7\x05\n\x05\x45vent\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x10\n\x08world_id\x18\x02 \x01(\r\x12\r\n\x05title\x18\x03 \x02(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x12\n\neventStart\x18\x05 \x01(\x04\x12\n\n\x02\x66\x36\x18\x06 \x01(\t\x12\n\n\x02\x66\x37\x18\x07 \x01(\x07\x12\x0c\n\x04laps\x18\x08 \x01(\r\x12\n\n\x02\x66\x39\x18\t \x01(\r\x12(\n\x08\x63\x61tegory\x18\n \x03(\x0b\x32\x16.EventSubgroupProtobuf\x12\x0b\n\x03\x66\x31\x31\x18\x0b \x01(\t\x12\x0f\n\x07pic_url\x18\x0c \x01(\t\x12\x10\n\x08\x64uration\x18\r \x01(\r\x12\x10\n\x08route_id\x18\x0e \x01(\x04\x12\x10\n\x08rules_id\x18\x0f \x01(\x04\x12\x0b\n\x03\x66\x31\x36\x18\x10 \x01(\r\x12\x0b\n\x03\x66\x31\x37\x18\x11 \x01(\x08\x12\x0b\n\x03\x66\x31\x38\x18\x12 \x01(\x04\x12\x0b\n\x03\x66\x31\x39\x18\x13 \x01(\t\x12\x0b\n\x03\x66\x32\x30\x18\x14 \x01(\t\x12\x0b\n\x03\x66\x32\x31\x18\x15 \x01(\t\x12\x0b\n\x03\x66\x32\x32\x18\x16 \x01(\r\x12\x0b\n\x03\x66\x32\x33\x18\x17 \x01(\x04\x12\x0b\n\x03\x66\x32\x34\x18\x18 \x01(\r\x12\x0b\n\x03\x66\x32\x35\x18\x19 \x01(\x04\x12\x0b\n\x03\x66\x32\x36\x18\x1a \x01(\t\x12\x0b\n\x03\x66\x32\x37\x18\x1b \x01(\r\x12\x0b\n\x03\x66\x32\x38\x18\x1c \x01(\x08\x12\x0b\n\x03\x66\x32\x39\x18\x1d \x01(\x08\x12!\n\x03\x66\x33\x30\x18\x1e \x01(\x0b\x32\x14.EventSeriesProtobuf\x12\x0c\n\x04tags\x18\x1f \x01(\t\x12\x0b\n\x03\x66\x33\x32\x18 \x01(\x04\x12\x0b\n\x03\x66\x33\x33\x18! \x01(\x08\x12\x19\n\x11lateJoinInMinutes\x18\" \x01(\r\x12\x0e\n\x06map_id\x18# \x01(\x04\x12#\n\x03\x66\x33\x36\x18$ \x01(\x0b\x32\x16.EventTimeTrialOptions\x12\x0b\n\x03\x66\x33\x37\x18% \x01(\t\x12\x0b\n\x03\x66\x33\x38\x18& \x01(\t\x12\x0b\n\x03\x66\x33\x39\x18\' \x01(\r\x12#\n\x03\x66\x34\x30\x18( \x01(\x0b\x32\x16.MicroserviceEventData\x12\x0b\n\x03\x66\x34\x31\x18) \x03(\r\" \n\x06\x45vents\x12\x16\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x06.Event')
_CATEGORY = DESCRIPTOR.message_types_by_name['Category']
_EVENTSUBGROUPPROTOBUF = DESCRIPTOR.message_types_by_name['EventSubgroupProtobuf']
_MICROSERVICEEVENTDATA = DESCRIPTOR.message_types_by_name['MicroserviceEventData']
_EVENTSERIESPROTOBUF = DESCRIPTOR.message_types_by_name['EventSeriesProtobuf']
_EVENTTIMETRIALOPTIONS = DESCRIPTOR.message_types_by_name['EventTimeTrialOptions']
_EVENT = DESCRIPTOR.message_types_by_name['Event']
_EVENTS = DESCRIPTOR.message_types_by_name['Events']
Category = _reflection.GeneratedProtocolMessageType('Category', (_message.Message,), {
'DESCRIPTOR' : _CATEGORY,
EventSubgroupProtobuf = _reflection.GeneratedProtocolMessageType('EventSubgroupProtobuf', (_message.Message,), {
'DESCRIPTOR' : _EVENTSUBGROUPPROTOBUF,
'__module__' : 'events_pb2'
# @@protoc_insertion_point(class_scope:Category)
# @@protoc_insertion_point(class_scope:EventSubgroupProtobuf)
})
_sym_db.RegisterMessage(Category)
_sym_db.RegisterMessage(EventSubgroupProtobuf)
MicroserviceEventData = _reflection.GeneratedProtocolMessageType('MicroserviceEventData', (_message.Message,), {
'DESCRIPTOR' : _MICROSERVICEEVENTDATA,
'__module__' : 'events_pb2'
# @@protoc_insertion_point(class_scope:MicroserviceEventData)
})
_sym_db.RegisterMessage(MicroserviceEventData)
EventSeriesProtobuf = _reflection.GeneratedProtocolMessageType('EventSeriesProtobuf', (_message.Message,), {
'DESCRIPTOR' : _EVENTSERIESPROTOBUF,
'__module__' : 'events_pb2'
# @@protoc_insertion_point(class_scope:EventSeriesProtobuf)
})
_sym_db.RegisterMessage(EventSeriesProtobuf)
EventTimeTrialOptions = _reflection.GeneratedProtocolMessageType('EventTimeTrialOptions', (_message.Message,), {
'DESCRIPTOR' : _EVENTTIMETRIALOPTIONS,
'__module__' : 'events_pb2'
# @@protoc_insertion_point(class_scope:EventTimeTrialOptions)
})
_sym_db.RegisterMessage(EventTimeTrialOptions)
Event = _reflection.GeneratedProtocolMessageType('Event', (_message.Message,), {
'DESCRIPTOR' : _EVENT,
@@ -45,10 +69,16 @@ _sym_db.RegisterMessage(Events)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_CATEGORY._serialized_start=17
_CATEGORY._serialized_end=688
_EVENT._serialized_start=691
_EVENT._serialized_end=1122
_EVENTS._serialized_start=1124
_EVENTS._serialized_end=1156
_EVENTSUBGROUPPROTOBUF._serialized_start=17
_EVENTSUBGROUPPROTOBUF._serialized_end=843
_MICROSERVICEEVENTDATA._serialized_start=845
_MICROSERVICEEVENTDATA._serialized_end=904
_EVENTSERIESPROTOBUF._serialized_start=906
_EVENTSERIESPROTOBUF._serialized_end=963
_EVENTTIMETRIALOPTIONS._serialized_start=965
_EVENTTIMETRIALOPTIONS._serialized_end=1048
_EVENT._serialized_start=1051
_EVENT._serialized_end=1746
_EVENTS._serialized_start=1748
_EVENTS._serialized_end=1780
# @@protoc_insertion_point(module_scope)
+2 -1
View File
@@ -2,7 +2,7 @@ syntax = "proto2";
message Goal {
optional uint64 id = 1;
optional uint64 player_id = 2;
optional uint32 f3 = 3; /* status or sport? */
optional uint32 f3 = 3; /* Q: status or sport? A: I see zwift::protobuf::Sport_IsValid */
optional string name = 4;
optional uint32 type = 5; /* 0=distance, 1=time */
optional uint32 periodicity = 6; /* 0=weekly, 1=monthly */
@@ -13,6 +13,7 @@ message Goal {
optional uint64 created_on = 11; /* in ms since epoch */
optional uint64 period_end_date = 12; /* "" */
optional uint64 f13 = 13; /* status or sport? */
//optional string f14 = 14;
}
message Goals {
+2 -2
View File
@@ -1,7 +1,7 @@
syntax = "proto2";
message HashSeed {
required uint64 seed1 = 1;
required uint64 seed2 = 2;
required uint32 seed1 = 1;
required uint32 seed2 = 2;
required uint64 expiryDate = 3;
}
+1 -1
View File
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10hash-seeds.proto\"<\n\x08HashSeed\x12\r\n\x05seed1\x18\x01 \x02(\x04\x12\r\n\x05seed2\x18\x02 \x02(\x04\x12\x12\n\nexpiryDate\x18\x03 \x02(\x04\"%\n\tHashSeeds\x12\x18\n\x05seeds\x18\x01 \x03(\x0b\x32\t.HashSeed')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10hash-seeds.proto\"<\n\x08HashSeed\x12\r\n\x05seed1\x18\x01 \x02(\r\x12\r\n\x05seed2\x18\x02 \x02(\r\x12\x12\n\nexpiryDate\x18\x03 \x02(\x04\"%\n\tHashSeeds\x12\x18\n\x05seeds\x18\x01 \x03(\x0b\x32\t.HashSeed')
+1 -1
View File
@@ -9,7 +9,7 @@ message TcpAddress {
message TcpConfig {
/* First server: the TCP telemetry server (34.218.60.145) */
repeated TcpAddress node = 1;
repeated TcpAddress nodes = 1;
}
message PartnersUrls {
+6 -6
View File
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16per-session-info.proto\">\n\nTcpAddress\x12\n\n\x02ip\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\n\n\x02\x66\x33\x18\x03 \x01(\x05\x12\n\n\x02\x66\x34\x18\x04 \x01(\x05\"&\n\tTcpConfig\x12\x19\n\x04node\x18\x01 \x03(\x0b\x32\x0b.TcpAddress\"A\n\x0cPartnersUrls\x12\x16\n\x0etodaysplan_url\x18\x01 \x01(\t\x12\x19\n\x11trainingpeaks_url\x18\x02 \x01(\t\"u\n\x0ePerSessionInfo\x12\x11\n\trelay_url\x18\x01 \x02(\t\x12\x1b\n\x04\x61pis\x18\x02 \x01(\x0b\x32\r.PartnersUrls\x12\x0c\n\x04time\x18\x03 \x01(\x04\x12\x19\n\x05nodes\x18\x04 \x01(\x0b\x32\n.TcpConfig\x12\n\n\x02\x66\x35\x18\x05 \x01(\x05')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16per-session-info.proto\">\n\nTcpAddress\x12\n\n\x02ip\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\n\n\x02\x66\x33\x18\x03 \x01(\x05\x12\n\n\x02\x66\x34\x18\x04 \x01(\x05\"\'\n\tTcpConfig\x12\x1a\n\x05nodes\x18\x01 \x03(\x0b\x32\x0b.TcpAddress\"A\n\x0cPartnersUrls\x12\x16\n\x0etodaysplan_url\x18\x01 \x01(\t\x12\x19\n\x11trainingpeaks_url\x18\x02 \x01(\t\"u\n\x0ePerSessionInfo\x12\x11\n\trelay_url\x18\x01 \x02(\t\x12\x1b\n\x04\x61pis\x18\x02 \x01(\x0b\x32\r.PartnersUrls\x12\x0c\n\x04time\x18\x03 \x01(\x04\x12\x19\n\x05nodes\x18\x04 \x01(\x0b\x32\n.TcpConfig\x12\n\n\x02\x66\x35\x18\x05 \x01(\x05')
@@ -56,9 +56,9 @@ if _descriptor._USE_C_DESCRIPTORS == False:
_TCPADDRESS._serialized_start=26
_TCPADDRESS._serialized_end=88
_TCPCONFIG._serialized_start=90
_TCPCONFIG._serialized_end=128
_PARTNERSURLS._serialized_start=130
_PARTNERSURLS._serialized_end=195
_PERSESSIONINFO._serialized_start=197
_PERSESSIONINFO._serialized_end=314
_TCPCONFIG._serialized_end=129
_PARTNERSURLS._serialized_start=131
_PARTNERSURLS._serialized_end=196
_PERSESSIONINFO._serialized_start=198
_PERSESSIONINFO._serialized_end=315
# @@protoc_insertion_point(module_scope)
+2 -3
View File
@@ -1,5 +1,5 @@
syntax = "proto2";
message PeriodicInfo {
message PeriodicInfo { // very similar to TcpAddress, did not found in ZwiftApp.exe yet
required string game_server_ip = 1;
optional uint32 f2 = 2;
optional uint32 f3 = 3;
@@ -8,7 +8,6 @@ message PeriodicInfo {
optional uint32 f6 = 6;
}
message PeriodicInfos {
message PeriodicInfos { // very similar to TcpConfig
repeated PeriodicInfo infos = 1;
}
+2 -2
View File
@@ -1,5 +1,5 @@
syntax = "proto2";
message SegmentResult {
message SegmentResult { //TODO: find original name
optional uint64 id = 1;
required uint64 player_id = 2;
optional uint32 f3 = 3;
@@ -22,7 +22,7 @@ message SegmentResult {
optional uint32 f20 = 20;
}
message SegmentResults {
message SegmentResults { //TODO: find original name
required uint32 world_id = 1;
required uint64 segment_id = 2;
optional uint64 event_subgroup_id = 3;
+5 -5
View File
@@ -1,23 +1,23 @@
syntax = "proto2";
message Variant {
message Variant { //TODO: find original name
required string name = 1;
optional uint32 value = 2;
repeated M3 f3 = 3;
}
message Variants {
message Variants { //TODO: find original name
repeated Variant variants = 1;
}
message M3 {
message M3 { //TODO: find original name
repeated M1 f1 = 1;
}
message M1 {
message M1 { //TODO: find original name
required string name = 1;
repeated M2 f2 = 2;
}
message M2 {
message M2 { //TODO: find original name
required uint32 f4 = 4;
}
+6 -2
View File
@@ -1,7 +1,11 @@
syntax = "proto2";
message ZFile {
message ZFile { // real name ZFileProto ?
required uint64 id = 1;
required string folder = 2;
required string filename = 3;
required uint64 timestamp = 4;
required uint64 timestamp = 4; // ZFileProto: uint64=5 and string=4...
}
message ZFilesProto {
repeated ZFile zfiles = 1;
}
+11 -1
View File
@@ -14,11 +14,12 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0czfiles.proto\"H\n\x05ZFile\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x0e\n\x06\x66older\x18\x02 \x02(\t\x12\x10\n\x08\x66ilename\x18\x03 \x02(\t\x12\x11\n\ttimestamp\x18\x04 \x02(\x04')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0czfiles.proto\"H\n\x05ZFile\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x0e\n\x06\x66older\x18\x02 \x02(\t\x12\x10\n\x08\x66ilename\x18\x03 \x02(\t\x12\x11\n\ttimestamp\x18\x04 \x02(\x04\"%\n\x0bZFilesProto\x12\x16\n\x06zfiles\x18\x01 \x03(\x0b\x32\x06.ZFile')
_ZFILE = DESCRIPTOR.message_types_by_name['ZFile']
_ZFILESPROTO = DESCRIPTOR.message_types_by_name['ZFilesProto']
ZFile = _reflection.GeneratedProtocolMessageType('ZFile', (_message.Message,), {
'DESCRIPTOR' : _ZFILE,
'__module__' : 'zfiles_pb2'
@@ -26,9 +27,18 @@ ZFile = _reflection.GeneratedProtocolMessageType('ZFile', (_message.Message,), {
})
_sym_db.RegisterMessage(ZFile)
ZFilesProto = _reflection.GeneratedProtocolMessageType('ZFilesProto', (_message.Message,), {
'DESCRIPTOR' : _ZFILESPROTO,
'__module__' : 'zfiles_pb2'
# @@protoc_insertion_point(class_scope:ZFilesProto)
})
_sym_db.RegisterMessage(ZFilesProto)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_ZFILE._serialized_start=16
_ZFILE._serialized_end=88
_ZFILESPROTO._serialized_start=90
_ZFILESPROTO._serialized_end=127
# @@protoc_insertion_point(module_scope)
+6 -6
View File
@@ -940,7 +940,7 @@ def api_users_login():
response.info.apis.todaysplan_url = "https://whats.todaysplan.com.au"
response.info.apis.trainingpeaks_url = "https://api.trainingpeaks.com"
response.info.time = int(get_utc_time())
udp_node = response.info.nodes.node.add()
udp_node = response.info.nodes.nodes.add()
if request.remote_addr == '127.0.0.1': # to avoid needing hairpinning
udp_node.ip = "127.0.0.1"
else:
@@ -1803,13 +1803,13 @@ def api_profiles_goals_id(player_id, goal_id):
@app.route('/api/tcp-config', methods=['GET'])
@app.route('/relay/tcp-config', methods=['GET'])
def api_tcp_config():
infos = periodic_info_pb2.PeriodicInfos()
info = infos.infos.add()
infos = per_session_info_pb2.TcpConfig()
info = infos.nodes.add()
if request.remote_addr == '127.0.0.1': # to avoid needing hairpinning
info.game_server_ip = "127.0.0.1"
info.ip = "127.0.0.1"
else:
info.game_server_ip = server_ip
info.f2 = 3023
info.ip = server_ip
info.port = 3023
return infos.SerializeToString(), 200