events.proto 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. syntax = "proto2";
  2. import "profile.proto"; //enums PlayerType and Sport
  3. message InvitedProfileProto {
  4. required uint64 player_id = 1;
  5. optional string firstName = 2;
  6. optional string lastName = 3;
  7. optional string imageSrc = 4;
  8. optional bool enrolledZwiftAcademy = 5;
  9. optional bool male = 6;
  10. optional PlayerType player_type = 7;
  11. optional EventCategory event_category = 8;
  12. }
  13. enum EventInviteStatus {
  14. PENDING = 0;
  15. ACCEPTED = 1;
  16. REJECTED = 2;
  17. }
  18. message EventInviteProto {
  19. optional InvitedProfileProto profile = 1;
  20. required EventInviteStatus status = 2;
  21. }
  22. message PrivateEventFeedProto {
  23. required uint64 event_id = 1; //read in PrivateEventsManagerV2::RegisterPrivateEvent
  24. optional Sport sport = 2;
  25. optional uint64 eventSubgroupStart = 3; //IsPrivateEventExpired: return ZNETWORK_GetNetworkSyncedTimeGMT() > a1->m_eventSubgroupStart / 1000uLL + 1800
  26. optional uint64 route_id = 4;
  27. optional uint32 durationInSeconds = 5;
  28. optional float distanceInMeters = 6;
  29. optional uint64 answeredCount = 7; //stored as int32
  30. optional uint32 invitedTotalCount = 8;
  31. optional uint32 acceptedFolloweeCount = 9;
  32. optional uint32 acceptedTotalCount = 10;
  33. optional string organizerImageUrl = 11;
  34. optional uint64 organizerProfileId = 12;
  35. optional string organizerFirstName = 13;
  36. optional string organizerLastName = 14;
  37. optional uint64 updateDate = 15;
  38. optional uint64 subgroupId = 16;
  39. optional uint32 laps = 17;
  40. optional bool rubberbanding = 18; //keep together "rulesId": "1024"
  41. }
  42. message PrivateEventFeedListProto {
  43. repeated PrivateEventFeedProto pef = 1;
  44. }
  45. message PlayerJoinedEvent {
  46. required uint64 rel_id = 1; //subgroup id
  47. optional uint64 player_id = 2;
  48. optional uint64 pje_f3 = 3;
  49. }
  50. message PlayerLeftEvent {
  51. required uint64 rel_id = 1; //event id
  52. optional uint64 player_id = 2;
  53. optional uint64 ple_f3 = 3;
  54. }
  55. message EventSubgroupProtobuf { //where is fieldLimit, signedUp, signupStatus, registered, registrationStatus, followeeEntrantCount
  56. //totalEntrantCount, followeeSignedUpCount, totalSignedUpCount, followeeJoinedCount, totalJoinedCount, rulesSet, workoutHash, overrideMapPreferences
  57. //qualificationRuleIds, accessValidationResult
  58. required uint64 id = 1; // 2395269
  59. optional string name = 2; // ex: "3R True2 Steady Ride [2.0w/kg avg] (C)"
  60. optional string description = 3; // ex: "Welcome to our sociable early morning/evening social group ride."
  61. optional uint32 evs_f4 = 4; // ""
  62. optional uint32 evs_f5 = 5; // 154 and others
  63. optional uint32 evs_f6 = 6; // 0
  64. optional string scode = 7; // ex: "PT3600S"
  65. optional uint64 rules_id = 8; // 320 and others
  66. optional uint64 registrationStart = 9;
  67. optional uint64 registrationStartWT = 10;
  68. optional uint64 registrationEnd = 11;
  69. optional uint64 registrationEndWT = 12;
  70. optional uint64 lineUpStart = 13;
  71. optional uint64 lineUpStartWT = 14;
  72. optional uint64 lineUpEnd = 15;
  73. optional uint64 lineUpEndWT = 16;
  74. optional uint64 eventSubgroupStart = 17;
  75. optional uint64 eventSubgroupStartWT = 18;
  76. optional uint64 evs_f19 = 19;
  77. optional uint64 evs_f20 = 20; //tag416
  78. optional bool evs_f21 = 21; // false, tag424
  79. required uint64 route_id = 22; // 3366225080
  80. repeated uint64 invitedLeaders = 23; // tag440
  81. optional float distanceInMeters = 24; // tag453
  82. optional uint32 laps = 25; // tag456
  83. // no 26-28
  84. optional uint64 startLocation = 29; // 13, tag488 [>=6 -> 'bad start location'] valid values: 1..5 (0->1)
  85. optional uint32 label = 30; // A:1, B:2, C:3, D:4, E:5 etc, tag496
  86. optional uint32 paceType = 31; // 1 almost everywhere, 2 sometimes; tag504
  87. optional float fromPaceValue = 32; // tag645
  88. optional float toPaceValue = 33; // tag653
  89. optional uint32 durationInSeconds = 34; // Duration of event in seconds, tag656
  90. optional uint32 evs_f35 = 35; // tag664
  91. optional uint64 jerseyHash = 36; // 493134166, tag672
  92. optional bool evs_f37 = 37; // 0, tag680
  93. optional uint32 evs_f38 = 38; // tag688
  94. optional string auxiliaryUrl = 39; // "https://cdn.zwift.com/AudioBroadcasts/wbrgrouprideaudiov4", tag698
  95. optional uint64 bikeHash = 40; // 4208139356, tag704
  96. repeated uint64 invitedSweepers = 41; // tag712
  97. optional uint64 evs_f42 = 42; // tag720
  98. optional string customUrl = 43; // https://cdn.zwift.com/events/upload/workouts/CafeRide1.zwo, tag730
  99. optional bool evs_f44 = 44; // false, tag736
  100. optional string tags = 45; // tag746, semi-colon delimited tags eg: "fenced;3r;created_ryan;communityevent;no_kick_mode;timestamp=1603911177622"
  101. optional uint32 lateJoinInMinutes = 46; //tag752
  102. optional uint64 course_id = 47; // tag760
  103. optional uint64 evs_f48 = 48; //tag898
  104. optional string routeUrl = 49; //tag906
  105. repeated int32 evs_f50 = 50; //tag912
  106. optional bool evs_f51 = 51; //tag920
  107. }
  108. enum EventVisibility {
  109. EV_NULL = 0;
  110. EV_PUB_SHARE = 1; // event public shareable
  111. EV_BY_RESOURCE = 2; // event defined by resource
  112. EV_SHAREABLE = 3;
  113. }
  114. message MicroserviceEventData {
  115. optional string name = 1; // "clubs" everywhere (json: microserviceName)
  116. optional bytes externalResourceId = 2; // different 16-byte bb4538bfd13346c99a4df2b3cc3b5d95 (json: microserviceExternalResourceId)
  117. optional EventVisibility visibility = 3; // enum 1 (json: microserviceEventVisibility)
  118. }
  119. message EventSeriesProtobuf { //{"id":4531,"name":"Zwift Academy Triathlon - Baseline TT","description":null,"imported":false}
  120. optional uint64 id = 1; //5445 or 1485
  121. optional string name = 2; //INEOSVTC or "Fast Friday"
  122. optional string description = 3; //"" or "Congratulations, you crushed another week of workouts! ..."
  123. }
  124. message EventTimeTrialOptions { //{"timeGapBetweenRowsMs":15000,"maxRows":50,"maxRidersPerRow":10}
  125. optional uint32 timeGapBetweenRowsMs = 1; //15000 everywhere
  126. optional uint32 maxRows = 2; //50 or 25
  127. optional uint32 maxRidersPerRow = 3; //10 everywhere
  128. optional uint32 evt_f4 = 4;
  129. optional uint64 evt_f5 = 5;
  130. }
  131. enum EventTypeV2 {
  132. EVENT_TYPE_UNKNOWN = 0;
  133. EVENT_TYPE_EFONDO = 1;
  134. EVENT_TYPE_RACE = 2;
  135. EVENT_TYPE_GROUP_RIDE = 3;
  136. EVENT_TYPE_GROUP_WORKOUT = 4;
  137. EVENT_TYPE_TIME_TRIAL = 5;
  138. }
  139. enum EventType {
  140. ET_UNKNOWN = 0;
  141. EFONDO = 1;
  142. RACE = 2;
  143. GROUP_RIDE = 3;
  144. GROUP_WORKOUT = 4;
  145. TIME_TRIAL = 5;
  146. }
  147. enum EventCulling {
  148. CULLING_UNDEFINED = 0;
  149. CULLING_EVERYBODY = 1;
  150. CULLING_EVENT_ONLY = 2;
  151. CULLING_SUBGROUP_ONLY = 3;
  152. }
  153. enum EventCategory {
  154. EC_FEMALE = 0;
  155. EC_MALE = 1;
  156. EC_BINARY = 2;
  157. }
  158. message Event { //real name: EventProtobuf; where is shortName, shortDescription, rulesSet, routeUrl, bikeHash,
  159. //privateEvent, followeeEntrantCount, totalEntrantCount, followeeSignedUpCount, totalSignedUpCount, followeeJoinedCount,
  160. //totalJoinedCount, auxiliaryUrl, imageS3Name, imageS3Bucket, cullingType, recurring, recurringOffset, publishRecurring, parentId, type, workoutHash,
  161. //customUrl, restricted, unlisted, eventSecret, accessExpression, qualificationRuleIds, minGameVersion, recordable, imported, eventTemplateId
  162. required uint64 id = 1;
  163. optional uint64 server_realm = 2;
  164. required string name = 3;
  165. optional string description = 4;
  166. optional uint64 eventStart = 5; // Start time (epoch time in ms)
  167. optional string e_f6 = 6;
  168. optional float distanceInMeters = 7;
  169. optional uint32 laps = 8;
  170. optional uint32 e_f9 = 9;
  171. repeated EventSubgroupProtobuf category = 10; //event_subgroup_size() <= MAX_SUBGROUPS(6)
  172. optional string e_f11 = 11;
  173. optional string imageUrl = 12;
  174. optional uint32 durationInSeconds = 13;
  175. optional uint64 route_id = 14;
  176. optional uint64 rules_id = 15;
  177. optional uint32 e_f16 = 16;
  178. optional bool visible = 17;
  179. optional uint64 jerseyHash = 18;
  180. optional string e_f19 = 19;
  181. optional string e_f20 = 20;
  182. optional string e_f21 = 21;
  183. optional Sport sport = 22;
  184. optional uint64 e_f23 = 23;
  185. optional EventType eventType = 24;
  186. optional uint64 e_f25 = 25;
  187. optional string e_f26 = 26;
  188. optional uint64 e_f27 = 27; //<=4, ENUM? saw = 2
  189. optional bool overrideMapPreferences = 28;
  190. optional bool invisibleToNonParticipants = 29;
  191. optional EventSeriesProtobuf evSeries = 30;
  192. optional string tags = 31; // semi-colon delimited tags
  193. optional uint64 e_f32 = 32;
  194. optional bool e_wtrl = 33; //WTRL (World Tactical Racing Leagues)
  195. optional uint32 lateJoinInMinutes = 34;
  196. optional uint64 course_id = 35;
  197. optional EventTimeTrialOptions tto = 36;
  198. optional string e_f37 = 37;
  199. optional string e_f38 = 38;
  200. optional uint32 e_f39 = 39;
  201. optional MicroserviceEventData msed = 40;
  202. repeated uint32 e_f41 = 41;
  203. }
  204. message Events { //real name: EventsProtobuf
  205. repeated Event events = 1;
  206. }
  207. message PrivateEventProto {
  208. required uint64 id = 1;
  209. optional Sport sport = 2;
  210. optional uint64 eventStart = 3;
  211. optional uint64 routeId = 4;
  212. optional uint64 startLocation = 5;
  213. optional uint32 durationInSeconds = 6;
  214. optional float distanceInMeters = 7;
  215. optional string description = 8;
  216. optional uint64 workoutHash = 9; //or laps
  217. optional uint64 organizerId = 10;
  218. repeated EventInviteProto eventInvites = 11;
  219. optional bool showResults = 12;
  220. optional uint32 laps = 13; //or workoutHash
  221. optional bool rubberbanding = 14;
  222. }
  223. message LateJoinInformation {
  224. optional uint64 road_id = 1;
  225. optional float road_time = 2;
  226. optional bool is_forward = 3;
  227. optional int64 organizerId = 4; // leader of meetup or -1
  228. optional uint32 lj_f5 = 5; //64 on wire
  229. optional uint32 lj_f6 = 6; //64 on wire
  230. optional uint32 lj_f7 = 7; //64 on wire
  231. }