@nativesquare/soma 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/dist/client/index.d.ts +7 -128
  2. package/dist/client/index.d.ts.map +1 -1
  3. package/dist/client/index.js +31 -112
  4. package/dist/client/index.js.map +1 -1
  5. package/dist/component/_generated/api.d.ts +80 -4
  6. package/dist/component/_generated/api.d.ts.map +1 -1
  7. package/dist/component/_generated/api.js.map +1 -1
  8. package/dist/component/_generated/component.d.ts +135 -261
  9. package/dist/component/_generated/component.d.ts.map +1 -1
  10. package/dist/component/garmin/private.d.ts +475 -0
  11. package/dist/component/garmin/private.d.ts.map +1 -0
  12. package/dist/component/garmin/private.js +1614 -0
  13. package/dist/component/garmin/private.js.map +1 -0
  14. package/dist/component/garmin/public.d.ts +155 -0
  15. package/dist/component/garmin/public.d.ts.map +1 -0
  16. package/dist/component/garmin/public.js +787 -0
  17. package/dist/component/garmin/public.js.map +1 -0
  18. package/dist/component/garmin/schemas/activity.d.ts +94 -0
  19. package/dist/component/garmin/schemas/activity.d.ts.map +1 -0
  20. package/dist/component/garmin/schemas/activity.js +27 -0
  21. package/dist/component/garmin/schemas/activity.js.map +1 -0
  22. package/dist/component/garmin/schemas/activityDetails.d.ts +146 -0
  23. package/dist/component/garmin/schemas/activityDetails.d.ts.map +1 -0
  24. package/dist/component/garmin/schemas/activityDetails.js +27 -0
  25. package/dist/component/garmin/schemas/activityDetails.js.map +1 -0
  26. package/dist/component/garmin/schemas/bloodPressure.d.ts +38 -0
  27. package/dist/component/garmin/schemas/bloodPressure.d.ts.map +1 -0
  28. package/dist/component/garmin/schemas/bloodPressure.js +27 -0
  29. package/dist/component/garmin/schemas/bloodPressure.js.map +1 -0
  30. package/dist/component/garmin/schemas/bodyCompositions.d.ts +42 -0
  31. package/dist/component/garmin/schemas/bodyCompositions.d.ts.map +1 -0
  32. package/dist/component/garmin/schemas/bodyCompositions.js +27 -0
  33. package/dist/component/garmin/schemas/bodyCompositions.js.map +1 -0
  34. package/dist/component/garmin/schemas/dailies.d.ts +98 -0
  35. package/dist/component/garmin/schemas/dailies.d.ts.map +1 -0
  36. package/dist/component/garmin/schemas/dailies.js +27 -0
  37. package/dist/component/garmin/schemas/dailies.js.map +1 -0
  38. package/dist/component/garmin/schemas/epochs.d.ts +54 -0
  39. package/dist/component/garmin/schemas/epochs.d.ts.map +1 -0
  40. package/dist/component/garmin/schemas/epochs.js +27 -0
  41. package/dist/component/garmin/schemas/epochs.js.map +1 -0
  42. package/dist/component/garmin/schemas/healthSnapshot.d.ts +48 -0
  43. package/dist/component/garmin/schemas/healthSnapshot.d.ts.map +1 -0
  44. package/dist/component/garmin/schemas/healthSnapshot.js +27 -0
  45. package/dist/component/garmin/schemas/healthSnapshot.js.map +1 -0
  46. package/dist/component/garmin/schemas/hrvSummary.d.ts +40 -0
  47. package/dist/component/garmin/schemas/hrvSummary.d.ts.map +1 -0
  48. package/dist/component/garmin/schemas/hrvSummary.js +27 -0
  49. package/dist/component/garmin/schemas/hrvSummary.js.map +1 -0
  50. package/dist/component/garmin/schemas/manuallyUpdatedActivities.d.ts +94 -0
  51. package/dist/component/garmin/schemas/manuallyUpdatedActivities.d.ts.map +1 -0
  52. package/dist/component/garmin/schemas/manuallyUpdatedActivities.js +27 -0
  53. package/dist/component/garmin/schemas/manuallyUpdatedActivities.js.map +1 -0
  54. package/dist/component/garmin/schemas/menstrualCycleTracking.d.ts +100 -0
  55. package/dist/component/garmin/schemas/menstrualCycleTracking.d.ts.map +1 -0
  56. package/dist/component/garmin/schemas/menstrualCycleTracking.js +28 -0
  57. package/dist/component/garmin/schemas/menstrualCycleTracking.js.map +1 -0
  58. package/dist/component/garmin/schemas/moveIQ.d.ts +40 -0
  59. package/dist/component/garmin/schemas/moveIQ.d.ts.map +1 -0
  60. package/dist/component/garmin/schemas/moveIQ.js +27 -0
  61. package/dist/component/garmin/schemas/moveIQ.js.map +1 -0
  62. package/dist/component/garmin/schemas/pulseOx.d.ts +38 -0
  63. package/dist/component/garmin/schemas/pulseOx.d.ts.map +1 -0
  64. package/dist/component/garmin/schemas/pulseOx.js +28 -0
  65. package/dist/component/garmin/schemas/pulseOx.js.map +1 -0
  66. package/dist/component/garmin/schemas/respiration.d.ts +34 -0
  67. package/dist/component/garmin/schemas/respiration.d.ts.map +1 -0
  68. package/dist/component/garmin/schemas/respiration.js +28 -0
  69. package/dist/component/garmin/schemas/respiration.js.map +1 -0
  70. package/dist/component/garmin/schemas/skinTemperature.d.ts +36 -0
  71. package/dist/component/garmin/schemas/skinTemperature.d.ts.map +1 -0
  72. package/dist/component/garmin/schemas/skinTemperature.js +28 -0
  73. package/dist/component/garmin/schemas/skinTemperature.js.map +1 -0
  74. package/dist/component/garmin/schemas/sleeps.d.ts +88 -0
  75. package/dist/component/garmin/schemas/sleeps.d.ts.map +1 -0
  76. package/dist/component/garmin/schemas/sleeps.js +27 -0
  77. package/dist/component/garmin/schemas/sleeps.js.map +1 -0
  78. package/dist/component/garmin/schemas/stress.d.ts +70 -0
  79. package/dist/component/garmin/schemas/stress.d.ts.map +1 -0
  80. package/dist/component/garmin/schemas/stress.js +28 -0
  81. package/dist/component/garmin/schemas/stress.js.map +1 -0
  82. package/dist/component/garmin/schemas/userMetrics.d.ts +36 -0
  83. package/dist/component/garmin/schemas/userMetrics.d.ts.map +1 -0
  84. package/dist/component/garmin/schemas/userMetrics.js +28 -0
  85. package/dist/component/garmin/schemas/userMetrics.js.map +1 -0
  86. package/dist/component/garmin/transform/activity.d.ts +13 -0
  87. package/dist/component/garmin/transform/activity.d.ts.map +1 -0
  88. package/dist/component/garmin/transform/activity.js +111 -0
  89. package/dist/component/garmin/transform/activity.js.map +1 -0
  90. package/dist/component/garmin/transform/activityDetails.d.ts +13 -0
  91. package/dist/component/garmin/transform/activityDetails.d.ts.map +1 -0
  92. package/dist/component/garmin/transform/activityDetails.js +173 -0
  93. package/dist/component/garmin/transform/activityDetails.js.map +1 -0
  94. package/dist/component/garmin/transform/bloodPressure.d.ts +12 -0
  95. package/dist/component/garmin/transform/bloodPressure.d.ts.map +1 -0
  96. package/dist/component/garmin/transform/bloodPressure.js +33 -0
  97. package/dist/component/garmin/transform/bloodPressure.js.map +1 -0
  98. package/dist/component/garmin/transform/bodyCompositions.d.ts +12 -0
  99. package/dist/component/garmin/transform/bodyCompositions.d.ts.map +1 -0
  100. package/dist/component/garmin/transform/bodyCompositions.js +42 -0
  101. package/dist/component/garmin/transform/bodyCompositions.js.map +1 -0
  102. package/dist/component/garmin/transform/dailies.d.ts +12 -0
  103. package/dist/component/garmin/transform/dailies.d.ts.map +1 -0
  104. package/dist/component/garmin/transform/dailies.js +132 -0
  105. package/dist/component/garmin/transform/dailies.js.map +1 -0
  106. package/dist/component/garmin/transform/epochs.d.ts +13 -0
  107. package/dist/component/garmin/transform/epochs.d.ts.map +1 -0
  108. package/dist/component/garmin/transform/epochs.js +76 -0
  109. package/dist/component/garmin/transform/epochs.js.map +1 -0
  110. package/dist/component/garmin/transform/healthSnapshot.d.ts +12 -0
  111. package/dist/component/garmin/transform/healthSnapshot.d.ts.map +1 -0
  112. package/dist/component/garmin/transform/healthSnapshot.js +111 -0
  113. package/dist/component/garmin/transform/healthSnapshot.js.map +1 -0
  114. package/dist/component/garmin/transform/hrvSummary.d.ts +12 -0
  115. package/dist/component/garmin/transform/hrvSummary.d.ts.map +1 -0
  116. package/dist/component/garmin/transform/hrvSummary.js +45 -0
  117. package/dist/component/garmin/transform/hrvSummary.js.map +1 -0
  118. package/dist/component/garmin/transform/manuallyUpdatedActivities.d.ts +11 -0
  119. package/dist/component/garmin/transform/manuallyUpdatedActivities.d.ts.map +1 -0
  120. package/dist/component/garmin/transform/manuallyUpdatedActivities.js +20 -0
  121. package/dist/component/garmin/transform/manuallyUpdatedActivities.js.map +1 -0
  122. package/dist/component/garmin/transform/menstrualCycleTracking.d.ts +10 -0
  123. package/dist/component/garmin/transform/menstrualCycleTracking.d.ts.map +1 -0
  124. package/dist/component/garmin/transform/menstrualCycleTracking.js +43 -0
  125. package/dist/component/garmin/transform/menstrualCycleTracking.js.map +1 -0
  126. package/dist/component/garmin/transform/moveIQ.d.ts +17 -0
  127. package/dist/component/garmin/transform/moveIQ.d.ts.map +1 -0
  128. package/dist/component/garmin/transform/moveIQ.js +41 -0
  129. package/dist/component/garmin/transform/moveIQ.js.map +1 -0
  130. package/dist/component/garmin/transform/pulseOx.d.ts +12 -0
  131. package/dist/component/garmin/transform/pulseOx.d.ts.map +1 -0
  132. package/dist/component/garmin/transform/pulseOx.js +46 -0
  133. package/dist/component/garmin/transform/pulseOx.js.map +1 -0
  134. package/dist/component/garmin/transform/respiration.d.ts +12 -0
  135. package/dist/component/garmin/transform/respiration.d.ts.map +1 -0
  136. package/dist/component/garmin/transform/respiration.js +54 -0
  137. package/dist/component/garmin/transform/respiration.js.map +1 -0
  138. package/dist/component/garmin/transform/skinTemperature.d.ts +12 -0
  139. package/dist/component/garmin/transform/skinTemperature.d.ts.map +1 -0
  140. package/dist/component/garmin/transform/skinTemperature.js +38 -0
  141. package/dist/component/garmin/transform/skinTemperature.js.map +1 -0
  142. package/dist/component/garmin/transform/sleeps.d.ts +55 -0
  143. package/dist/component/garmin/transform/sleeps.d.ts.map +1 -0
  144. package/dist/component/garmin/transform/sleeps.js +120 -0
  145. package/dist/component/garmin/transform/sleeps.js.map +1 -0
  146. package/dist/component/garmin/transform/stress.d.ts +12 -0
  147. package/dist/component/garmin/transform/stress.d.ts.map +1 -0
  148. package/dist/component/garmin/transform/stress.js +56 -0
  149. package/dist/component/garmin/transform/stress.js.map +1 -0
  150. package/dist/component/garmin/transform/userMetrics.d.ts +12 -0
  151. package/dist/component/garmin/transform/userMetrics.d.ts.map +1 -0
  152. package/dist/component/garmin/transform/userMetrics.js +48 -0
  153. package/dist/component/garmin/transform/userMetrics.js.map +1 -0
  154. package/dist/component/garmin/types/garmin.d.ts +21 -0
  155. package/dist/component/garmin/types/garmin.d.ts.map +1 -0
  156. package/dist/component/garmin/types/garmin.js +6 -0
  157. package/dist/component/garmin/types/garmin.js.map +1 -0
  158. package/dist/component/garmin/types/zod/zod.gen.d.ts +1319 -0
  159. package/dist/component/garmin/types/zod/zod.gen.d.ts.map +1 -0
  160. package/dist/component/garmin/types/zod/zod.gen.js +784 -0
  161. package/dist/component/garmin/types/zod/zod.gen.js.map +1 -0
  162. package/dist/component/garmin/webhooks.d.ts +141 -0
  163. package/dist/component/garmin/webhooks.d.ts.map +1 -0
  164. package/dist/component/garmin/webhooks.js +766 -0
  165. package/dist/component/garmin/webhooks.js.map +1 -0
  166. package/dist/component/private.d.ts +4 -4
  167. package/dist/component/public.d.ts +333 -333
  168. package/dist/component/schema.d.ts +133 -133
  169. package/dist/component/strava/private.d.ts +30 -0
  170. package/dist/component/strava/private.d.ts.map +1 -0
  171. package/dist/component/strava/private.js +71 -0
  172. package/dist/component/strava/private.js.map +1 -0
  173. package/dist/component/{strava.d.ts → strava/public.d.ts} +3 -31
  174. package/dist/component/strava/public.d.ts.map +1 -0
  175. package/dist/component/{strava.js → strava/public.js} +22 -101
  176. package/dist/component/strava/public.js.map +1 -0
  177. package/dist/component/validators/activity.d.ts +6 -0
  178. package/dist/component/validators/activity.d.ts.map +1 -1
  179. package/dist/component/validators/activity.js.map +1 -1
  180. package/dist/component/validators/body.d.ts +20 -14
  181. package/dist/component/validators/body.d.ts.map +1 -1
  182. package/dist/component/validators/body.js.map +1 -1
  183. package/dist/component/validators/daily.d.ts +6 -0
  184. package/dist/component/validators/daily.d.ts.map +1 -1
  185. package/dist/component/validators/daily.js.map +1 -1
  186. package/dist/component/validators/enums.d.ts +1 -1
  187. package/dist/component/validators/menstruation.d.ts +5 -0
  188. package/dist/component/validators/menstruation.d.ts.map +1 -1
  189. package/dist/component/validators/menstruation.js.map +1 -1
  190. package/dist/garmin/client.js.map +1 -1
  191. package/dist/garmin/index.d.ts +0 -2
  192. package/dist/garmin/index.d.ts.map +1 -1
  193. package/dist/garmin/index.js +0 -1
  194. package/dist/garmin/index.js.map +1 -1
  195. package/dist/garmin/sync.d.ts.map +1 -1
  196. package/dist/garmin/sync.js +3 -2
  197. package/dist/garmin/sync.js.map +1 -1
  198. package/dist/garmin/types.d.ts +1 -1
  199. package/dist/garmin/types.d.ts.map +1 -1
  200. package/dist/validators.d.ts +31 -28
  201. package/dist/validators.d.ts.map +1 -1
  202. package/dist/validators.js +2 -2
  203. package/dist/validators.js.map +1 -1
  204. package/package.json +4 -7
  205. package/src/client/index.ts +41 -172
  206. package/src/component/_generated/api.ts +96 -4
  207. package/src/component/_generated/component.ts +252 -284
  208. package/src/{garmin → component/garmin}/auth.ts +8 -1
  209. package/src/component/garmin/client.ts +39 -0
  210. package/src/component/garmin/private.ts +1798 -0
  211. package/src/component/garmin/public.ts +938 -0
  212. package/src/component/garmin/schemas/activity.ts +40 -0
  213. package/src/component/garmin/schemas/activityDetails.ts +45 -0
  214. package/src/component/garmin/schemas/bloodPressure.ts +38 -0
  215. package/src/component/garmin/schemas/bodyCompositions.ts +38 -0
  216. package/src/component/garmin/schemas/dailies.ts +38 -0
  217. package/src/component/garmin/schemas/epochs.ts +38 -0
  218. package/src/component/garmin/schemas/healthSnapshot.ts +38 -0
  219. package/src/component/garmin/schemas/hrvSummary.ts +38 -0
  220. package/src/component/garmin/schemas/manuallyUpdatedActivities.ts +49 -0
  221. package/src/component/garmin/schemas/menstrualCycleTracking.ts +39 -0
  222. package/src/component/garmin/schemas/moveIQ.ts +38 -0
  223. package/src/component/garmin/schemas/pulseOx.ts +39 -0
  224. package/src/component/garmin/schemas/respiration.ts +39 -0
  225. package/src/component/garmin/schemas/skinTemperature.ts +39 -0
  226. package/src/component/garmin/schemas/sleeps.ts +38 -0
  227. package/src/component/garmin/schemas/stress.ts +43 -0
  228. package/src/component/garmin/schemas/userMetrics.ts +39 -0
  229. package/src/component/garmin/transform/activity.ts +143 -0
  230. package/src/component/garmin/transform/activityDetails.ts +236 -0
  231. package/src/{garmin → component/garmin/transform}/bloodPressure.ts +39 -41
  232. package/src/component/garmin/transform/bodyCompositions.ts +51 -0
  233. package/src/component/garmin/transform/dailies.ts +179 -0
  234. package/src/component/garmin/transform/epochs.ts +94 -0
  235. package/src/component/garmin/transform/healthSnapshot.ts +152 -0
  236. package/src/component/garmin/transform/hrvSummary.ts +56 -0
  237. package/src/component/garmin/transform/manuallyUpdatedActivities.ts +27 -0
  238. package/src/{garmin/maps/activity-type.ts → component/garmin/transform/maps/activityType.ts} +116 -116
  239. package/src/{garmin/maps/sleep-level.ts → component/garmin/transform/maps/sleepLevel.ts} +22 -22
  240. package/src/component/garmin/transform/menstrualCycleTracking.ts +48 -0
  241. package/src/component/garmin/transform/moveIQ.ts +48 -0
  242. package/src/{garmin → component/garmin/transform}/plannedWorkout.ts +328 -333
  243. package/src/component/garmin/transform/pulseOx.ts +64 -0
  244. package/src/component/garmin/transform/respiration.ts +73 -0
  245. package/src/component/garmin/transform/skinTemperature.ts +44 -0
  246. package/src/component/garmin/transform/sleeps.ts +159 -0
  247. package/src/component/garmin/transform/stress.ts +78 -0
  248. package/src/component/garmin/transform/userMetrics.ts +56 -0
  249. package/src/component/garmin/types/specs/training-api-workouts.json +699 -0
  250. package/src/component/garmin/types/trainingApiWorkouts/client/client.gen.ts +290 -0
  251. package/src/component/garmin/types/trainingApiWorkouts/client/index.ts +25 -0
  252. package/src/component/garmin/types/trainingApiWorkouts/client/types.gen.ts +214 -0
  253. package/src/component/garmin/types/trainingApiWorkouts/client/utils.gen.ts +316 -0
  254. package/src/component/garmin/types/trainingApiWorkouts/client.gen.ts +16 -0
  255. package/src/component/garmin/types/trainingApiWorkouts/core/auth.gen.ts +41 -0
  256. package/src/component/garmin/types/trainingApiWorkouts/core/bodySerializer.gen.ts +82 -0
  257. package/src/component/garmin/types/trainingApiWorkouts/core/params.gen.ts +169 -0
  258. package/src/component/garmin/types/trainingApiWorkouts/core/pathSerializer.gen.ts +171 -0
  259. package/src/component/garmin/types/trainingApiWorkouts/core/queryKeySerializer.gen.ts +117 -0
  260. package/src/component/garmin/types/trainingApiWorkouts/core/serverSentEvents.gen.ts +243 -0
  261. package/src/component/garmin/types/trainingApiWorkouts/core/types.gen.ts +104 -0
  262. package/src/component/garmin/types/trainingApiWorkouts/core/utils.gen.ts +140 -0
  263. package/src/component/garmin/types/trainingApiWorkouts/index.ts +4 -0
  264. package/src/component/garmin/types/trainingApiWorkouts/sdk.gen.ts +126 -0
  265. package/src/component/garmin/types/trainingApiWorkouts/types.gen.ts +387 -0
  266. package/src/component/garmin/types/trainingApiWorkouts/zod.gen.ts +423 -0
  267. package/src/component/garmin/types/wellnessApi/client/client.gen.ts +290 -0
  268. package/src/component/garmin/types/wellnessApi/client/index.ts +25 -0
  269. package/src/component/garmin/types/wellnessApi/client/types.gen.ts +214 -0
  270. package/src/component/garmin/types/wellnessApi/client/utils.gen.ts +316 -0
  271. package/src/component/garmin/types/wellnessApi/client.gen.ts +16 -0
  272. package/src/component/garmin/types/wellnessApi/core/auth.gen.ts +41 -0
  273. package/src/component/garmin/types/wellnessApi/core/bodySerializer.gen.ts +82 -0
  274. package/src/component/garmin/types/wellnessApi/core/params.gen.ts +169 -0
  275. package/src/component/garmin/types/wellnessApi/core/pathSerializer.gen.ts +171 -0
  276. package/src/component/garmin/types/wellnessApi/core/queryKeySerializer.gen.ts +117 -0
  277. package/src/component/garmin/types/wellnessApi/core/serverSentEvents.gen.ts +243 -0
  278. package/src/component/garmin/types/wellnessApi/core/types.gen.ts +104 -0
  279. package/src/component/garmin/types/wellnessApi/core/utils.gen.ts +140 -0
  280. package/src/component/garmin/types/wellnessApi/index.ts +4 -0
  281. package/src/component/garmin/types/wellnessApi/sdk.gen.ts +207 -0
  282. package/src/component/garmin/types/wellnessApi/types.gen.ts +2942 -0
  283. package/src/component/garmin/types/wellnessApi/zod.gen.ts +878 -0
  284. package/src/component/garmin/utils.ts +25 -0
  285. package/src/component/garmin/webhooks.ts +852 -0
  286. package/src/component/strava/private.ts +89 -0
  287. package/src/component/{strava.ts → strava/public.ts} +341 -404
  288. package/src/component/validators/activity.ts +5 -0
  289. package/src/component/validators/body.ts +5 -0
  290. package/src/component/validators/daily.ts +5 -0
  291. package/src/component/validators/menstruation.ts +5 -1
  292. package/src/component/validators/plannedWorkout.ts +5 -0
  293. package/src/validators.ts +12 -2
  294. package/dist/component/garmin.d.ts +0 -366
  295. package/dist/component/garmin.d.ts.map +0 -1
  296. package/dist/component/garmin.js +0 -1481
  297. package/dist/component/garmin.js.map +0 -1
  298. package/dist/component/strava.d.ts.map +0 -1
  299. package/dist/component/strava.js.map +0 -1
  300. package/dist/garmin/activity.d.ts +0 -92
  301. package/dist/garmin/activity.d.ts.map +0 -1
  302. package/dist/garmin/activity.js +0 -201
  303. package/dist/garmin/activity.js.map +0 -1
  304. package/src/component/garmin.ts +0 -1722
  305. package/src/garmin/activity.test.ts +0 -170
  306. package/src/garmin/activity.ts +0 -265
  307. package/src/garmin/auth.test.ts +0 -103
  308. package/src/garmin/body.ts +0 -59
  309. package/src/garmin/client.ts +0 -886
  310. package/src/garmin/daily.ts +0 -215
  311. package/src/garmin/hrv.ts +0 -57
  312. package/src/garmin/index.ts +0 -145
  313. package/src/garmin/maps/activity-type.test.ts +0 -78
  314. package/src/garmin/menstruation.ts +0 -44
  315. package/src/garmin/pulseOx.ts +0 -45
  316. package/src/garmin/respiration.ts +0 -55
  317. package/src/garmin/skinTemp.ts +0 -42
  318. package/src/garmin/sleep.test.ts +0 -109
  319. package/src/garmin/sleep.ts +0 -176
  320. package/src/garmin/stressDetails.ts +0 -71
  321. package/src/garmin/sync.ts +0 -566
  322. package/src/garmin/types.ts +0 -268
  323. package/src/garmin/userMetrics.ts +0 -50
  324. package/src/garmin/wellness-api.d.ts +0 -5637
  325. /package/src/{garmin/spec → component/garmin/types/specs}/wellness-api.json +0 -0
@@ -0,0 +1,140 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
4
+ import {
5
+ type ArraySeparatorStyle,
6
+ serializeArrayParam,
7
+ serializeObjectParam,
8
+ serializePrimitiveParam,
9
+ } from './pathSerializer.gen';
10
+
11
+ export interface PathSerializer {
12
+ path: Record<string, unknown>;
13
+ url: string;
14
+ }
15
+
16
+ export const PATH_PARAM_RE = /\{[^{}]+\}/g;
17
+
18
+ export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {
19
+ let url = _url;
20
+ const matches = _url.match(PATH_PARAM_RE);
21
+ if (matches) {
22
+ for (const match of matches) {
23
+ let explode = false;
24
+ let name = match.substring(1, match.length - 1);
25
+ let style: ArraySeparatorStyle = 'simple';
26
+
27
+ if (name.endsWith('*')) {
28
+ explode = true;
29
+ name = name.substring(0, name.length - 1);
30
+ }
31
+
32
+ if (name.startsWith('.')) {
33
+ name = name.substring(1);
34
+ style = 'label';
35
+ } else if (name.startsWith(';')) {
36
+ name = name.substring(1);
37
+ style = 'matrix';
38
+ }
39
+
40
+ const value = path[name];
41
+
42
+ if (value === undefined || value === null) {
43
+ continue;
44
+ }
45
+
46
+ if (Array.isArray(value)) {
47
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
48
+ continue;
49
+ }
50
+
51
+ if (typeof value === 'object') {
52
+ url = url.replace(
53
+ match,
54
+ serializeObjectParam({
55
+ explode,
56
+ name,
57
+ style,
58
+ value: value as Record<string, unknown>,
59
+ valueOnly: true,
60
+ }),
61
+ );
62
+ continue;
63
+ }
64
+
65
+ if (style === 'matrix') {
66
+ url = url.replace(
67
+ match,
68
+ `;${serializePrimitiveParam({
69
+ name,
70
+ value: value as string,
71
+ })}`,
72
+ );
73
+ continue;
74
+ }
75
+
76
+ const replaceValue = encodeURIComponent(
77
+ style === 'label' ? `.${value as string}` : (value as string),
78
+ );
79
+ url = url.replace(match, replaceValue);
80
+ }
81
+ }
82
+ return url;
83
+ };
84
+
85
+ export const getUrl = ({
86
+ baseUrl,
87
+ path,
88
+ query,
89
+ querySerializer,
90
+ url: _url,
91
+ }: {
92
+ baseUrl?: string;
93
+ path?: Record<string, unknown>;
94
+ query?: Record<string, unknown>;
95
+ querySerializer: QuerySerializer;
96
+ url: string;
97
+ }) => {
98
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
99
+ let url = (baseUrl ?? '') + pathUrl;
100
+ if (path) {
101
+ url = defaultPathSerializer({ path, url });
102
+ }
103
+ let search = query ? querySerializer(query) : '';
104
+ if (search.startsWith('?')) {
105
+ search = search.substring(1);
106
+ }
107
+ if (search) {
108
+ url += `?${search}`;
109
+ }
110
+ return url;
111
+ };
112
+
113
+ export function getValidRequestBody(options: {
114
+ body?: unknown;
115
+ bodySerializer?: BodySerializer | null;
116
+ serializedBody?: unknown;
117
+ }) {
118
+ const hasBody = options.body !== undefined;
119
+ const isSerializedBody = hasBody && options.bodySerializer;
120
+
121
+ if (isSerializedBody) {
122
+ if ('serializedBody' in options) {
123
+ const hasSerializedBody =
124
+ options.serializedBody !== undefined && options.serializedBody !== '';
125
+
126
+ return hasSerializedBody ? options.serializedBody : null;
127
+ }
128
+
129
+ // not all clients implement a serializedBody property (i.e., client-axios)
130
+ return options.body !== '' ? options.body : null;
131
+ }
132
+
133
+ // plain/text body
134
+ if (hasBody) {
135
+ return options.body;
136
+ }
137
+
138
+ // no body was provided
139
+ return undefined;
140
+ }
@@ -0,0 +1,4 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export { createWorkout, createWorkoutSchedule, createWorkoutV2, deleteWorkout, deleteWorkoutSchedule, deleteWorkoutV2, getWorkout, getWorkoutSchedule, getWorkoutV2, type Options, queryWorkoutScheduleByDates, updateWorkout, updateWorkoutSchedule, updateWorkoutV2 } from './sdk.gen';
4
+ export type { ClientOptions, ConnectErrorBody, CreateWorkoutData, CreateWorkoutResponse, CreateWorkoutResponses, CreateWorkoutScheduleData, CreateWorkoutScheduleResponse, CreateWorkoutScheduleResponses, CreateWorkoutV2Data, CreateWorkoutV2Response, CreateWorkoutV2Responses, DeleteWorkoutData, DeleteWorkoutResponse, DeleteWorkoutResponses, DeleteWorkoutScheduleData, DeleteWorkoutScheduleResponse, DeleteWorkoutScheduleResponses, DeleteWorkoutV2Data, DeleteWorkoutV2Response, DeleteWorkoutV2Responses, GetWorkoutData, GetWorkoutError, GetWorkoutErrors, GetWorkoutResponse, GetWorkoutResponses, GetWorkoutScheduleData, GetWorkoutScheduleError, GetWorkoutScheduleErrors, GetWorkoutScheduleResponse, GetWorkoutScheduleResponses, GetWorkoutV2Data, GetWorkoutV2Error, GetWorkoutV2Errors, GetWorkoutV2Response, GetWorkoutV2Responses, QueryWorkoutScheduleByDatesData, QueryWorkoutScheduleByDatesError, QueryWorkoutScheduleByDatesErrors, QueryWorkoutScheduleByDatesResponse, QueryWorkoutScheduleByDatesResponses, Segment, ServiceFailure, Step, UpdateWorkoutData, UpdateWorkoutResponse, UpdateWorkoutResponses, UpdateWorkoutScheduleData, UpdateWorkoutScheduleResponse, UpdateWorkoutScheduleResponses, UpdateWorkoutV2Data, UpdateWorkoutV2Response, UpdateWorkoutV2Responses, Workout, WorkoutRepeatStep, WorkoutSchedule, WorkoutStep, WorkoutV2 } from './types.gen';
@@ -0,0 +1,126 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { Client, Options as Options2, TDataShape } from './client';
4
+ import { client } from './client.gen';
5
+ import type { CreateWorkoutData, CreateWorkoutResponses, CreateWorkoutScheduleData, CreateWorkoutScheduleResponses, CreateWorkoutV2Data, CreateWorkoutV2Responses, DeleteWorkoutData, DeleteWorkoutResponses, DeleteWorkoutScheduleData, DeleteWorkoutScheduleResponses, DeleteWorkoutV2Data, DeleteWorkoutV2Responses, GetWorkoutData, GetWorkoutErrors, GetWorkoutResponses, GetWorkoutScheduleData, GetWorkoutScheduleErrors, GetWorkoutScheduleResponses, GetWorkoutV2Data, GetWorkoutV2Errors, GetWorkoutV2Responses, QueryWorkoutScheduleByDatesData, QueryWorkoutScheduleByDatesErrors, QueryWorkoutScheduleByDatesResponses, UpdateWorkoutData, UpdateWorkoutResponses, UpdateWorkoutScheduleData, UpdateWorkoutScheduleResponses, UpdateWorkoutV2Data, UpdateWorkoutV2Responses } from './types.gen';
6
+
7
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
8
+ /**
9
+ * You can provide a client instance returned by `createClient()` instead of
10
+ * individual options. This might be also useful if you want to implement a
11
+ * custom client.
12
+ */
13
+ client?: Client;
14
+ /**
15
+ * You can pass arbitrary values through the `meta` object. This can be
16
+ * used to access values that aren't defined as part of the SDK function.
17
+ */
18
+ meta?: Record<string, unknown>;
19
+ };
20
+
21
+ /**
22
+ * This request is to delete a workout by/for a user
23
+ */
24
+ export const deleteWorkout = <ThrowOnError extends boolean = false>(options: Options<DeleteWorkoutData, ThrowOnError>) => (options.client ?? client).delete<DeleteWorkoutResponses, unknown, ThrowOnError>({ url: '/training-api/workout/{workoutId}', ...options });
25
+
26
+ /**
27
+ * This request is to retrieve a workout by/for a user
28
+ */
29
+ export const getWorkout = <ThrowOnError extends boolean = false>(options: Options<GetWorkoutData, ThrowOnError>) => (options.client ?? client).get<GetWorkoutResponses, GetWorkoutErrors, ThrowOnError>({ url: '/training-api/workout/{workoutId}', ...options });
30
+
31
+ /**
32
+ * This request is to update a workout by/for a user
33
+ */
34
+ export const updateWorkout = <ThrowOnError extends boolean = false>(options: Options<UpdateWorkoutData, ThrowOnError>) => (options.client ?? client).put<UpdateWorkoutResponses, unknown, ThrowOnError>({
35
+ url: '/training-api/workout/{workoutId}',
36
+ ...options,
37
+ headers: {
38
+ 'Content-Type': 'application/json',
39
+ ...options.headers
40
+ }
41
+ });
42
+
43
+ /**
44
+ * This request is to delete a workout by/for a user
45
+ */
46
+ export const deleteWorkoutV2 = <ThrowOnError extends boolean = false>(options: Options<DeleteWorkoutV2Data, ThrowOnError>) => (options.client ?? client).delete<DeleteWorkoutV2Responses, unknown, ThrowOnError>({ url: '/training-api/workout/v2/{workoutId}', ...options });
47
+
48
+ /**
49
+ * This request is to retrieve a workout by/for a user
50
+ */
51
+ export const getWorkoutV2 = <ThrowOnError extends boolean = false>(options: Options<GetWorkoutV2Data, ThrowOnError>) => (options.client ?? client).get<GetWorkoutV2Responses, GetWorkoutV2Errors, ThrowOnError>({ url: '/training-api/workout/v2/{workoutId}', ...options });
52
+
53
+ /**
54
+ * This request is to update a workout by/for a user
55
+ */
56
+ export const updateWorkoutV2 = <ThrowOnError extends boolean = false>(options: Options<UpdateWorkoutV2Data, ThrowOnError>) => (options.client ?? client).put<UpdateWorkoutV2Responses, unknown, ThrowOnError>({
57
+ url: '/training-api/workout/v2/{workoutId}',
58
+ ...options,
59
+ headers: {
60
+ 'Content-Type': 'application/json',
61
+ ...options.headers
62
+ }
63
+ });
64
+
65
+ /**
66
+ * This request is to create a V2 workout by/for a user
67
+ */
68
+ export const createWorkoutV2 = <ThrowOnError extends boolean = false>(options: Options<CreateWorkoutV2Data, ThrowOnError>) => (options.client ?? client).post<CreateWorkoutV2Responses, unknown, ThrowOnError>({
69
+ url: '/workoutportal/workout/v2',
70
+ ...options,
71
+ headers: {
72
+ 'Content-Type': 'application/json',
73
+ ...options.headers
74
+ }
75
+ });
76
+
77
+ /**
78
+ * This request is to create a workout by/for a user:
79
+ */
80
+ export const createWorkout = <ThrowOnError extends boolean = false>(options: Options<CreateWorkoutData, ThrowOnError>) => (options.client ?? client).post<CreateWorkoutResponses, unknown, ThrowOnError>({
81
+ url: '/training-api/workout',
82
+ ...options,
83
+ headers: {
84
+ 'Content-Type': 'application/json',
85
+ ...options.headers
86
+ }
87
+ });
88
+
89
+ /**
90
+ * This request is to delete a workout schedule by/for a user
91
+ */
92
+ export const deleteWorkoutSchedule = <ThrowOnError extends boolean = false>(options: Options<DeleteWorkoutScheduleData, ThrowOnError>) => (options.client ?? client).delete<DeleteWorkoutScheduleResponses, unknown, ThrowOnError>({ url: '/training-api/schedule/{workoutScheduleId}', ...options });
93
+
94
+ /**
95
+ * This request is to retrieve a workout schedule by/for a user
96
+ */
97
+ export const getWorkoutSchedule = <ThrowOnError extends boolean = false>(options: Options<GetWorkoutScheduleData, ThrowOnError>) => (options.client ?? client).get<GetWorkoutScheduleResponses, GetWorkoutScheduleErrors, ThrowOnError>({ url: '/training-api/schedule/{workoutScheduleId}', ...options });
98
+
99
+ /**
100
+ * This request is to update a workout schedule by/for a user
101
+ */
102
+ export const updateWorkoutSchedule = <ThrowOnError extends boolean = false>(options: Options<UpdateWorkoutScheduleData, ThrowOnError>) => (options.client ?? client).put<UpdateWorkoutScheduleResponses, unknown, ThrowOnError>({
103
+ url: '/training-api/schedule/{workoutScheduleId}',
104
+ ...options,
105
+ headers: {
106
+ 'Content-Type': 'application/json',
107
+ ...options.headers
108
+ }
109
+ });
110
+
111
+ /**
112
+ * This request is used to retrieve workout schedule by/for a user by date range:
113
+ */
114
+ export const queryWorkoutScheduleByDates = <ThrowOnError extends boolean = false>(options: Options<QueryWorkoutScheduleByDatesData, ThrowOnError>) => (options.client ?? client).get<QueryWorkoutScheduleByDatesResponses, QueryWorkoutScheduleByDatesErrors, ThrowOnError>({ url: '/training-api/schedule', ...options });
115
+
116
+ /**
117
+ * This request is to create a workout schedule by/for a user:
118
+ */
119
+ export const createWorkoutSchedule = <ThrowOnError extends boolean = false>(options: Options<CreateWorkoutScheduleData, ThrowOnError>) => (options.client ?? client).post<CreateWorkoutScheduleResponses, unknown, ThrowOnError>({
120
+ url: '/training-api/schedule',
121
+ ...options,
122
+ headers: {
123
+ 'Content-Type': 'application/json',
124
+ ...options.headers
125
+ }
126
+ });
@@ -0,0 +1,387 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export type ClientOptions = {
4
+ baseUrl: 'https://apis.garmin.com' | (string & {});
5
+ };
6
+
7
+ export type Step = {
8
+ stepOrder?: number;
9
+ type: string;
10
+ };
11
+
12
+ export type Workout = {
13
+ workoutId?: number;
14
+ ownerId?: number;
15
+ workoutName?: string;
16
+ description?: string;
17
+ /**
18
+ * iso 8601 timestamp without GMT offset or 'Z' indicator!
19
+ */
20
+ updatedDate?: string;
21
+ /**
22
+ * iso 8601 timestamp without GMT offset or 'Z' indicator!
23
+ */
24
+ createdDate?: string;
25
+ updatedTimeStamp?: number;
26
+ createdTimeStamp?: number;
27
+ sport?: 'RUNNING' | 'CYCLING' | 'LAP_SWIMMING' | 'STRENGTH_TRAINING' | 'CARDIO_TRAINING' | 'YOGA' | 'PILATES' | 'GENERIC' | 'HIIT' | 'MULTI_SPORT';
28
+ estimatedDurationInSecs?: number;
29
+ estimatedDistanceInMeters?: number;
30
+ poolLength?: number;
31
+ poolLengthUnit?: 'YARD' | 'METER';
32
+ workoutProvider?: string;
33
+ workoutSourceId?: string;
34
+ steps?: Array<WorkoutRepeatStep | WorkoutStep>;
35
+ };
36
+
37
+ export type WorkoutRepeatStep = Omit<Step, 'type'> & {
38
+ repeatType?: 'REPEAT_UNTIL_STEPS_CMPLT' | 'REPEAT_UNTIL_TIME' | 'REPEAT_UNTIL_DISTANCE' | 'REPEAT_UNTIL_CALORIES' | 'REPEAT_UNTIL_HR_LESS_THAN' | 'REPEAT_UNTIL_HR_GREATER_THAN' | 'REPEAT_UNTIL_POWER_LESS_THAN' | 'REPEAT_UNTIL_POWER_GREATER_THAN' | 'REPEAT_UNTIL_POWER_LAST_LAP_LESS_THAN' | 'REPEAT_UNTIL_MAX_POWER_LAST_LAP_LESS_THAN' | 'REPEAT_UNTIL_TRAINING_PEAKS_TSS';
39
+ repeatValue?: number;
40
+ skipLastRestStep?: boolean;
41
+ type: 'WorkoutRepeatStep';
42
+ };
43
+
44
+ export type WorkoutStep = Omit<Step, 'type'> & {
45
+ intensity?: 'ACTIVE' | 'REST' | 'WARMUP' | 'COOLDOWN' | 'RECOVERY' | 'INTERVAL' | 'MAIN';
46
+ description?: string;
47
+ durationType?: 'TIME' | 'DISTANCE' | 'HR_LESS_THAN' | 'HR_GREATER_THAN' | 'CALORIES' | 'OPEN' | 'POWER_LESS_THAN' | 'POWER_GREATER_THAN' | 'TRAINING_PEAKS_TSS' | 'REPETITION_TIME' | 'REPS' | 'TIME_AT_VALID_CDA' | 'FIXED_REST' | 'FIXED_REPETITION' | 'REPETITION_SWIM_CSS_OFFSET';
48
+ durationValue?: number;
49
+ durationValueType?: 'PERCENT' | 'MILE' | 'KILOMETER' | 'METER' | 'YARD';
50
+ targetType?: 'SPEED' | 'HEART_RATE' | 'OPEN' | 'CADENCE' | 'POWER' | 'GRADE' | 'RESISTANCE' | 'POWER_3S' | 'POWER_10S' | 'POWER_30S' | 'POWER_LAP' | 'SWIM_STROKE' | 'SPEED_LAP' | 'HEART_RATE_LAP' | 'PACE' | 'PACE_ZONE' | 'SWIM_INSTRUCTION' | 'SWIM_CSS_OFFSET';
51
+ targetValue?: number;
52
+ targetValueLow?: number;
53
+ targetValueHigh?: number;
54
+ targetValueType?: 'PERCENT' | 'MILE' | 'KILOMETER' | 'METER' | 'YARD';
55
+ secondaryTargetType?: 'SPEED' | 'HEART_RATE' | 'OPEN' | 'CADENCE' | 'POWER' | 'GRADE' | 'RESISTANCE' | 'POWER_3S' | 'POWER_10S' | 'POWER_30S' | 'POWER_LAP' | 'SWIM_STROKE' | 'SPEED_LAP' | 'HEART_RATE_LAP' | 'PACE' | 'PACE_ZONE' | 'SWIM_INSTRUCTION' | 'SWIM_CSS_OFFSET';
56
+ secondaryTargetValue?: number;
57
+ secondaryTargetValueLow?: number;
58
+ secondaryTargetValueHigh?: number;
59
+ secondaryTargetValueType?: 'PERCENT' | 'MILE' | 'KILOMETER' | 'METER' | 'YARD';
60
+ strokeType?: 'BACKSTROKE' | 'BREASTSTROKE' | 'DRILL' | 'BUTTERFLY' | 'FREESTYLE' | 'MIXED' | 'IM' | 'IM_BY_ROUND' | 'REVERSE_IM_BY_ROUND' | 'CHOICE';
61
+ drillType?: 'KICK' | 'PULL' | 'DRILL';
62
+ equipmentType?: 'NONE' | 'SWIM_FINS' | 'SWIM_KICKBOARD' | 'SWIM_PADDLES' | 'SWIM_PULL_BUOY' | 'SWIM_SNORKEL';
63
+ exerciseCategory?: string;
64
+ exerciseName?: string;
65
+ weightValue?: number;
66
+ weightDisplayUnit?: 'OTHER' | 'KILOGRAM' | 'POUND';
67
+ type: 'WorkoutStep';
68
+ };
69
+
70
+ export type Segment = {
71
+ segmentOrder?: number;
72
+ sport?: 'RUNNING' | 'CYCLING' | 'LAP_SWIMMING' | 'STRENGTH_TRAINING' | 'CARDIO_TRAINING' | 'YOGA' | 'PILATES' | 'GENERIC' | 'HIIT' | 'MULTI_SPORT';
73
+ estimatedDurationInSecs?: number;
74
+ estimatedDistanceInMeters?: number;
75
+ poolLength?: number;
76
+ poolLengthUnit?: 'YARD' | 'METER';
77
+ steps?: Array<WorkoutRepeatStep | WorkoutStep>;
78
+ };
79
+
80
+ export type WorkoutV2 = {
81
+ workoutId?: number;
82
+ ownerId?: number;
83
+ workoutName?: string;
84
+ description?: string;
85
+ /**
86
+ * iso 8601 timestamp without GMT offset or 'Z' indicator!
87
+ */
88
+ updatedDate?: string;
89
+ /**
90
+ * iso 8601 timestamp without GMT offset or 'Z' indicator!
91
+ */
92
+ createdDate?: string;
93
+ updatedTimeStamp?: number;
94
+ createdTimeStamp?: number;
95
+ sport?: 'RUNNING' | 'CYCLING' | 'LAP_SWIMMING' | 'STRENGTH_TRAINING' | 'CARDIO_TRAINING' | 'YOGA' | 'PILATES' | 'GENERIC' | 'HIIT' | 'MULTI_SPORT';
96
+ estimatedDurationInSecs?: number;
97
+ estimatedDistanceInMeters?: number;
98
+ poolLength?: number;
99
+ poolLengthUnit?: 'YARD' | 'METER';
100
+ workoutProvider?: string;
101
+ workoutSourceId?: string;
102
+ isSessionTransitionEnabled?: boolean;
103
+ segments?: Array<Segment>;
104
+ };
105
+
106
+ export type WorkoutSchedule = {
107
+ scheduleId?: number;
108
+ workoutId?: number;
109
+ date?: string;
110
+ };
111
+
112
+ export type ServiceFailure = {
113
+ errorType?: string;
114
+ message?: string;
115
+ errorMessage?: string;
116
+ errorId?: string;
117
+ };
118
+
119
+ export type ConnectErrorBody = {
120
+ message?: string;
121
+ error?: string;
122
+ };
123
+
124
+ export type DeleteWorkoutData = {
125
+ body?: never;
126
+ path: {
127
+ workoutId: number;
128
+ };
129
+ query?: never;
130
+ url: '/training-api/workout/{workoutId}';
131
+ };
132
+
133
+ export type DeleteWorkoutResponses = {
134
+ /**
135
+ * No Content
136
+ */
137
+ 204: void;
138
+ };
139
+
140
+ export type DeleteWorkoutResponse = DeleteWorkoutResponses[keyof DeleteWorkoutResponses];
141
+
142
+ export type GetWorkoutData = {
143
+ body?: never;
144
+ path: {
145
+ workoutId: number;
146
+ };
147
+ query?: never;
148
+ url: '/training-api/workout/{workoutId}';
149
+ };
150
+
151
+ export type GetWorkoutErrors = {
152
+ /**
153
+ * Forbidden
154
+ */
155
+ 403: ConnectErrorBody;
156
+ };
157
+
158
+ export type GetWorkoutError = GetWorkoutErrors[keyof GetWorkoutErrors];
159
+
160
+ export type GetWorkoutResponses = {
161
+ /**
162
+ * OK
163
+ */
164
+ 200: Workout;
165
+ };
166
+
167
+ export type GetWorkoutResponse = GetWorkoutResponses[keyof GetWorkoutResponses];
168
+
169
+ export type UpdateWorkoutData = {
170
+ body: Workout;
171
+ path: {
172
+ workoutId: number;
173
+ };
174
+ query?: never;
175
+ url: '/training-api/workout/{workoutId}';
176
+ };
177
+
178
+ export type UpdateWorkoutResponses = {
179
+ /**
180
+ * No Content
181
+ */
182
+ 204: void;
183
+ };
184
+
185
+ export type UpdateWorkoutResponse = UpdateWorkoutResponses[keyof UpdateWorkoutResponses];
186
+
187
+ export type DeleteWorkoutV2Data = {
188
+ body?: never;
189
+ path: {
190
+ workoutId: number;
191
+ };
192
+ query?: never;
193
+ url: '/training-api/workout/v2/{workoutId}';
194
+ };
195
+
196
+ export type DeleteWorkoutV2Responses = {
197
+ /**
198
+ * No Content
199
+ */
200
+ 204: void;
201
+ };
202
+
203
+ export type DeleteWorkoutV2Response = DeleteWorkoutV2Responses[keyof DeleteWorkoutV2Responses];
204
+
205
+ export type GetWorkoutV2Data = {
206
+ body?: never;
207
+ path: {
208
+ workoutId: number;
209
+ };
210
+ query?: never;
211
+ url: '/training-api/workout/v2/{workoutId}';
212
+ };
213
+
214
+ export type GetWorkoutV2Errors = {
215
+ /**
216
+ * Forbidden
217
+ */
218
+ 403: ConnectErrorBody;
219
+ };
220
+
221
+ export type GetWorkoutV2Error = GetWorkoutV2Errors[keyof GetWorkoutV2Errors];
222
+
223
+ export type GetWorkoutV2Responses = {
224
+ /**
225
+ * OK
226
+ */
227
+ 200: WorkoutV2;
228
+ };
229
+
230
+ export type GetWorkoutV2Response = GetWorkoutV2Responses[keyof GetWorkoutV2Responses];
231
+
232
+ export type UpdateWorkoutV2Data = {
233
+ body: WorkoutV2;
234
+ path: {
235
+ workoutId: number;
236
+ };
237
+ query?: never;
238
+ url: '/training-api/workout/v2/{workoutId}';
239
+ };
240
+
241
+ export type UpdateWorkoutV2Responses = {
242
+ /**
243
+ * No Content
244
+ */
245
+ 204: void;
246
+ };
247
+
248
+ export type UpdateWorkoutV2Response = UpdateWorkoutV2Responses[keyof UpdateWorkoutV2Responses];
249
+
250
+ export type CreateWorkoutV2Data = {
251
+ body: WorkoutV2;
252
+ path?: never;
253
+ query?: never;
254
+ url: '/workoutportal/workout/v2';
255
+ };
256
+
257
+ export type CreateWorkoutV2Responses = {
258
+ /**
259
+ * OK
260
+ */
261
+ 200: WorkoutV2;
262
+ };
263
+
264
+ export type CreateWorkoutV2Response = CreateWorkoutV2Responses[keyof CreateWorkoutV2Responses];
265
+
266
+ export type CreateWorkoutData = {
267
+ body: Workout;
268
+ path?: never;
269
+ query?: never;
270
+ url: '/training-api/workout';
271
+ };
272
+
273
+ export type CreateWorkoutResponses = {
274
+ /**
275
+ * OK
276
+ */
277
+ 200: Workout;
278
+ };
279
+
280
+ export type CreateWorkoutResponse = CreateWorkoutResponses[keyof CreateWorkoutResponses];
281
+
282
+ export type DeleteWorkoutScheduleData = {
283
+ body?: never;
284
+ path: {
285
+ workoutScheduleId: number;
286
+ };
287
+ query?: never;
288
+ url: '/training-api/schedule/{workoutScheduleId}';
289
+ };
290
+
291
+ export type DeleteWorkoutScheduleResponses = {
292
+ /**
293
+ * No Content
294
+ */
295
+ 204: void;
296
+ };
297
+
298
+ export type DeleteWorkoutScheduleResponse = DeleteWorkoutScheduleResponses[keyof DeleteWorkoutScheduleResponses];
299
+
300
+ export type GetWorkoutScheduleData = {
301
+ body?: never;
302
+ path: {
303
+ workoutScheduleId: number;
304
+ };
305
+ query?: never;
306
+ url: '/training-api/schedule/{workoutScheduleId}';
307
+ };
308
+
309
+ export type GetWorkoutScheduleErrors = {
310
+ /**
311
+ * Forbidden
312
+ */
313
+ 403: ConnectErrorBody;
314
+ };
315
+
316
+ export type GetWorkoutScheduleError = GetWorkoutScheduleErrors[keyof GetWorkoutScheduleErrors];
317
+
318
+ export type GetWorkoutScheduleResponses = {
319
+ /**
320
+ * OK
321
+ */
322
+ 200: WorkoutSchedule;
323
+ };
324
+
325
+ export type GetWorkoutScheduleResponse = GetWorkoutScheduleResponses[keyof GetWorkoutScheduleResponses];
326
+
327
+ export type UpdateWorkoutScheduleData = {
328
+ body: WorkoutSchedule;
329
+ path: {
330
+ workoutScheduleId: number;
331
+ };
332
+ query?: never;
333
+ url: '/training-api/schedule/{workoutScheduleId}';
334
+ };
335
+
336
+ export type UpdateWorkoutScheduleResponses = {
337
+ /**
338
+ * No Content
339
+ */
340
+ 204: void;
341
+ };
342
+
343
+ export type UpdateWorkoutScheduleResponse = UpdateWorkoutScheduleResponses[keyof UpdateWorkoutScheduleResponses];
344
+
345
+ export type QueryWorkoutScheduleByDatesData = {
346
+ body?: never;
347
+ path?: never;
348
+ query: {
349
+ startDate: string;
350
+ endDate: string;
351
+ };
352
+ url: '/training-api/schedule';
353
+ };
354
+
355
+ export type QueryWorkoutScheduleByDatesErrors = {
356
+ /**
357
+ * Forbidden
358
+ */
359
+ 403: ConnectErrorBody;
360
+ };
361
+
362
+ export type QueryWorkoutScheduleByDatesError = QueryWorkoutScheduleByDatesErrors[keyof QueryWorkoutScheduleByDatesErrors];
363
+
364
+ export type QueryWorkoutScheduleByDatesResponses = {
365
+ /**
366
+ * OK
367
+ */
368
+ 200: Array<WorkoutSchedule>;
369
+ };
370
+
371
+ export type QueryWorkoutScheduleByDatesResponse = QueryWorkoutScheduleByDatesResponses[keyof QueryWorkoutScheduleByDatesResponses];
372
+
373
+ export type CreateWorkoutScheduleData = {
374
+ body: WorkoutSchedule;
375
+ path?: never;
376
+ query?: never;
377
+ url: '/training-api/schedule';
378
+ };
379
+
380
+ export type CreateWorkoutScheduleResponses = {
381
+ /**
382
+ * OK
383
+ */
384
+ 200: number;
385
+ };
386
+
387
+ export type CreateWorkoutScheduleResponse = CreateWorkoutScheduleResponses[keyof CreateWorkoutScheduleResponses];