activity.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. syntax = "proto2";
  2. import "profile.proto"; //enum ActivityPrivacyType, Sport
  3. //All decompiled. TODO: uncomment all new fields and use in algo
  4. enum NotableMomentTypeZCA {
  5. NMTC_ACHIEVEMENT_UNLOCKED = 1;
  6. NMTC_UNLOCKED_ITEM = 2;
  7. NMTC_MISSION_COMPLETED = 3;
  8. NMTC_FINISHED_CHALLENGE = 4;
  9. NMTC_TOOK_ARCH_JERSEY = 5;
  10. NMTC_NEW_PR = 6;
  11. NMTC_MET_DAILY_TARGET = 7;
  12. NMTC_GAINED_LEVEL = 8;
  13. NMTC_COMPLETED_GOAL = 9;
  14. NMTC_FINISHED_EVENT = 10;
  15. NMTC_FINISHED_WORKOUT = 11;
  16. NMTC_RIDE_ON = 12;
  17. NMTC_TRAINING_PLAN_COMPLETED = 13;
  18. }
  19. enum NotableMomentTypeZG_idx {
  20. NMTI_UNKNOWN = 0;
  21. NMTI_NEW_PR = 1;
  22. NMTI_GAINED_LEVEL = 2;
  23. NMTI_TRAINING_PLAN_COMPLETE = 3;
  24. NMTI_UNLOCKED_ITEM = 4;
  25. NMTI_ACHIEVEMENT_UNLOCKED = 5;
  26. NMTI_MISSION_COMPLETED = 6;
  27. NMTI_COMPLETED_GOAL = 7;
  28. NMTI_MET_DAILY_TARGET = 8;
  29. NMTI_TOOK_ARCH_JERSEY = 9;
  30. NMTI_FINISHED_CHALLENGE = 10;
  31. NMTI_FINISHED_EVENT = 11;
  32. NMTI_FINISHED_WORKOUT = 12;
  33. NMTI_ACTIVITY_BESTS = 13;
  34. NMTI_RIDEON = 14;
  35. NMTI_RIDEON_INT = 15; //international
  36. NMTI_QUIT_EVENT = 16;
  37. NMTI_USED_POWERUP = 17;
  38. NMTI_PASSED_TIMING_ARCH = 18;
  39. NMTI_CREATED_GOAL = 19;
  40. NMTI_JOINED_EVENT = 20;
  41. NMTI_STARTED_WORKOUT = 21;
  42. NMTI_STARTED_MISSION = 22;
  43. NMTI_HOLIDAY_EVENT_COMPLETE = 23;
  44. }
  45. enum NotableMomentTypeZG {
  46. NMT_NEW_PR = 0;
  47. NMT_GAINED_LEVEL = 5;
  48. NMT_TRAINING_PLAN_COMPLETE = 19;
  49. NMT_UNLOCKED_ITEM = 4;
  50. NMT_ACHIEVEMENT_UNLOCKED = 2;
  51. NMT_MISSION_COMPLETED = 3;
  52. NMT_COMPLETED_GOAL = 10;
  53. NMT_MET_DAILY_TARGET = 1;
  54. NMT_TOOK_ARCH_JERSEY = 8;
  55. NMT_FINISHED_CHALLENGE = 17;
  56. NMT_FINISHED_EVENT = 13;
  57. NMT_FINISHED_WORKOUT = 15;
  58. NMT_ACTIVITY_BESTS = 20;
  59. NMT_RIDEON = 18;
  60. NMT_RIDEON_INT = 22; //international
  61. NMT_QUIT_EVENT = 12;
  62. NMT_USED_POWERUP = 6;
  63. NMT_PASSED_TIMING_ARCH = 7;
  64. NMT_CREATED_GOAL = 9;
  65. NMT_JOINED_EVENT = 11;
  66. NMT_STARTED_WORKOUT = 14;
  67. NMT_STARTED_MISSION = 16;
  68. NMT_HOLIDAY_EVENT_COMPLETE = 21;
  69. }
  70. message NotableMoment { //.2,.3,.4 meanings inside last_activity.bin - not type, priority, incidentTime (i.e. 1595, 8, 9)
  71. optional uint64 activity_id = 1;
  72. optional NotableMomentTypeZG type = 2;
  73. optional uint32 priority = 3;
  74. optional uint64 incidentTime = 4;
  75. optional string aux1 = 5; // examples: {"achievementId":35,"name":"PAIRED","description":"Paired a phone through Zwift Companion"}
  76. // {"segmentName":"Marina Sprint","jerseyHash":"0x997d9df7","durationInMS":30524} (from last_activity.bin)
  77. optional string aux2 = 6; // empty string
  78. optional string largeImageUrl = 7;
  79. }
  80. message SocialInteraction {
  81. optional uint64 player_id = 1;
  82. optional uint32 timeDuration = 2;
  83. optional float proximityTimeScore = 3;
  84. optional string si_f4 = 4;
  85. }
  86. message ClubAttribution {
  87. optional string name = 1;
  88. optional float value = 2;
  89. }
  90. enum ProfileFollowStatus {
  91. PFS_UNKNOWN = 1;
  92. PFS_REQUESTS_TO_FOLLOW = 2;
  93. PFS_IS_FOLLOWING = 3;
  94. PFS_IS_BLOCKED = 4;
  95. PFS_NO_RELATIONSHIP = 5;
  96. PFS_SELF = 6;
  97. PFS_HAS_BEEN_DECLINED = 7;
  98. }
  99. enum FitnessPrivacy {
  100. UNSET = 0;
  101. HIDE_SENSITIVE_DATA = 1;
  102. SAME_AS_ACTIVITY = 2;
  103. }
  104. message Activity { //where is primaryImageUrl, feedImageThumbnailUrl, activityRideOnCount, activityCommentCount, eventId, rideOnGiven
  105. optional uint64 id = 1;
  106. required uint64 player_id = 2;
  107. required uint64 course_id = 3;
  108. required string name = 4;
  109. optional string f5 = 5;
  110. optional bool privateActivity = 6;
  111. required string start_date = 7;
  112. optional string end_date = 8;
  113. optional float distanceInMeters = 9;
  114. optional float avg_heart_rate = 10;
  115. optional float max_heart_rate = 11;
  116. optional float avg_watts = 12;
  117. optional float max_watts = 13;
  118. optional float avg_cadence = 14;
  119. optional float max_cadence = 15;
  120. optional float avg_speed = 16; // in m/s
  121. optional float max_speed = 17; // in m/s
  122. optional float calories = 18;
  123. optional float total_elevation = 19;
  124. optional uint32 strava_upload_id = 20; //uint64 stored as int32
  125. optional uint32 strava_activity_id = 21; //uint64 stored as int32
  126. optional string f22 = 22;
  127. optional uint32 f23 = 23; //empty; stored as int32; enum up to 5 - ProfileFollowStatus?
  128. optional bytes fit = 24;
  129. optional string fit_filename = 25;
  130. optional uint64 subgroupId = 26;
  131. optional uint64 workoutHash = 27;
  132. optional float progressPercentage = 28;
  133. optional Sport sport = 29;
  134. //repeated string act_f30 = 30;
  135. optional string date = 31;
  136. optional float act_f32 = 32;
  137. optional string act_f33 = 33;
  138. optional string act_f34 = 34;
  139. //repeated NotableMoment notables = 35;
  140. //repeated SocialInteraction socials = 36;
  141. optional ActivityPrivacyType privacy = 37;
  142. optional FitnessPrivacy fitness_privacy = 38;
  143. optional string club_name = 39;
  144. optional int64 movingTimeInMs = 40;
  145. //repeated ClubAttribution cas = 41;
  146. }
  147. message ActivityList {
  148. repeated Activity activities = 1;
  149. }
  150. message ActivityImage {
  151. required uint64 activity_id = 2;
  152. required bytes jpg = 3;
  153. }