hevy-mcp 1.3.1 → 1.4.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.
- package/README.md +63 -8
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/tools/folders.ts","../src/utils/formatters.ts","../src/tools/routines.ts","../src/tools/templates.ts","../src/tools/workouts.ts","../src/utils/error-handler.ts","../src/utils/response-formatter.ts","../src/utils/hevyClient.ts","../src/generated/client/models/index.ts","../src/generated/client/v1/exercise_templates/item/index.ts","../src/generated/client/v1/exercise_templates/index.ts","../src/generated/client/v1/routine_folders/item/index.ts","../src/generated/client/v1/routine_folders/index.ts","../src/generated/client/v1/routines/item/index.ts","../src/generated/client/v1/routines/index.ts","../src/generated/client/v1/workouts/count/index.ts","../src/generated/client/v1/workouts/events/index.ts","../src/generated/client/v1/workouts/item/index.ts","../src/generated/client/v1/workouts/index.ts","../src/generated/client/v1/index.ts","../src/generated/client/hevyClient.ts","../node_modules/@microsoft/kiota-serialization-form/src/formParseNode.ts","../node_modules/@microsoft/kiota-serialization-form/src/formSerializationWriter.ts","../node_modules/@microsoft/kiota-serialization-form/src/formParseNodeFactory.ts","../node_modules/@microsoft/kiota-serialization-form/src/formSerializationWriterFactory.ts","../node_modules/@microsoft/kiota-serialization-multipart/src/multipartSerializationWriter.ts","../node_modules/@microsoft/kiota-serialization-multipart/src/multipartSerializationWriterFactory.ts","../package.json"],"sourcesContent":["#!/usr/bin/env node\nimport \"@dotenvx/dotenvx/config\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\n\nimport { registerFolderTools } from \"./tools/folders.js\";\nimport { registerRoutineTools } from \"./tools/routines.js\";\nimport { registerTemplateTools } from \"./tools/templates.js\";\n// Import tool registration functions\nimport { registerWorkoutTools } from \"./tools/workouts.js\";\nimport { createClient } from \"./utils/hevyClient.js\";\n\nimport { name, version } from \"../package.json\";\n\nconst HEVY_API_BASEURL = \"https://api.hevyapp.com\";\n\n// Create server instance\nconst server = new McpServer({\n\tname,\n\tversion,\n});\n\n// Check for API key\nif (!process.env.HEVY_API_KEY) {\n\tconsole.error(\"HEVY_API_KEY environment variable is not set\");\n\tprocess.exit(1);\n}\n\n// Configure client\n// We've already checked for HEVY_API_KEY existence above, so it's safe to use here\nconst apiKey = process.env.HEVY_API_KEY || \"\";\nconst hevyClient = createClient(apiKey, HEVY_API_BASEURL);\n// Register all tools\nregisterWorkoutTools(server, hevyClient);\nregisterRoutineTools(server, hevyClient);\nregisterTemplateTools(server, hevyClient);\nregisterFolderTools(server, hevyClient);\n\n// Start the server\nasync function runServer() {\n\tconst transport = new StdioServerTransport();\n\tawait server.connect(transport);\n}\n\nrunServer().catch((error) => {\n\tconsole.error(\"Fatal error in main():\", error);\n\tprocess.exit(1);\n});\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { RoutineFolder } from \"../generated/client/models/index.js\";\nimport { formatRoutineFolder } from \"../utils/formatters.js\";\n\n/**\n * Register all routine folder-related tools with the MCP server\n */\nexport function registerFolderTools(server: McpServer, hevyClient: HevyClient) {\n\t// Get routine folders\n\tserver.tool(\n\t\t\"get-routine-folders\",\n\t\t\"Get a paginated list of routine folders available on the account. Returns folder details including ID, title, index (order position), and creation/update timestamps. Useful for organizing routines into categories.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t},\n\t\tasync ({ page, pageSize }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routine_folders.get({\n\t\t\t\t\tqueryParameters: {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tpageSize,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Process routine folders to extract relevant information\n\t\t\t\tconst folders =\n\t\t\t\t\tdata?.routineFolders?.map((folder) => formatRoutineFolder(folder)) ||\n\t\t\t\t\t[];\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(folders, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error fetching routine folders:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routine folders: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Get single routine folder by ID\n\tserver.tool(\n\t\t\"get-routine-folder\",\n\t\t\"Get complete details of a specific routine folder by ID. Returns all folder information including title, index (order position), and creation/update timestamps.\",\n\t\t{\n\t\t\tfolderId: z.coerce.number().int(),\n\t\t},\n\t\tasync ({ folderId }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routine_folders\n\t\t\t\t\t.byFolderId(folderId.toString())\n\t\t\t\t\t.get();\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Routine folder with ID ${folderId} not found`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst folder = formatRoutineFolder(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(folder, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`Error fetching routine folder ${folderId}:`, error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routine folder: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Create new routine folder\n\tserver.tool(\n\t\t\"create-routine-folder\",\n\t\t\"Create a new routine folder in your Hevy account. The folder will be created at index 0, and all other folders will have their indexes incremented. Returns the complete folder details upon successful creation including the newly assigned folder ID.\",\n\t\t{\n\t\t\ttitle: z.string().min(1),\n\t\t},\n\t\tasync ({ title }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routine_folders.post({\n\t\t\t\t\troutineFolder: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: \"Failed to create routine folder\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst folder = formatRoutineFolder(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Routine folder created successfully:\\n${JSON.stringify(folder, null, 2)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error creating routine folder:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error creating routine folder: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type {\n\tRoutine_exercises as Exercise,\n\tRoutine_exercises_sets as ExerciseSet,\n\tExerciseTemplate,\n\tRoutine,\n\tRoutineFolder,\n\tWorkout,\n} from \"../generated/client/models/index.js\";\n\n/**\n * Formatted workout set interface\n */\nexport interface FormattedWorkoutSet {\n\ttype: string | undefined;\n\tweight: number | undefined | null;\n\treps: number | undefined | null;\n\tdistance: number | undefined | null;\n\tduration: number | undefined | null;\n\trpe: number | undefined | null;\n\tcustomMetric: number | undefined | null;\n}\n\n/**\n * Formatted workout exercise interface\n */\nexport interface FormattedWorkoutExercise {\n\tname: string | undefined;\n\tnotes: string | undefined | null;\n\tsets: FormattedWorkoutSet[] | undefined;\n}\n\n/**\n * Formatted workout interface\n */\nexport interface FormattedWorkout {\n\tid: string | undefined;\n\tdate: string | undefined;\n\tname: string | undefined;\n\tdescription: string | undefined | null;\n\tduration: string;\n\texercises: FormattedWorkoutExercise[] | undefined;\n}\n\n/**\n * Formatted routine set interface\n */\nexport interface FormattedRoutineSet {\n\tindex: number | undefined;\n\ttype: string | undefined;\n\tweight: number | undefined | null;\n\treps: number | undefined | null;\n\tdistance: number | undefined | null;\n\tduration: number | undefined | null;\n\tcustomMetric: number | undefined | null;\n}\n\n/**\n * Formatted routine exercise interface\n */\nexport interface FormattedRoutineExercise {\n\tname: string | undefined;\n\tindex: number | undefined;\n\texerciseTemplateId: string | undefined;\n\tnotes: string | undefined | null;\n\tsupersetId: number | undefined | null;\n\tsets: FormattedRoutineSet[] | undefined;\n}\n\n/**\n * Formatted routine interface\n */\nexport interface FormattedRoutine {\n\tid: string | undefined;\n\ttitle: string | undefined;\n\tfolderId: number | undefined | null;\n\tcreatedAt: string | undefined;\n\tupdatedAt: string | undefined;\n\texercises: FormattedRoutineExercise[] | undefined;\n}\n\n/**\n * Formatted routine folder interface\n */\nexport interface FormattedRoutineFolder {\n\tid: number | undefined;\n\ttitle: string | undefined;\n\tcreatedAt: string | undefined;\n\tupdatedAt: string | undefined;\n}\n\n/**\n * Formatted exercise template interface\n */\nexport interface FormattedExerciseTemplate {\n\tid: string | undefined;\n\ttitle: string | undefined;\n\ttype: string | undefined;\n\tprimaryMuscleGroup: string | undefined;\n\tsecondaryMuscleGroups: string[] | undefined;\n\tisCustom: boolean | undefined;\n}\n\n/**\n * Format a workout object for consistent presentation\n *\n * @param workout - The workout object from the API\n * @returns A formatted workout object with standardized properties\n */\nexport function formatWorkout(workout: Workout): FormattedWorkout {\n\treturn {\n\t\tid: workout.id,\n\t\tdate: workout.createdAt,\n\t\tname: workout.title,\n\t\tdescription: workout.description,\n\t\tduration: calculateDuration(workout.startTime || \"\", workout.endTime || \"\"),\n\t\texercises: workout.exercises?.map((exercise: Exercise) => {\n\t\t\treturn {\n\t\t\t\tname: exercise.title,\n\t\t\t\tnotes: exercise.notes,\n\t\t\t\tsets: exercise.sets?.map((set: ExerciseSet) => ({\n\t\t\t\t\ttype: set.type,\n\t\t\t\t\tweight: set.weightKg,\n\t\t\t\t\treps: set.reps,\n\t\t\t\t\tdistance: set.distanceMeters,\n\t\t\t\t\tduration: set.durationSeconds,\n\t\t\t\t\trpe: set.rpe,\n\t\t\t\t\tcustomMetric: set.customMetric,\n\t\t\t\t})),\n\t\t\t};\n\t\t}),\n\t};\n}\n\n/**\n * Format a routine object for consistent presentation\n *\n * @param routine - The routine object from the API\n * @returns A formatted routine object with standardized properties\n */\nexport function formatRoutine(routine: Routine): FormattedRoutine {\n\treturn {\n\t\tid: routine.id,\n\t\ttitle: routine.title,\n\t\tfolderId: routine.folderId,\n\t\tcreatedAt: routine.createdAt,\n\t\tupdatedAt: routine.updatedAt,\n\t\texercises: routine.exercises?.map((exercise: Exercise) => {\n\t\t\treturn {\n\t\t\t\tname: exercise.title,\n\t\t\t\tindex: exercise.index,\n\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\tnotes: exercise.notes,\n\t\t\t\tsupersetId: exercise.supersetsId,\n\t\t\t\tsets: exercise.sets?.map((set: ExerciseSet) => ({\n\t\t\t\t\tindex: set.index,\n\t\t\t\t\ttype: set.type,\n\t\t\t\t\tweight: set.weightKg,\n\t\t\t\t\treps: set.reps,\n\t\t\t\t\tdistance: set.distanceMeters,\n\t\t\t\t\tduration: set.durationSeconds,\n\t\t\t\t\tcustomMetric: set.customMetric,\n\t\t\t\t})),\n\t\t\t};\n\t\t}),\n\t};\n}\n\n/**\n * Format a routine folder object for consistent presentation\n *\n * @param folder - The routine folder object from the API\n * @returns A formatted routine folder object with standardized properties\n */\nexport function formatRoutineFolder(\n\tfolder: RoutineFolder,\n): FormattedRoutineFolder {\n\treturn {\n\t\tid: folder.id,\n\t\ttitle: folder.title,\n\t\tcreatedAt: folder.createdAt,\n\t\tupdatedAt: folder.updatedAt,\n\t};\n}\n\n/**\n * Calculate duration between two ISO timestamp strings\n *\n * @param startTime - The start time as ISO string or timestamp\n * @param endTime - The end time as ISO string or timestamp\n * @returns A formatted duration string (e.g. \"1h 30m 45s\") or \"Unknown duration\" if inputs are invalid\n */\nexport function calculateDuration(\n\tstartTime: string | number | null | undefined,\n\tendTime: string | number | null | undefined,\n): string {\n\tif (!startTime || !endTime) return \"Unknown duration\";\n\n\ttry {\n\t\tconst start = new Date(startTime);\n\t\tconst end = new Date(endTime);\n\n\t\t// Validate dates\n\t\tif (Number.isNaN(start.getTime()) || Number.isNaN(end.getTime())) {\n\t\t\treturn \"Unknown duration\";\n\t\t}\n\n\t\tconst durationMs = end.getTime() - start.getTime();\n\n\t\t// Handle negative durations\n\t\tif (durationMs < 0) {\n\t\t\treturn \"Invalid duration (end time before start time)\";\n\t\t}\n\n\t\tconst hours = Math.floor(durationMs / (1000 * 60 * 60));\n\t\tconst minutes = Math.floor((durationMs % (1000 * 60 * 60)) / (1000 * 60));\n\t\tconst seconds = Math.floor((durationMs % (1000 * 60)) / 1000);\n\n\t\treturn `${hours}h ${minutes}m ${seconds}s`;\n\t} catch (error) {\n\t\tconsole.error(\"Error calculating duration:\", error);\n\t\treturn \"Unknown duration\";\n\t}\n}\n\n/**\n * Format an exercise template object for consistent presentation\n *\n * @param template - The exercise template object from the API\n * @returns A formatted exercise template object with standardized properties\n */\nexport function formatExerciseTemplate(\n\ttemplate: ExerciseTemplate,\n): FormattedExerciseTemplate {\n\treturn {\n\t\tid: template.id,\n\t\ttitle: template.title,\n\t\ttype: template.type,\n\t\tprimaryMuscleGroup: template.primaryMuscleGroup,\n\t\tsecondaryMuscleGroups: template.secondaryMuscleGroups,\n\t\tisCustom: template.isCustom,\n\t};\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { Routine } from \"../generated/client/models/index.js\";\nimport { formatRoutine } from \"../utils/formatters.js\";\n\n/**\n * Register all routine-related tools with the MCP server\n */\nexport function registerRoutineTools(\n\tserver: McpServer,\n\thevyClient: HevyClient,\n) {\n\t// Get routines\n\tserver.tool(\n\t\t\"get-routines\",\n\t\t\"Get a paginated list of routines. Returns routine details including title, creation date, folder assignment, and exercise configurations. Results include both default and custom routines.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t},\n\t\tasync ({ page, pageSize }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routines.get({\n\t\t\t\t\tqueryParameters: {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tpageSize,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Process routines to extract relevant information\n\t\t\t\tconst routines =\n\t\t\t\t\tdata?.routines?.map((routine) => formatRoutine(routine)) || [];\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(routines, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error fetching routines:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routines: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Get single routine by ID\n\tserver.tool(\n\t\t\"get-routine\",\n\t\t\"Get complete details of a specific routine by ID. Returns all routine information including title, notes, assigned folder, and detailed exercise data with set configurations.\",\n\t\t{\n\t\t\troutineId: z.string().min(1),\n\t\t},\n\t\tasync ({ routineId }) => {\n\t\t\ttry {\n\t\t\t\t// Since the Kiota client doesn't have a get() method for routine by ID, we need to use the list endpoint and filter\n\t\t\t\tconst data = await hevyClient.v1.routines.byRoutineId(routineId).put({\n\t\t\t\t\troutine: {\n\t\t\t\t\t\ttitle: \"\", // We're providing a minimal body as required by the API\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Routine with ID ${routineId} not found`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst routine = formatRoutine(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(routine, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`Error fetching routine ${routineId}:`, error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routine: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Create new routine\n\tserver.tool(\n\t\t\"create-routine\",\n\t\t\"Create a new workout routine in your Hevy account. Requires title and at least one exercise with sets. Optionally assign to a specific folder. Returns the complete routine details upon successful creation including the newly assigned routine ID.\",\n\t\t{\n\t\t\ttitle: z.string().min(1),\n\t\t\tfolderId: z.coerce.number().nullable().optional(),\n\t\t\tnotes: z.string().optional(),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\trestSeconds: z.coerce.number().int().min(0).optional(),\n\t\t\t\t\tnotes: z.string().optional(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\tasync ({ title, folderId, notes, exercises }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routines.post({\n\t\t\t\t\troutine: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tfolderId: folderId || null,\n\t\t\t\t\t\tnotes: notes || \"\",\n\t\t\t\t\t\texercises: exercises.map((exercise) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\trestSeconds: exercise.restSeconds || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: \"Failed to create routine\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst routine = formatRoutine(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Routine created successfully:\\n${JSON.stringify(routine, null, 2)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error creating routine:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error creating routine: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Update existing routine\n\tserver.tool(\n\t\t\"update-routine\",\n\t\t\"Update an existing workout routine by ID. You can modify the title, notes, and exercise data. Returns the updated routine with all changes applied. Note that you cannot change the folder assignment through this method.\",\n\t\t{\n\t\t\troutineId: z.string().min(1),\n\t\t\ttitle: z.string().min(1),\n\t\t\tnotes: z.string().optional(),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\trestSeconds: z.coerce.number().int().min(0).optional(),\n\t\t\t\t\tnotes: z.string().optional(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\tasync ({ routineId, title, notes, exercises }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routines.byRoutineId(routineId).put({\n\t\t\t\t\troutine: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tnotes: notes || null,\n\t\t\t\t\t\texercises: exercises.map((exercise) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\trestSeconds: exercise.restSeconds || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Failed to update routine with ID ${routineId}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst routine = formatRoutine(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Routine updated successfully:\\n${JSON.stringify(routine, null, 2)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`Error updating routine ${routineId}:`, error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error updating routine: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { ExerciseTemplate } from \"../generated/client/models/index.js\";\nimport { formatExerciseTemplate } from \"../utils/formatters.js\";\n\n/**\n * Register all exercise template-related tools with the MCP server\n */\nexport function registerTemplateTools(\n\tserver: McpServer,\n\thevyClient: HevyClient,\n) {\n\t// Get exercise templates\n\tserver.tool(\n\t\t\"get-exercise-templates\",\n\t\t\"Get a paginated list of exercise templates available on the account. Returns both default and custom exercise templates with details including title, type, primary muscle group, and secondary muscle groups. Supports up to 100 templates per page.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(100).default(20),\n\t\t},\n\t\tasync ({ page, pageSize }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.exercise_templates.get({\n\t\t\t\t\tqueryParameters: {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tpageSize,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Process exercise templates to extract relevant information\n\t\t\t\tconst templates =\n\t\t\t\t\tdata?.exerciseTemplates?.map((template) =>\n\t\t\t\t\t\tformatExerciseTemplate(template),\n\t\t\t\t\t) || [];\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(templates, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error fetching exercise templates:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching exercise templates: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Get single exercise template by ID\n\tserver.tool(\n\t\t\"get-exercise-template\",\n\t\t\"Get complete details of a specific exercise template by ID. Returns all template information including title, type, primary muscle group, secondary muscle groups, and whether it's a custom exercise.\",\n\t\t{\n\t\t\texerciseTemplateId: z.string().min(1),\n\t\t},\n\t\tasync ({ exerciseTemplateId }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.exercise_templates\n\t\t\t\t\t.byExerciseTemplateId(exerciseTemplateId)\n\t\t\t\t\t.get();\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Exercise template with ID ${exerciseTemplateId} not found`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst template = formatExerciseTemplate(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(template, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Error fetching exercise template ${exerciseTemplateId}:`,\n\t\t\t\t\terror,\n\t\t\t\t);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching exercise template: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { PostWorkoutsRequestBody } from \"../generated/client/models/index.js\";\nimport { withErrorHandling } from \"../utils/error-handler.js\";\nimport { formatWorkout } from \"../utils/formatters.js\";\nimport {\n\tcreateEmptyResponse,\n\tcreateJsonResponse,\n} from \"../utils/response-formatter.js\";\n\n/**\n * Type definition for exercise set types\n */\ntype SetType = 'warmup' | 'normal' | 'failure' | 'dropset';\n\n/**\n * Interface for exercise set input\n */\ninterface ExerciseSetInput {\n\ttype: SetType;\n\tweightKg?: number | null;\n\treps?: number | null;\n\tdistanceMeters?: number | null;\n\tdurationSeconds?: number | null;\n\trpe?: number | null;\n\tcustomMetric?: number | null;\n}\n\n/**\n * Interface for exercise input\n */\ninterface ExerciseInput {\n\texerciseTemplateId: string;\n\tsupersetId?: number | null;\n\tnotes?: string | null;\n\tsets: ExerciseSetInput[];\n}\n\n/**\n * Register all workout-related tools with the MCP server\n */\nexport function registerWorkoutTools(\n\tserver: McpServer,\n\thevyClient: HevyClient,\n) {\n\t// Get workouts\n\tserver.tool(\n\t\t\"get-workouts\",\n\t\t\"Get a paginated list of workouts. Returns workout details including title, description, start/end times, and exercises performed. Results are ordered from newest to oldest.\",\n\t\t{\n\t\t\tpage: z.coerce.number().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t},\n\t\twithErrorHandling(async ({ page, pageSize }) => {\n\t\t\tconst data = await hevyClient.v1.workouts.get({\n\t\t\t\tqueryParameters: {\n\t\t\t\t\tpage,\n\t\t\t\t\tpageSize,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\t// Process workouts to extract relevant information\n\t\t\tconst workouts =\n\t\t\t\tdata?.workouts?.map((workout) => formatWorkout(workout)) || [];\n\n\t\t\tif (workouts.length === 0) {\n\t\t\t\treturn createEmptyResponse(\"No workouts found for the specified parameters\");\n\t\t\t}\n\n\t\t\treturn createJsonResponse(workouts);\n\t\t}, \"get-workouts\"),\n\t);\n\n\t// Get single workout by ID\n\tserver.tool(\n\t\t\"get-workout\",\n\t\t\"Get complete details of a specific workout by ID. Returns all workout information including title, description, start/end times, and detailed exercise data.\",\n\t\t{\n\t\t\tworkoutId: z.string().min(1),\n\t\t},\n\t\twithErrorHandling(async ({ workoutId }) => {\n\t\t\tconst data = await hevyClient.v1.workouts.byWorkoutId(workoutId).get();\n\n\t\t\tif (!data) {\n\t\t\t\treturn createEmptyResponse(`Workout with ID ${workoutId} not found`);\n\t\t\t}\n\n\t\t\tconst workout = formatWorkout(data);\n\t\t\treturn createJsonResponse(workout);\n\t\t}, \"get-workout\"),\n\t);\n\n\t// Get workout count\n\tserver.tool(\n\t\t\"get-workout-count\",\n\t\t\"Get the total number of workouts on the account. Useful for pagination or statistics.\",\n\t\t{},\n\t\twithErrorHandling(async () => {\n\t\t\tconst data = await hevyClient.v1.workouts.count.get();\n\t\t\t// Use type assertion to access count property\n\t\t\tconst count = data ? (data as { workoutCount?: number }).workoutCount || 0 : 0;\n\t\t\treturn createJsonResponse({ count });\n\t\t}, \"get-workout-count\"),\n\t);\n\n\t// Get workout events (updates/deletes)\n\tserver.tool(\n\t\t\"get-workout-events\",\n\t\t\"Retrieve a paged list of workout events (updates or deletes) since a given date. Events are ordered from newest to oldest. The intention is to allow clients to keep their local cache of workouts up to date without having to fetch the entire list of workouts.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t\tsince: z.string().default(\"1970-01-01T00:00:00Z\"),\n\t\t},\n\t\twithErrorHandling(async ({ page, pageSize, since }) => {\n\t\t\tconst data = await hevyClient.v1.workouts.events.get({\n\t\t\t\tqueryParameters: {\n\t\t\t\t\tpage,\n\t\t\t\t\tpageSize,\n\t\t\t\t\tsince,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tconst events = data?.events || [];\n\n\t\t\tif (events.length === 0) {\n\t\t\t\treturn createEmptyResponse(`No workout events found for the specified parameters since ${since}`);\n\t\t\t}\n\n\t\t\treturn createJsonResponse(events);\n\t\t}, \"get-workout-events\"),\n\t);\n\n\t// Create workout\n\tserver.tool(\n\t\t\"create-workout\",\n\t\t\"Create a new workout in your Hevy account. Requires title, start/end times, and at least one exercise with sets. Returns the complete workout details upon successful creation including the newly assigned workout ID.\",\n\t\t{\n\t\t\ttitle: z.string().min(1),\n\t\t\tdescription: z.string().optional().nullable(),\n\t\t\tstartTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tendTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tisPrivate: z.boolean().default(false),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\tnotes: z.string().optional().nullable(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\trpe: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\twithErrorHandling(\n\t\t\tasync ({\n\t\t\t\ttitle,\n\t\t\t\tdescription,\n\t\t\t\tstartTime,\n\t\t\t\tendTime,\n\t\t\t\tisPrivate,\n\t\t\t\texercises,\n\t\t\t}) => {\n\t\t\t\tconst requestBody: PostWorkoutsRequestBody = {\n\t\t\t\t\tworkout: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tdescription: description || null,\n\t\t\t\t\t\tstartTime,\n\t\t\t\t\t\tendTime,\n\t\t\t\t\t\tisPrivate,\n\t\t\t\t\t\texercises: exercises.map((exercise: ExerciseInput) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set: ExerciseSetInput) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\trpe: set.rpe || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tconst data = await hevyClient.v1.workouts.post(requestBody);\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn createEmptyResponse(\"Failed to create workout: Server returned no data\");\n\t\t\t\t}\n\n\t\t\t\tconst workout = formatWorkout(data);\n\t\t\t\treturn createJsonResponse(workout, {\n\t\t\t\t\tpretty: true,\n\t\t\t\t\tindent: 2,\n\t\t\t\t});\n\t\t\t},\n\t\t\t\"create-workout\",\n\t\t),\n\t);\n\n\t// Update workout\n\tserver.tool(\n\t\t\"update-workout\",\n\t\t\"Update an existing workout by ID. You can modify the title, description, start/end times, privacy setting, and exercise data. Returns the updated workout with all changes applied.\",\n\t\t{\n\t\t\tworkoutId: z.string().min(1),\n\t\t\ttitle: z.string().min(1),\n\t\t\tdescription: z.string().optional().nullable(),\n\t\t\tstartTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tendTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tisPrivate: z.boolean().default(false),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\tnotes: z.string().optional().nullable(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\trpe: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\twithErrorHandling(\n\t\t\tasync ({\n\t\t\t\tworkoutId,\n\t\t\t\ttitle,\n\t\t\t\tdescription,\n\t\t\t\tstartTime,\n\t\t\t\tendTime,\n\t\t\t\tisPrivate,\n\t\t\t\texercises,\n\t\t\t}) => {\n\t\t\t\tconst requestBody: PostWorkoutsRequestBody = {\n\t\t\t\t\tworkout: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tdescription: description || null,\n\t\t\t\t\t\tstartTime,\n\t\t\t\t\t\tendTime,\n\t\t\t\t\t\tisPrivate,\n\t\t\t\t\t\texercises: exercises.map((exercise: ExerciseInput) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set: ExerciseSetInput) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\trpe: set.rpe || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tconst data = await hevyClient.v1.workouts\n\t\t\t\t\t.byWorkoutId(workoutId)\n\t\t\t\t\t.put(requestBody);\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn createEmptyResponse(\n\t\t\t\t\t\t`Failed to update workout with ID ${workoutId}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst workout = formatWorkout(data);\n\t\t\t\treturn createJsonResponse(workout, {\n\t\t\t\t\tpretty: true,\n\t\t\t\t\tindent: 2,\n\t\t\t\t});\n\t\t\t},\n\t\t\t\"update-workout-operation\",\n\t\t),\n\t);\n}\n","/**\n * Centralized error handling utility for MCP tools\n */\n\n// Define the McpToolResponse interface based on the SDK's structure\ninterface McpToolResponse {\n\tcontent: Array<{ type: string; text: string }>;\n\tisError?: boolean;\n}\n\n/**\n * Standard error response interface\n */\nexport interface ErrorResponse {\n\tmessage: string;\n\tcode?: string;\n\tdetails?: unknown;\n}\n\n/**\n * Create a standardized error response for MCP tools\n *\n * @param error - The error object or message\n * @param context - Optional context information about where the error occurred\n * @returns A formatted MCP tool response with error information\n */\nexport function createErrorResponse(\n\terror: unknown,\n\tcontext?: string,\n): McpToolResponse {\n\tconst errorMessage = error instanceof Error ? error.message : String(error);\n\t// Extract error code if available (for logging purposes)\n\tconst errorCode =\n\t\terror instanceof Error && \"code\" in error\n\t\t\t? (error as { code?: string }).code\n\t\t\t: undefined;\n\n\t// Include error code in logs if available\n\tif (errorCode) {\n\t\tconsole.debug(`Error code: ${errorCode}`);\n\t}\n\n\tconst contextPrefix = context ? `[${context}] ` : \"\";\n\tconst formattedMessage = `${contextPrefix}Error: ${errorMessage}`;\n\n\t// Log the error for server-side debugging\n\tconsole.error(formattedMessage, error);\n\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: formattedMessage,\n\t\t\t},\n\t\t],\n\t\tisError: true,\n\t};\n}\n\n/**\n * Wrap an async function with standardized error handling\n *\n * @param fn - The async function to wrap\n * @param context - Context information for error messages\n * @returns A function that catches errors and returns standardized error responses\n */\n// Define a more specific type for function parameters\ntype McpToolFunction = (\n\t...args: Record<string, unknown>[]\n) => Promise<McpToolResponse>;\n\n/**\n * Wrap an async function with standardized error handling\n *\n * @param fn - The async function to wrap\n * @param context - Context information for error messages\n * @returns A function that catches errors and returns standardized error responses\n */\nexport function withErrorHandling<T extends McpToolFunction>(\n\tfn: T,\n\tcontext: string,\n): T {\n\treturn (async (...args: Parameters<T>) => {\n\t\ttry {\n\t\t\treturn await fn(...args);\n\t\t} catch (error) {\n\t\t\treturn createErrorResponse(error, context);\n\t\t}\n\t}) as T;\n}\n","/**\n * Centralized response formatting utility for MCP tools\n */\n\nimport type { McpToolResponse } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n\n/**\n * Format options for JSON responses\n */\nexport interface JsonFormatOptions {\n\t/** Whether to pretty-print the JSON with indentation */\n\tpretty?: boolean;\n\t/** Indentation spaces for pretty-printing (default: 2) */\n\tindent?: number;\n}\n\n/**\n * Create a standardized success response with JSON data\n *\n * @param data - The data to include in the response\n * @param options - Formatting options\n * @returns A formatted MCP tool response with the data as JSON\n */\nexport function createJsonResponse(\n\tdata: unknown,\n\toptions: JsonFormatOptions = { pretty: true, indent: 2 },\n): McpToolResponse {\n\tconst jsonString = options.pretty\n\t\t? JSON.stringify(data, null, options.indent)\n\t\t: JSON.stringify(data);\n\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: jsonString,\n\t\t\t},\n\t\t],\n\t};\n}\n\n/**\n * Create a standardized success response with text data\n *\n * @param message - The text message to include in the response\n * @returns A formatted MCP tool response with the text message\n */\nexport function createTextResponse(message: string): McpToolResponse {\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: message,\n\t\t\t},\n\t\t],\n\t};\n}\n\n/**\n * Create a standardized success response for empty or null results\n *\n * @param message - Optional message to include (default: \"No data found\")\n * @returns A formatted MCP tool response for empty results\n */\nexport function createEmptyResponse(\n\tmessage = \"No data found\",\n): McpToolResponse {\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: message,\n\t\t\t},\n\t\t],\n\t};\n}\n","import {\n\tApiKeyAuthenticationProvider,\n\tApiKeyLocation,\n} from \"@microsoft/kiota-abstractions\";\nimport { FetchRequestAdapter } from \"@microsoft/kiota-http-fetchlibrary\";\nimport { createHevyClient } from \"../generated/client/hevyClient.js\";\n\nexport function createClient(apiKey: string, baseUrl: string) {\n\tconst authProvider = new ApiKeyAuthenticationProvider(\n\t\tapiKey,\n\t\t\"api-key\",\n\t\tApiKeyLocation.Header,\n\t);\n\tconst adapter = new FetchRequestAdapter(authProvider);\n\tadapter.baseUrl = baseUrl;\n\n\treturn createHevyClient(adapter);\n}\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {DeletedWorkout}\n */\n// @ts-ignore\nexport function createDeletedWorkoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoDeletedWorkout;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {ExerciseTemplate}\n */\n// @ts-ignore\nexport function createExerciseTemplateFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoExerciseTemplate;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {DeletedWorkout | UpdatedWorkout}\n */\n// @ts-ignore\nexport function createPaginatedWorkoutEvents_eventsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPaginatedWorkoutEvents_events;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PaginatedWorkoutEvents}\n */\n// @ts-ignore\nexport function createPaginatedWorkoutEventsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPaginatedWorkoutEvents;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutineFolderRequestBody_routine_folder}\n */\n// @ts-ignore\nexport function createPostRoutineFolderRequestBody_routine_folderFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutineFolderRequestBody_routine_folder;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutineFolderRequestBody}\n */\n// @ts-ignore\nexport function createPostRoutineFolderRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutineFolderRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestBody_routine}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestBody_routineFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestBody_routine;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestBody}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestExercise}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestExerciseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestExercise;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestSet}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestSetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestSet;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestBody_workout}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestBody_workoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestBody_workout;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestBody}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestExercise}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestExerciseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestExercise;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestSet}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestSetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestSet;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestBody_routine}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestBody_routineFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestBody_routine;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestBody}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestExercise}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestExerciseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestExercise;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestSet}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestSetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestSet;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine_exercises_sets}\n */\n// @ts-ignore\nexport function createRoutine_exercises_setsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine_exercises_sets;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine_exercises}\n */\n// @ts-ignore\nexport function createRoutine_exercisesFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine_exercises;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {RoutineFolder}\n */\n// @ts-ignore\nexport function createRoutineFolderFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutineFolder;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine}\n */\n// @ts-ignore\nexport function createRoutineFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {UpdatedWorkout}\n */\n// @ts-ignore\nexport function createUpdatedWorkoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoUpdatedWorkout;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout_exercises_sets}\n */\n// @ts-ignore\nexport function createWorkout_exercises_setsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout_exercises_sets;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout_exercises}\n */\n// @ts-ignore\nexport function createWorkout_exercisesFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout_exercises;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout}\n */\n// @ts-ignore\nexport function createWorkoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout;\n}\nexport interface DeletedWorkout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A date string indicating when the workout was deleted\n */\n deletedAt?: string | null;\n /**\n * The unique identifier of the deleted workout\n */\n id?: string | null;\n /**\n * Indicates the type of the event (deleted)\n */\n type?: string | null;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoDeletedWorkout(deletedWorkout: Partial<DeletedWorkout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"deleted_at\": n => { deletedWorkout.deletedAt = n.getStringValue(); },\n \"id\": n => { deletedWorkout.id = n.getStringValue(); },\n \"type\": n => { deletedWorkout.type = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoExerciseTemplate(exerciseTemplate: Partial<ExerciseTemplate> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"id\": n => { exerciseTemplate.id = n.getStringValue(); },\n \"is_custom\": n => { exerciseTemplate.isCustom = n.getBooleanValue(); },\n \"primary_muscle_group\": n => { exerciseTemplate.primaryMuscleGroup = n.getStringValue(); },\n \"secondary_muscle_groups\": n => { exerciseTemplate.secondaryMuscleGroups = n.getCollectionOfPrimitiveValues<string>(); },\n \"title\": n => { exerciseTemplate.title = n.getStringValue(); },\n \"type\": n => { exerciseTemplate.type = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPaginatedWorkoutEvents(paginatedWorkoutEvents: Partial<PaginatedWorkoutEvents> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"events\": n => { paginatedWorkoutEvents.events = n.getCollectionOfObjectValues<DeletedWorkout>(createDeletedWorkoutFromDiscriminatorValue) ?? n.getCollectionOfObjectValues<UpdatedWorkout>(createUpdatedWorkoutFromDiscriminatorValue); },\n \"page\": n => { paginatedWorkoutEvents.page = n.getNumberValue(); },\n \"page_count\": n => { paginatedWorkoutEvents.pageCount = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPaginatedWorkoutEvents_events(paginatedWorkoutEvents_events: Partial<DeletedWorkout | UpdatedWorkout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n ...deserializeIntoDeletedWorkout(paginatedWorkoutEvents_events as DeletedWorkout),\n ...deserializeIntoUpdatedWorkout(paginatedWorkoutEvents_events as UpdatedWorkout),\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutineFolderRequestBody(postRoutineFolderRequestBody: Partial<PostRoutineFolderRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"routine_folder\": n => { postRoutineFolderRequestBody.routineFolder = n.getObjectValue<PostRoutineFolderRequestBody_routine_folder>(createPostRoutineFolderRequestBody_routine_folderFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutineFolderRequestBody_routine_folder(postRoutineFolderRequestBody_routine_folder: Partial<PostRoutineFolderRequestBody_routine_folder> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"title\": n => { postRoutineFolderRequestBody_routine_folder.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestBody(postRoutinesRequestBody: Partial<PostRoutinesRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"routine\": n => { postRoutinesRequestBody.routine = n.getObjectValue<PostRoutinesRequestBody_routine>(createPostRoutinesRequestBody_routineFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestBody_routine(postRoutinesRequestBody_routine: Partial<PostRoutinesRequestBody_routine> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercises\": n => { postRoutinesRequestBody_routine.exercises = n.getCollectionOfObjectValues<PostRoutinesRequestExercise>(createPostRoutinesRequestExerciseFromDiscriminatorValue); },\n \"folder_id\": n => { postRoutinesRequestBody_routine.folderId = n.getNumberValue(); },\n \"notes\": n => { postRoutinesRequestBody_routine.notes = n.getStringValue(); },\n \"title\": n => { postRoutinesRequestBody_routine.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestExercise(postRoutinesRequestExercise: Partial<PostRoutinesRequestExercise> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { postRoutinesRequestExercise.exerciseTemplateId = n.getStringValue(); },\n \"notes\": n => { postRoutinesRequestExercise.notes = n.getStringValue(); },\n \"rest_seconds\": n => { postRoutinesRequestExercise.restSeconds = n.getNumberValue(); },\n \"sets\": n => { postRoutinesRequestExercise.sets = n.getCollectionOfObjectValues<PostRoutinesRequestSet>(createPostRoutinesRequestSetFromDiscriminatorValue); },\n \"superset_id\": n => { postRoutinesRequestExercise.supersetId = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestSet(postRoutinesRequestSet: Partial<PostRoutinesRequestSet> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { postRoutinesRequestSet.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { postRoutinesRequestSet.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { postRoutinesRequestSet.durationSeconds = n.getNumberValue(); },\n \"reps\": n => { postRoutinesRequestSet.reps = n.getNumberValue(); },\n \"type\": n => { postRoutinesRequestSet.type = n.getEnumValue<PostRoutinesRequestSet_type>(PostRoutinesRequestSet_typeObject); },\n \"weight_kg\": n => { postRoutinesRequestSet.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestBody(postWorkoutsRequestBody: Partial<PostWorkoutsRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"workout\": n => { postWorkoutsRequestBody.workout = n.getObjectValue<PostWorkoutsRequestBody_workout>(createPostWorkoutsRequestBody_workoutFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestBody_workout(postWorkoutsRequestBody_workout: Partial<PostWorkoutsRequestBody_workout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"description\": n => { postWorkoutsRequestBody_workout.description = n.getStringValue(); },\n \"end_time\": n => { postWorkoutsRequestBody_workout.endTime = n.getStringValue(); },\n \"exercises\": n => { postWorkoutsRequestBody_workout.exercises = n.getCollectionOfObjectValues<PostWorkoutsRequestExercise>(createPostWorkoutsRequestExerciseFromDiscriminatorValue); },\n \"is_private\": n => { postWorkoutsRequestBody_workout.isPrivate = n.getBooleanValue(); },\n \"start_time\": n => { postWorkoutsRequestBody_workout.startTime = n.getStringValue(); },\n \"title\": n => { postWorkoutsRequestBody_workout.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestExercise(postWorkoutsRequestExercise: Partial<PostWorkoutsRequestExercise> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { postWorkoutsRequestExercise.exerciseTemplateId = n.getStringValue(); },\n \"notes\": n => { postWorkoutsRequestExercise.notes = n.getStringValue(); },\n \"sets\": n => { postWorkoutsRequestExercise.sets = n.getCollectionOfObjectValues<PostWorkoutsRequestSet>(createPostWorkoutsRequestSetFromDiscriminatorValue); },\n \"superset_id\": n => { postWorkoutsRequestExercise.supersetId = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestSet(postWorkoutsRequestSet: Partial<PostWorkoutsRequestSet> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { postWorkoutsRequestSet.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { postWorkoutsRequestSet.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { postWorkoutsRequestSet.durationSeconds = n.getNumberValue(); },\n \"reps\": n => { postWorkoutsRequestSet.reps = n.getNumberValue(); },\n \"rpe\": n => { postWorkoutsRequestSet.rpe = n.getNumberValue(); },\n \"type\": n => { postWorkoutsRequestSet.type = n.getEnumValue<PostWorkoutsRequestSet_type>(PostWorkoutsRequestSet_typeObject); },\n \"weight_kg\": n => { postWorkoutsRequestSet.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestBody(putRoutinesRequestBody: Partial<PutRoutinesRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"routine\": n => { putRoutinesRequestBody.routine = n.getObjectValue<PutRoutinesRequestBody_routine>(createPutRoutinesRequestBody_routineFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestBody_routine(putRoutinesRequestBody_routine: Partial<PutRoutinesRequestBody_routine> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercises\": n => { putRoutinesRequestBody_routine.exercises = n.getCollectionOfObjectValues<PutRoutinesRequestExercise>(createPutRoutinesRequestExerciseFromDiscriminatorValue); },\n \"notes\": n => { putRoutinesRequestBody_routine.notes = n.getStringValue(); },\n \"title\": n => { putRoutinesRequestBody_routine.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestExercise(putRoutinesRequestExercise: Partial<PutRoutinesRequestExercise> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { putRoutinesRequestExercise.exerciseTemplateId = n.getStringValue(); },\n \"notes\": n => { putRoutinesRequestExercise.notes = n.getStringValue(); },\n \"rest_seconds\": n => { putRoutinesRequestExercise.restSeconds = n.getNumberValue(); },\n \"sets\": n => { putRoutinesRequestExercise.sets = n.getCollectionOfObjectValues<PutRoutinesRequestSet>(createPutRoutinesRequestSetFromDiscriminatorValue); },\n \"superset_id\": n => { putRoutinesRequestExercise.supersetId = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestSet(putRoutinesRequestSet: Partial<PutRoutinesRequestSet> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { putRoutinesRequestSet.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { putRoutinesRequestSet.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { putRoutinesRequestSet.durationSeconds = n.getNumberValue(); },\n \"reps\": n => { putRoutinesRequestSet.reps = n.getNumberValue(); },\n \"type\": n => { putRoutinesRequestSet.type = n.getEnumValue<PutRoutinesRequestSet_type>(PutRoutinesRequestSet_typeObject); },\n \"weight_kg\": n => { putRoutinesRequestSet.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine(routine: Partial<Routine> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"created_at\": n => { routine.createdAt = n.getStringValue(); },\n \"exercises\": n => { routine.exercises = n.getCollectionOfObjectValues<Routine_exercises>(createRoutine_exercisesFromDiscriminatorValue); },\n \"folder_id\": n => { routine.folderId = n.getNumberValue(); },\n \"id\": n => { routine.id = n.getStringValue(); },\n \"title\": n => { routine.title = n.getStringValue(); },\n \"updated_at\": n => { routine.updatedAt = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine_exercises(routine_exercises: Partial<Routine_exercises> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { routine_exercises.exerciseTemplateId = n.getStringValue(); },\n \"index\": n => { routine_exercises.index = n.getNumberValue(); },\n \"notes\": n => { routine_exercises.notes = n.getStringValue(); },\n \"sets\": n => { routine_exercises.sets = n.getCollectionOfObjectValues<Routine_exercises_sets>(createRoutine_exercises_setsFromDiscriminatorValue); },\n \"supersets_id\": n => { routine_exercises.supersetsId = n.getNumberValue(); },\n \"title\": n => { routine_exercises.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine_exercises_sets(routine_exercises_sets: Partial<Routine_exercises_sets> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { routine_exercises_sets.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { routine_exercises_sets.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { routine_exercises_sets.durationSeconds = n.getNumberValue(); },\n \"index\": n => { routine_exercises_sets.index = n.getNumberValue(); },\n \"reps\": n => { routine_exercises_sets.reps = n.getNumberValue(); },\n \"rpe\": n => { routine_exercises_sets.rpe = n.getNumberValue(); },\n \"type\": n => { routine_exercises_sets.type = n.getStringValue(); },\n \"weight_kg\": n => { routine_exercises_sets.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutineFolder(routineFolder: Partial<RoutineFolder> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"created_at\": n => { routineFolder.createdAt = n.getStringValue(); },\n \"id\": n => { routineFolder.id = n.getNumberValue(); },\n \"index\": n => { routineFolder.index = n.getNumberValue(); },\n \"title\": n => { routineFolder.title = n.getStringValue(); },\n \"updated_at\": n => { routineFolder.updatedAt = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoUpdatedWorkout(updatedWorkout: Partial<UpdatedWorkout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"type\": n => { updatedWorkout.type = n.getStringValue(); },\n \"workout\": n => { updatedWorkout.workout = n.getObjectValue<Workout>(createWorkoutFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout(workout: Partial<Workout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"created_at\": n => { workout.createdAt = n.getStringValue(); },\n \"description\": n => { workout.description = n.getStringValue(); },\n \"end_time\": n => { workout.endTime = n.getNumberValue(); },\n \"exercises\": n => { workout.exercises = n.getCollectionOfObjectValues<Workout_exercises>(createWorkout_exercisesFromDiscriminatorValue); },\n \"id\": n => { workout.id = n.getStringValue(); },\n \"start_time\": n => { workout.startTime = n.getNumberValue(); },\n \"title\": n => { workout.title = n.getStringValue(); },\n \"updated_at\": n => { workout.updatedAt = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout_exercises(workout_exercises: Partial<Workout_exercises> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { workout_exercises.exerciseTemplateId = n.getStringValue(); },\n \"index\": n => { workout_exercises.index = n.getNumberValue(); },\n \"notes\": n => { workout_exercises.notes = n.getStringValue(); },\n \"sets\": n => { workout_exercises.sets = n.getCollectionOfObjectValues<Workout_exercises_sets>(createWorkout_exercises_setsFromDiscriminatorValue); },\n \"supersets_id\": n => { workout_exercises.supersetsId = n.getNumberValue(); },\n \"title\": n => { workout_exercises.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout_exercises_sets(workout_exercises_sets: Partial<Workout_exercises_sets> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { workout_exercises_sets.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { workout_exercises_sets.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { workout_exercises_sets.durationSeconds = n.getNumberValue(); },\n \"index\": n => { workout_exercises_sets.index = n.getNumberValue(); },\n \"reps\": n => { workout_exercises_sets.reps = n.getNumberValue(); },\n \"rpe\": n => { workout_exercises_sets.rpe = n.getNumberValue(); },\n \"type\": n => { workout_exercises_sets.type = n.getStringValue(); },\n \"weight_kg\": n => { workout_exercises_sets.weightKg = n.getNumberValue(); },\n }\n}\nexport interface ExerciseTemplate extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercise template ID.\n */\n id?: string | null;\n /**\n * A boolean indicating whether the exercise is a custom exercise.\n */\n isCustom?: boolean | null;\n /**\n * The primary muscle group of the exercise.\n */\n primaryMuscleGroup?: string | null;\n /**\n * The secondary muscle groups of the exercise.\n */\n secondaryMuscleGroups?: string[] | null;\n /**\n * The exercise title.\n */\n title?: string | null;\n /**\n * The exercise type.\n */\n type?: string | null;\n}\nexport interface PaginatedWorkoutEvents extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * An array of workout events (either updated or deleted)\n */\n events?: (DeletedWorkout | UpdatedWorkout)[] | null;\n /**\n * The current page number\n */\n page?: number | null;\n /**\n * The total number of pages available\n */\n pageCount?: number | null;\n}\nexport type PaginatedWorkoutEvents_events = DeletedWorkout | UpdatedWorkout;\nexport interface PostRoutineFolderRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The routine_folder property\n */\n routineFolder?: PostRoutineFolderRequestBody_routine_folder | null;\n}\nexport interface PostRoutineFolderRequestBody_routine_folder extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The title of the routine folder.\n */\n title?: string | null;\n}\nexport interface PostRoutinesRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The routine property\n */\n routine?: PostRoutinesRequestBody_routine | null;\n}\nexport interface PostRoutinesRequestBody_routine extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercises property\n */\n exercises?: PostRoutinesRequestExercise[] | null;\n /**\n * The folder id the routine should be added to. Pass null to insert the routine into default \"My Routines\" folder\n */\n folderId?: number | null;\n /**\n * Additional notes for the routine.\n */\n notes?: string | null;\n /**\n * The title of the routine.\n */\n title?: string | null;\n}\nexport interface PostRoutinesRequestExercise extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The ID of the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Additional notes for the exercise.\n */\n notes?: string | null;\n /**\n * The rest time in seconds.\n */\n restSeconds?: number | null;\n /**\n * The sets property\n */\n sets?: PostRoutinesRequestSet[] | null;\n /**\n * The ID of the superset.\n */\n supersetId?: number | null;\n}\nexport interface PostRoutinesRequestSet extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A custom metric for the set. Currently used for steps and floors.\n */\n customMetric?: number | null;\n /**\n * The distance in meters.\n */\n distanceMeters?: number | null;\n /**\n * The duration in seconds.\n */\n durationSeconds?: number | null;\n /**\n * The number of repetitions.\n */\n reps?: number | null;\n /**\n * The type of the set.\n */\n type?: PostRoutinesRequestSet_type | null;\n /**\n * The weight in kilograms.\n */\n weightKg?: number | null;\n}\nexport type PostRoutinesRequestSet_type = (typeof PostRoutinesRequestSet_typeObject)[keyof typeof PostRoutinesRequestSet_typeObject];\nexport interface PostWorkoutsRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The workout property\n */\n workout?: PostWorkoutsRequestBody_workout | null;\n}\nexport interface PostWorkoutsRequestBody_workout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A description for the workout workout.\n */\n description?: string | null;\n /**\n * The time the workout ended.\n */\n endTime?: string | null;\n /**\n * The exercises property\n */\n exercises?: PostWorkoutsRequestExercise[] | null;\n /**\n * A boolean indicating if the workout is private.\n */\n isPrivate?: boolean | null;\n /**\n * The time the workout started.\n */\n startTime?: string | null;\n /**\n * The title of the workout.\n */\n title?: string | null;\n}\nexport interface PostWorkoutsRequestExercise extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The ID of the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Additional notes for the exercise.\n */\n notes?: string | null;\n /**\n * The sets property\n */\n sets?: PostWorkoutsRequestSet[] | null;\n /**\n * The ID of the superset.\n */\n supersetId?: number | null;\n}\nexport interface PostWorkoutsRequestSet extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A custom metric for the set. Currently used for steps and floors.\n */\n customMetric?: number | null;\n /**\n * The distance in meters.\n */\n distanceMeters?: number | null;\n /**\n * The duration in seconds.\n */\n durationSeconds?: number | null;\n /**\n * The number of repetitions.\n */\n reps?: number | null;\n /**\n * The Rating of Perceived Exertion (RPE).\n */\n rpe?: number | null;\n /**\n * The type of the set.\n */\n type?: PostWorkoutsRequestSet_type | null;\n /**\n * The weight in kilograms.\n */\n weightKg?: number | null;\n}\nexport type PostWorkoutsRequestSet_type = (typeof PostWorkoutsRequestSet_typeObject)[keyof typeof PostWorkoutsRequestSet_typeObject];\nexport interface PutRoutinesRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The routine property\n */\n routine?: PutRoutinesRequestBody_routine | null;\n}\nexport interface PutRoutinesRequestBody_routine extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercises property\n */\n exercises?: PutRoutinesRequestExercise[] | null;\n /**\n * Additional notes for the routine.\n */\n notes?: string | null;\n /**\n * The title of the routine.\n */\n title?: string | null;\n}\nexport interface PutRoutinesRequestExercise extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The ID of the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Additional notes for the exercise.\n */\n notes?: string | null;\n /**\n * The rest time in seconds.\n */\n restSeconds?: number | null;\n /**\n * The sets property\n */\n sets?: PutRoutinesRequestSet[] | null;\n /**\n * The ID of the superset.\n */\n supersetId?: number | null;\n}\nexport interface PutRoutinesRequestSet extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A custom metric for the set. Currently used for steps and floors.\n */\n customMetric?: number | null;\n /**\n * The distance in meters.\n */\n distanceMeters?: number | null;\n /**\n * The duration in seconds.\n */\n durationSeconds?: number | null;\n /**\n * The number of repetitions.\n */\n reps?: number | null;\n /**\n * The type of the set.\n */\n type?: PutRoutinesRequestSet_type | null;\n /**\n * The weight in kilograms.\n */\n weightKg?: number | null;\n}\nexport type PutRoutinesRequestSet_type = (typeof PutRoutinesRequestSet_typeObject)[keyof typeof PutRoutinesRequestSet_typeObject];\nexport interface Routine extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * ISO 8601 timestamp of when the routine was created.\n */\n createdAt?: string | null;\n /**\n * The exercises property\n */\n exercises?: Routine_exercises[] | null;\n /**\n * The routine folder ID.\n */\n folderId?: number | null;\n /**\n * The routine ID.\n */\n id?: string | null;\n /**\n * The routine title.\n */\n title?: string | null;\n /**\n * ISO 8601 timestamp of when the routine was last updated.\n */\n updatedAt?: string | null;\n}\nexport interface Routine_exercises extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The id of the exercise template. This can be used to fetch the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Index indicating the order of the exercise in the routine.\n */\n index?: number | null;\n /**\n * Routine notes on the exercise\n */\n notes?: string | null;\n /**\n * The sets property\n */\n sets?: Routine_exercises_sets[] | null;\n /**\n * The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.\n */\n supersetsId?: number | null;\n /**\n * Title of the exercise\n */\n title?: string | null;\n}\nexport interface Routine_exercises_sets extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)\n */\n customMetric?: number | null;\n /**\n * Number of meters logged for the set\n */\n distanceMeters?: number | null;\n /**\n * Number of seconds logged for the set\n */\n durationSeconds?: number | null;\n /**\n * Index indicating the order of the set in the routine.\n */\n index?: number | null;\n /**\n * Number of reps logged for the set\n */\n reps?: number | null;\n /**\n * RPE (Relative perceived exertion) value logged for the set\n */\n rpe?: number | null;\n /**\n * The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'\n */\n type?: string | null;\n /**\n * Weight lifted in kilograms.\n */\n weightKg?: number | null;\n}\nexport interface RoutineFolder extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * ISO 8601 timestamp of when the folder was created.\n */\n createdAt?: string | null;\n /**\n * The routine folder ID.\n */\n id?: number | null;\n /**\n * The routine folder index. Describes the order of the folder in the list.\n */\n index?: number | null;\n /**\n * The routine folder title.\n */\n title?: string | null;\n /**\n * ISO 8601 timestamp of when the folder was last updated.\n */\n updatedAt?: string | null;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeDeletedWorkout(writer: SerializationWriter, deletedWorkout: Partial<DeletedWorkout> | undefined | null = {}) : void {\n if (deletedWorkout) {\n writer.writeStringValue(\"deleted_at\", deletedWorkout.deletedAt);\n writer.writeStringValue(\"id\", deletedWorkout.id);\n writer.writeStringValue(\"type\", deletedWorkout.type);\n writer.writeAdditionalData(deletedWorkout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeExerciseTemplate(writer: SerializationWriter, exerciseTemplate: Partial<ExerciseTemplate> | undefined | null = {}) : void {\n if (exerciseTemplate) {\n writer.writeStringValue(\"id\", exerciseTemplate.id);\n writer.writeBooleanValue(\"is_custom\", exerciseTemplate.isCustom);\n writer.writeStringValue(\"primary_muscle_group\", exerciseTemplate.primaryMuscleGroup);\n writer.writeCollectionOfPrimitiveValues<string>(\"secondary_muscle_groups\", exerciseTemplate.secondaryMuscleGroups);\n writer.writeStringValue(\"title\", exerciseTemplate.title);\n writer.writeStringValue(\"type\", exerciseTemplate.type);\n writer.writeAdditionalData(exerciseTemplate.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePaginatedWorkoutEvents(writer: SerializationWriter, paginatedWorkoutEvents: Partial<PaginatedWorkoutEvents> | undefined | null = {}) : void {\n if (paginatedWorkoutEvents) {\n writer.writeCollectionOfObjectValues<DeletedWorkout | UpdatedWorkout>(\"events\", paginatedWorkoutEvents.events, serializePaginatedWorkoutEvents_events);\n writer.writeNumberValue(\"page\", paginatedWorkoutEvents.page);\n writer.writeNumberValue(\"page_count\", paginatedWorkoutEvents.pageCount);\n writer.writeAdditionalData(paginatedWorkoutEvents.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePaginatedWorkoutEvents_events(writer: SerializationWriter, paginatedWorkoutEvents_events: Partial<DeletedWorkout | UpdatedWorkout> | undefined | null = {}) : void {\n serializeDeletedWorkout(writer, paginatedWorkoutEvents_events as DeletedWorkout);\n serializeUpdatedWorkout(writer, paginatedWorkoutEvents_events as UpdatedWorkout);\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutineFolderRequestBody(writer: SerializationWriter, postRoutineFolderRequestBody: Partial<PostRoutineFolderRequestBody> | undefined | null = {}) : void {\n if (postRoutineFolderRequestBody) {\n writer.writeObjectValue<PostRoutineFolderRequestBody_routine_folder>(\"routine_folder\", postRoutineFolderRequestBody.routineFolder, serializePostRoutineFolderRequestBody_routine_folder);\n writer.writeAdditionalData(postRoutineFolderRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutineFolderRequestBody_routine_folder(writer: SerializationWriter, postRoutineFolderRequestBody_routine_folder: Partial<PostRoutineFolderRequestBody_routine_folder> | undefined | null = {}) : void {\n if (postRoutineFolderRequestBody_routine_folder) {\n writer.writeStringValue(\"title\", postRoutineFolderRequestBody_routine_folder.title);\n writer.writeAdditionalData(postRoutineFolderRequestBody_routine_folder.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestBody(writer: SerializationWriter, postRoutinesRequestBody: Partial<PostRoutinesRequestBody> | undefined | null = {}) : void {\n if (postRoutinesRequestBody) {\n writer.writeObjectValue<PostRoutinesRequestBody_routine>(\"routine\", postRoutinesRequestBody.routine, serializePostRoutinesRequestBody_routine);\n writer.writeAdditionalData(postRoutinesRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestBody_routine(writer: SerializationWriter, postRoutinesRequestBody_routine: Partial<PostRoutinesRequestBody_routine> | undefined | null = {}) : void {\n if (postRoutinesRequestBody_routine) {\n writer.writeCollectionOfObjectValues<PostRoutinesRequestExercise>(\"exercises\", postRoutinesRequestBody_routine.exercises, serializePostRoutinesRequestExercise);\n writer.writeNumberValue(\"folder_id\", postRoutinesRequestBody_routine.folderId);\n writer.writeStringValue(\"notes\", postRoutinesRequestBody_routine.notes);\n writer.writeStringValue(\"title\", postRoutinesRequestBody_routine.title);\n writer.writeAdditionalData(postRoutinesRequestBody_routine.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestExercise(writer: SerializationWriter, postRoutinesRequestExercise: Partial<PostRoutinesRequestExercise> | undefined | null = {}) : void {\n if (postRoutinesRequestExercise) {\n writer.writeStringValue(\"exercise_template_id\", postRoutinesRequestExercise.exerciseTemplateId);\n writer.writeStringValue(\"notes\", postRoutinesRequestExercise.notes);\n writer.writeNumberValue(\"rest_seconds\", postRoutinesRequestExercise.restSeconds);\n writer.writeCollectionOfObjectValues<PostRoutinesRequestSet>(\"sets\", postRoutinesRequestExercise.sets, serializePostRoutinesRequestSet);\n writer.writeNumberValue(\"superset_id\", postRoutinesRequestExercise.supersetId);\n writer.writeAdditionalData(postRoutinesRequestExercise.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestSet(writer: SerializationWriter, postRoutinesRequestSet: Partial<PostRoutinesRequestSet> | undefined | null = {}) : void {\n if (postRoutinesRequestSet) {\n writer.writeNumberValue(\"custom_metric\", postRoutinesRequestSet.customMetric);\n writer.writeNumberValue(\"distance_meters\", postRoutinesRequestSet.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", postRoutinesRequestSet.durationSeconds);\n writer.writeNumberValue(\"reps\", postRoutinesRequestSet.reps);\n writer.writeEnumValue<PostRoutinesRequestSet_type>(\"type\", postRoutinesRequestSet.type);\n writer.writeNumberValue(\"weight_kg\", postRoutinesRequestSet.weightKg);\n writer.writeAdditionalData(postRoutinesRequestSet.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestBody(writer: SerializationWriter, postWorkoutsRequestBody: Partial<PostWorkoutsRequestBody> | undefined | null = {}) : void {\n if (postWorkoutsRequestBody) {\n writer.writeObjectValue<PostWorkoutsRequestBody_workout>(\"workout\", postWorkoutsRequestBody.workout, serializePostWorkoutsRequestBody_workout);\n writer.writeAdditionalData(postWorkoutsRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestBody_workout(writer: SerializationWriter, postWorkoutsRequestBody_workout: Partial<PostWorkoutsRequestBody_workout> | undefined | null = {}) : void {\n if (postWorkoutsRequestBody_workout) {\n writer.writeStringValue(\"description\", postWorkoutsRequestBody_workout.description);\n writer.writeStringValue(\"end_time\", postWorkoutsRequestBody_workout.endTime);\n writer.writeCollectionOfObjectValues<PostWorkoutsRequestExercise>(\"exercises\", postWorkoutsRequestBody_workout.exercises, serializePostWorkoutsRequestExercise);\n writer.writeBooleanValue(\"is_private\", postWorkoutsRequestBody_workout.isPrivate);\n writer.writeStringValue(\"start_time\", postWorkoutsRequestBody_workout.startTime);\n writer.writeStringValue(\"title\", postWorkoutsRequestBody_workout.title);\n writer.writeAdditionalData(postWorkoutsRequestBody_workout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestExercise(writer: SerializationWriter, postWorkoutsRequestExercise: Partial<PostWorkoutsRequestExercise> | undefined | null = {}) : void {\n if (postWorkoutsRequestExercise) {\n writer.writeStringValue(\"exercise_template_id\", postWorkoutsRequestExercise.exerciseTemplateId);\n writer.writeStringValue(\"notes\", postWorkoutsRequestExercise.notes);\n writer.writeCollectionOfObjectValues<PostWorkoutsRequestSet>(\"sets\", postWorkoutsRequestExercise.sets, serializePostWorkoutsRequestSet);\n writer.writeNumberValue(\"superset_id\", postWorkoutsRequestExercise.supersetId);\n writer.writeAdditionalData(postWorkoutsRequestExercise.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestSet(writer: SerializationWriter, postWorkoutsRequestSet: Partial<PostWorkoutsRequestSet> | undefined | null = {}) : void {\n if (postWorkoutsRequestSet) {\n writer.writeNumberValue(\"custom_metric\", postWorkoutsRequestSet.customMetric);\n writer.writeNumberValue(\"distance_meters\", postWorkoutsRequestSet.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", postWorkoutsRequestSet.durationSeconds);\n writer.writeNumberValue(\"reps\", postWorkoutsRequestSet.reps);\n writer.writeNumberValue(\"rpe\", postWorkoutsRequestSet.rpe);\n writer.writeEnumValue<PostWorkoutsRequestSet_type>(\"type\", postWorkoutsRequestSet.type);\n writer.writeNumberValue(\"weight_kg\", postWorkoutsRequestSet.weightKg);\n writer.writeAdditionalData(postWorkoutsRequestSet.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestBody(writer: SerializationWriter, putRoutinesRequestBody: Partial<PutRoutinesRequestBody> | undefined | null = {}) : void {\n if (putRoutinesRequestBody) {\n writer.writeObjectValue<PutRoutinesRequestBody_routine>(\"routine\", putRoutinesRequestBody.routine, serializePutRoutinesRequestBody_routine);\n writer.writeAdditionalData(putRoutinesRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestBody_routine(writer: SerializationWriter, putRoutinesRequestBody_routine: Partial<PutRoutinesRequestBody_routine> | undefined | null = {}) : void {\n if (putRoutinesRequestBody_routine) {\n writer.writeCollectionOfObjectValues<PutRoutinesRequestExercise>(\"exercises\", putRoutinesRequestBody_routine.exercises, serializePutRoutinesRequestExercise);\n writer.writeStringValue(\"notes\", putRoutinesRequestBody_routine.notes);\n writer.writeStringValue(\"title\", putRoutinesRequestBody_routine.title);\n writer.writeAdditionalData(putRoutinesRequestBody_routine.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestExercise(writer: SerializationWriter, putRoutinesRequestExercise: Partial<PutRoutinesRequestExercise> | undefined | null = {}) : void {\n if (putRoutinesRequestExercise) {\n writer.writeStringValue(\"exercise_template_id\", putRoutinesRequestExercise.exerciseTemplateId);\n writer.writeStringValue(\"notes\", putRoutinesRequestExercise.notes);\n writer.writeNumberValue(\"rest_seconds\", putRoutinesRequestExercise.restSeconds);\n writer.writeCollectionOfObjectValues<PutRoutinesRequestSet>(\"sets\", putRoutinesRequestExercise.sets, serializePutRoutinesRequestSet);\n writer.writeNumberValue(\"superset_id\", putRoutinesRequestExercise.supersetId);\n writer.writeAdditionalData(putRoutinesRequestExercise.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestSet(writer: SerializationWriter, putRoutinesRequestSet: Partial<PutRoutinesRequestSet> | undefined | null = {}) : void {\n if (putRoutinesRequestSet) {\n writer.writeNumberValue(\"custom_metric\", putRoutinesRequestSet.customMetric);\n writer.writeNumberValue(\"distance_meters\", putRoutinesRequestSet.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", putRoutinesRequestSet.durationSeconds);\n writer.writeNumberValue(\"reps\", putRoutinesRequestSet.reps);\n writer.writeEnumValue<PutRoutinesRequestSet_type>(\"type\", putRoutinesRequestSet.type);\n writer.writeNumberValue(\"weight_kg\", putRoutinesRequestSet.weightKg);\n writer.writeAdditionalData(putRoutinesRequestSet.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine(writer: SerializationWriter, routine: Partial<Routine> | undefined | null = {}) : void {\n if (routine) {\n writer.writeStringValue(\"created_at\", routine.createdAt);\n writer.writeCollectionOfObjectValues<Routine_exercises>(\"exercises\", routine.exercises, serializeRoutine_exercises);\n writer.writeNumberValue(\"folder_id\", routine.folderId);\n writer.writeStringValue(\"id\", routine.id);\n writer.writeStringValue(\"title\", routine.title);\n writer.writeStringValue(\"updated_at\", routine.updatedAt);\n writer.writeAdditionalData(routine.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine_exercises(writer: SerializationWriter, routine_exercises: Partial<Routine_exercises> | undefined | null = {}) : void {\n if (routine_exercises) {\n writer.writeStringValue(\"exercise_template_id\", routine_exercises.exerciseTemplateId);\n writer.writeNumberValue(\"index\", routine_exercises.index);\n writer.writeStringValue(\"notes\", routine_exercises.notes);\n writer.writeCollectionOfObjectValues<Routine_exercises_sets>(\"sets\", routine_exercises.sets, serializeRoutine_exercises_sets);\n writer.writeNumberValue(\"supersets_id\", routine_exercises.supersetsId);\n writer.writeStringValue(\"title\", routine_exercises.title);\n writer.writeAdditionalData(routine_exercises.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine_exercises_sets(writer: SerializationWriter, routine_exercises_sets: Partial<Routine_exercises_sets> | undefined | null = {}) : void {\n if (routine_exercises_sets) {\n writer.writeNumberValue(\"custom_metric\", routine_exercises_sets.customMetric);\n writer.writeNumberValue(\"distance_meters\", routine_exercises_sets.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", routine_exercises_sets.durationSeconds);\n writer.writeNumberValue(\"index\", routine_exercises_sets.index);\n writer.writeNumberValue(\"reps\", routine_exercises_sets.reps);\n writer.writeNumberValue(\"rpe\", routine_exercises_sets.rpe);\n writer.writeStringValue(\"type\", routine_exercises_sets.type);\n writer.writeNumberValue(\"weight_kg\", routine_exercises_sets.weightKg);\n writer.writeAdditionalData(routine_exercises_sets.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutineFolder(writer: SerializationWriter, routineFolder: Partial<RoutineFolder> | undefined | null = {}) : void {\n if (routineFolder) {\n writer.writeStringValue(\"created_at\", routineFolder.createdAt);\n writer.writeNumberValue(\"id\", routineFolder.id);\n writer.writeNumberValue(\"index\", routineFolder.index);\n writer.writeStringValue(\"title\", routineFolder.title);\n writer.writeStringValue(\"updated_at\", routineFolder.updatedAt);\n writer.writeAdditionalData(routineFolder.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeUpdatedWorkout(writer: SerializationWriter, updatedWorkout: Partial<UpdatedWorkout> | undefined | null = {}) : void {\n if (updatedWorkout) {\n writer.writeStringValue(\"type\", updatedWorkout.type);\n writer.writeObjectValue<Workout>(\"workout\", updatedWorkout.workout, serializeWorkout);\n writer.writeAdditionalData(updatedWorkout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout(writer: SerializationWriter, workout: Partial<Workout> | undefined | null = {}) : void {\n if (workout) {\n writer.writeStringValue(\"created_at\", workout.createdAt);\n writer.writeStringValue(\"description\", workout.description);\n writer.writeNumberValue(\"end_time\", workout.endTime);\n writer.writeCollectionOfObjectValues<Workout_exercises>(\"exercises\", workout.exercises, serializeWorkout_exercises);\n writer.writeStringValue(\"id\", workout.id);\n writer.writeNumberValue(\"start_time\", workout.startTime);\n writer.writeStringValue(\"title\", workout.title);\n writer.writeStringValue(\"updated_at\", workout.updatedAt);\n writer.writeAdditionalData(workout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout_exercises(writer: SerializationWriter, workout_exercises: Partial<Workout_exercises> | undefined | null = {}) : void {\n if (workout_exercises) {\n writer.writeStringValue(\"exercise_template_id\", workout_exercises.exerciseTemplateId);\n writer.writeNumberValue(\"index\", workout_exercises.index);\n writer.writeStringValue(\"notes\", workout_exercises.notes);\n writer.writeCollectionOfObjectValues<Workout_exercises_sets>(\"sets\", workout_exercises.sets, serializeWorkout_exercises_sets);\n writer.writeNumberValue(\"supersets_id\", workout_exercises.supersetsId);\n writer.writeStringValue(\"title\", workout_exercises.title);\n writer.writeAdditionalData(workout_exercises.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout_exercises_sets(writer: SerializationWriter, workout_exercises_sets: Partial<Workout_exercises_sets> | undefined | null = {}) : void {\n if (workout_exercises_sets) {\n writer.writeNumberValue(\"custom_metric\", workout_exercises_sets.customMetric);\n writer.writeNumberValue(\"distance_meters\", workout_exercises_sets.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", workout_exercises_sets.durationSeconds);\n writer.writeNumberValue(\"index\", workout_exercises_sets.index);\n writer.writeNumberValue(\"reps\", workout_exercises_sets.reps);\n writer.writeNumberValue(\"rpe\", workout_exercises_sets.rpe);\n writer.writeStringValue(\"type\", workout_exercises_sets.type);\n writer.writeNumberValue(\"weight_kg\", workout_exercises_sets.weightKg);\n writer.writeAdditionalData(workout_exercises_sets.additionalData);\n }\n}\nexport interface UpdatedWorkout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Indicates the type of the event (updated)\n */\n type?: string | null;\n /**\n * The workout property\n */\n workout?: Workout | null;\n}\nexport interface Workout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * ISO 8601 timestamp of when the workout was created.\n */\n createdAt?: string | null;\n /**\n * The workout description.\n */\n description?: string | null;\n /**\n * ISO 8601 timestamp of when the workout was recorded to have ended.\n */\n endTime?: number | null;\n /**\n * The exercises property\n */\n exercises?: Workout_exercises[] | null;\n /**\n * The workout ID.\n */\n id?: string | null;\n /**\n * ISO 8601 timestamp of when the workout was recorded to have started.\n */\n startTime?: number | null;\n /**\n * The workout title.\n */\n title?: string | null;\n /**\n * ISO 8601 timestamp of when the workout was last updated.\n */\n updatedAt?: string | null;\n}\nexport interface Workout_exercises extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The id of the exercise template. This can be used to fetch the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Index indicating the order of the exercise in the workout.\n */\n index?: number | null;\n /**\n * Notes on the exercise\n */\n notes?: string | null;\n /**\n * The sets property\n */\n sets?: Workout_exercises_sets[] | null;\n /**\n * The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.\n */\n supersetsId?: number | null;\n /**\n * Title of the exercise\n */\n title?: string | null;\n}\nexport interface Workout_exercises_sets extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)\n */\n customMetric?: number | null;\n /**\n * Number of meters logged for the set\n */\n distanceMeters?: number | null;\n /**\n * Number of seconds logged for the set\n */\n durationSeconds?: number | null;\n /**\n * Index indicating the order of the set in the workout.\n */\n index?: number | null;\n /**\n * Number of reps logged for the set\n */\n reps?: number | null;\n /**\n * RPE (Relative perceived exertion) value logged for the set\n */\n rpe?: number | null;\n /**\n * The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'\n */\n type?: string | null;\n /**\n * Weight lifted in kilograms.\n */\n weightKg?: number | null;\n}\n/**\n * The type of the set.\n */\nexport const PostRoutinesRequestSet_typeObject = {\n Warmup: \"warmup\",\n Normal: \"normal\",\n Failure: \"failure\",\n Dropset: \"dropset\",\n} as const;\n/**\n * The type of the set.\n */\nexport const PostWorkoutsRequestSet_typeObject = {\n Warmup: \"warmup\",\n Normal: \"normal\",\n Failure: \"failure\",\n Dropset: \"dropset\",\n} as const;\n/**\n * The type of the set.\n */\nexport const PutRoutinesRequestSet_typeObject = {\n Warmup: \"warmup\",\n Normal: \"normal\",\n Failure: \"failure\",\n Dropset: \"dropset\",\n} as const;\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createExerciseTemplateFromDiscriminatorValue, type ExerciseTemplate } from '../../../models/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1/exercise_templates/{exerciseTemplateId}\n */\nexport interface WithExerciseTemplateItemRequestBuilder extends BaseRequestBuilder<WithExerciseTemplateItemRequestBuilder> {\n /**\n * Get a single exercise template by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<ExerciseTemplate>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ExerciseTemplate | undefined>;\n /**\n * Get a single exercise template by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithExerciseTemplateItemRequestBuilderUriTemplate = \"{+baseurl}/v1/exercise_templates/{exerciseTemplateId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithExerciseTemplateItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WithExerciseTemplateItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createExerciseTemplateFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createExerciseTemplateFromDiscriminatorValue, serializeExerciseTemplate, type ExerciseTemplate } from '../../models/index.js';\n// @ts-ignore\nimport { type WithExerciseTemplateItemRequestBuilder, WithExerciseTemplateItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Exercise_templatesGetResponse}\n */\n// @ts-ignore\nexport function createExercise_templatesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoExercise_templatesGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoExercise_templatesGetResponse(exercise_templatesGetResponse: Partial<Exercise_templatesGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_templates\": n => { exercise_templatesGetResponse.exerciseTemplates = n.getCollectionOfObjectValues<ExerciseTemplate>(createExerciseTemplateFromDiscriminatorValue); },\n \"page\": n => { exercise_templatesGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { exercise_templatesGetResponse.pageCount = n.getNumberValue(); },\n }\n}\nexport interface Exercise_templatesGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercise_templates property\n */\n exerciseTemplates?: ExerciseTemplate[] | null;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n}\n/**\n * Builds and executes requests for operations under /v1/exercise_templates\n */\nexport interface Exercise_templatesRequestBuilder extends BaseRequestBuilder<Exercise_templatesRequestBuilder> {\n /**\n * Gets an item from the ApiSdk.v1.exercise_templates.item collection\n * @param exerciseTemplateId The id of the exercise template\n * @returns {WithExerciseTemplateItemRequestBuilder}\n */\n byExerciseTemplateId(exerciseTemplateId: string) : WithExerciseTemplateItemRequestBuilder;\n /**\n * Get a paginated list of exercise templates available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Exercise_templatesGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<Exercise_templatesRequestBuilderGetQueryParameters> | undefined) : Promise<Exercise_templatesGetResponse | undefined>;\n /**\n * Get a paginated list of exercise templates available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<Exercise_templatesRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of exercise templates available on the account.\n */\nexport interface Exercise_templatesRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 100)\n */\n pageSize?: number;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeExercise_templatesGetResponse(writer: SerializationWriter, exercise_templatesGetResponse: Partial<Exercise_templatesGetResponse> | undefined | null = {}) : void {\n if (exercise_templatesGetResponse) {\n writer.writeCollectionOfObjectValues<ExerciseTemplate>(\"exercise_templates\", exercise_templatesGetResponse.exerciseTemplates, serializeExerciseTemplate);\n writer.writeNumberValue(\"page\", exercise_templatesGetResponse.page);\n writer.writeNumberValue(\"page_count\", exercise_templatesGetResponse.pageCount);\n writer.writeAdditionalData(exercise_templatesGetResponse.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const Exercise_templatesRequestBuilderUriTemplate = \"{+baseurl}/v1/exercise_templates{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const Exercise_templatesRequestBuilderNavigationMetadata: Record<Exclude<keyof Exercise_templatesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byExerciseTemplateId: {\n requestsMetadata: WithExerciseTemplateItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"exerciseTemplateId\"],\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const Exercise_templatesRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: Exercise_templatesRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createExercise_templatesGetResponseFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFolderFromDiscriminatorValue, type RoutineFolder } from '../../../models/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1/routine_folders/{folderId}\n */\nexport interface WithFolderItemRequestBuilder extends BaseRequestBuilder<WithFolderItemRequestBuilder> {\n /**\n * Get a single routine folder by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<RoutineFolder>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<RoutineFolder | undefined>;\n /**\n * Get a single routine folder by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithFolderItemRequestBuilderUriTemplate = \"{+baseurl}/v1/routine_folders/{folderId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithFolderItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WithFolderItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFolderFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFolderFromDiscriminatorValue, serializePostRoutineFolderRequestBody, serializeRoutineFolder, type PostRoutineFolderRequestBody, type RoutineFolder } from '../../models/index.js';\n// @ts-ignore\nimport { type WithFolderItemRequestBuilder, WithFolderItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine_foldersGetResponse}\n */\n// @ts-ignore\nexport function createRoutine_foldersGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine_foldersGetResponse;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {RoutineFolder400Error}\n */\n// @ts-ignore\nexport function createRoutineFolder400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutineFolder400Error;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine_foldersGetResponse(routine_foldersGetResponse: Partial<Routine_foldersGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"page\": n => { routine_foldersGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { routine_foldersGetResponse.pageCount = n.getNumberValue(); },\n \"routine_folders\": n => { routine_foldersGetResponse.routineFolders = n.getCollectionOfObjectValues<RoutineFolder>(createRoutineFolderFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutineFolder400Error(routineFolder400Error: Partial<RoutineFolder400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routineFolder400Error.errorEscaped = n.getStringValue(); },\n }\n}\nexport interface Routine_foldersGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n /**\n * The routine_folders property\n */\n routineFolders?: RoutineFolder[] | null;\n}\n/**\n * Builds and executes requests for operations under /v1/routine_folders\n */\nexport interface Routine_foldersRequestBuilder extends BaseRequestBuilder<Routine_foldersRequestBuilder> {\n /**\n * Gets an item from the ApiSdk.v1.routine_folders.item collection\n * @param folderId The id of the routine folder\n * @returns {WithFolderItemRequestBuilder}\n */\n byFolderId(folderId: string) : WithFolderItemRequestBuilder;\n /**\n * Get a paginated list of routine folders available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Routine_foldersGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<Routine_foldersRequestBuilderGetQueryParameters> | undefined) : Promise<Routine_foldersGetResponse | undefined>;\n /**\n * Create a new routine folder. The folder will be created at index 0, and all other folders will have their indexes incremented.\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<RoutineFolder>}\n * @throws {RoutineFolder400Error} error when the service returns a 400 status code\n */\n post(body: PostRoutineFolderRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<RoutineFolder | undefined>;\n /**\n * Get a paginated list of routine folders available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<Routine_foldersRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n /**\n * Create a new routine folder. The folder will be created at index 0, and all other folders will have their indexes incremented.\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPostRequestInformation(body: PostRoutineFolderRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of routine folders available on the account.\n */\nexport interface Routine_foldersRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n}\nexport interface RoutineFolder400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine_foldersGetResponse(writer: SerializationWriter, routine_foldersGetResponse: Partial<Routine_foldersGetResponse> | undefined | null = {}) : void {\n if (routine_foldersGetResponse) {\n writer.writeNumberValue(\"page\", routine_foldersGetResponse.page);\n writer.writeNumberValue(\"page_count\", routine_foldersGetResponse.pageCount);\n writer.writeCollectionOfObjectValues<RoutineFolder>(\"routine_folders\", routine_foldersGetResponse.routineFolders, serializeRoutineFolder);\n writer.writeAdditionalData(routine_foldersGetResponse.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutineFolder400Error(writer: SerializationWriter, routineFolder400Error: Partial<RoutineFolder400Error> | undefined | null = {}) : void {\n if (routineFolder400Error) {\n writer.writeStringValue(\"error\", routineFolder400Error.errorEscaped);\n writer.writeAdditionalData(routineFolder400Error.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const Routine_foldersRequestBuilderUriTemplate = \"{+baseurl}/v1/routine_folders{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const Routine_foldersRequestBuilderNavigationMetadata: Record<Exclude<keyof Routine_foldersRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byFolderId: {\n requestsMetadata: WithFolderItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"folderId\"],\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const Routine_foldersRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: Routine_foldersRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutine_foldersGetResponseFromDiscriminatorValue,\n },\n post: {\n uriTemplate: Routine_foldersRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createRoutineFolder400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFolderFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostRoutineFolderRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFromDiscriminatorValue, serializePutRoutinesRequestBody, serializeRoutine, type PutRoutinesRequestBody, type Routine } from '../../../models/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine400Error}\n */\n// @ts-ignore\nexport function createRoutine400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine400Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine404Error}\n */\n// @ts-ignore\nexport function createRoutine404ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine404Error;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine400Error(routine400Error: Partial<Routine400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine404Error(routine404Error: Partial<Routine404Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine404Error.errorEscaped = n.getStringValue(); },\n }\n}\nexport interface Routine400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface Routine404Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine400Error(writer: SerializationWriter, routine400Error: Partial<Routine400Error> | undefined | null = {}) : void {\n if (routine400Error) {\n writer.writeStringValue(\"error\", routine400Error.errorEscaped);\n writer.writeAdditionalData(routine400Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine404Error(writer: SerializationWriter, routine404Error: Partial<Routine404Error> | undefined | null = {}) : void {\n if (routine404Error) {\n writer.writeStringValue(\"error\", routine404Error.errorEscaped);\n writer.writeAdditionalData(routine404Error.additionalData);\n }\n}\n/**\n * Builds and executes requests for operations under /v1/routines/{routineId}\n */\nexport interface WithRoutineItemRequestBuilder extends BaseRequestBuilder<WithRoutineItemRequestBuilder> {\n /**\n * Update an existing routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Routine>}\n * @throws {Routine400Error} error when the service returns a 400 status code\n * @throws {Routine404Error} error when the service returns a 404 status code\n */\n put(body: PutRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Routine | undefined>;\n /**\n * Update an existing routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPutRequestInformation(body: PutRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithRoutineItemRequestBuilderUriTemplate = \"{+baseurl}/v1/routines/{routineId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithRoutineItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n put: {\n uriTemplate: WithRoutineItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createRoutine400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n 404: createRoutine404ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePutRoutinesRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFromDiscriminatorValue, serializePostRoutinesRequestBody, serializeRoutine, type PostRoutinesRequestBody, type Routine } from '../../models/index.js';\n// @ts-ignore\nimport { type WithRoutineItemRequestBuilder, WithRoutineItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine400Error}\n */\n// @ts-ignore\nexport function createRoutine400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine400Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine403Error}\n */\n// @ts-ignore\nexport function createRoutine403ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine403Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {RoutinesGetResponse}\n */\n// @ts-ignore\nexport function createRoutinesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutinesGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine400Error(routine400Error: Partial<Routine400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine403Error(routine403Error: Partial<Routine403Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine403Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutinesGetResponse(routinesGetResponse: Partial<RoutinesGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"page\": n => { routinesGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { routinesGetResponse.pageCount = n.getNumberValue(); },\n \"routines\": n => { routinesGetResponse.routines = n.getCollectionOfObjectValues<Routine>(createRoutineFromDiscriminatorValue); },\n }\n}\nexport interface Routine400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface Routine403Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface RoutinesGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n /**\n * The routines property\n */\n routines?: Routine[] | null;\n}\n/**\n * Builds and executes requests for operations under /v1/routines\n */\nexport interface RoutinesRequestBuilder extends BaseRequestBuilder<RoutinesRequestBuilder> {\n /**\n * Gets an item from the ApiSdk.v1.routines.item collection\n * @param routineId The id of the routine\n * @returns {WithRoutineItemRequestBuilder}\n */\n byRoutineId(routineId: string) : WithRoutineItemRequestBuilder;\n /**\n * Get a paginated list of routines\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<RoutinesGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<RoutinesRequestBuilderGetQueryParameters> | undefined) : Promise<RoutinesGetResponse | undefined>;\n /**\n * Create a new routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Routine>}\n * @throws {Routine400Error} error when the service returns a 400 status code\n * @throws {Routine403Error} error when the service returns a 403 status code\n */\n post(body: PostRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Routine | undefined>;\n /**\n * Get a paginated list of routines\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<RoutinesRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n /**\n * Create a new routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPostRequestInformation(body: PostRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of routines\n */\nexport interface RoutinesRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine400Error(writer: SerializationWriter, routine400Error: Partial<Routine400Error> | undefined | null = {}) : void {\n if (routine400Error) {\n writer.writeStringValue(\"error\", routine400Error.errorEscaped);\n writer.writeAdditionalData(routine400Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine403Error(writer: SerializationWriter, routine403Error: Partial<Routine403Error> | undefined | null = {}) : void {\n if (routine403Error) {\n writer.writeStringValue(\"error\", routine403Error.errorEscaped);\n writer.writeAdditionalData(routine403Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutinesGetResponse(writer: SerializationWriter, routinesGetResponse: Partial<RoutinesGetResponse> | undefined | null = {}) : void {\n if (routinesGetResponse) {\n writer.writeNumberValue(\"page\", routinesGetResponse.page);\n writer.writeNumberValue(\"page_count\", routinesGetResponse.pageCount);\n writer.writeCollectionOfObjectValues<Routine>(\"routines\", routinesGetResponse.routines, serializeRoutine);\n writer.writeAdditionalData(routinesGetResponse.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const RoutinesRequestBuilderUriTemplate = \"{+baseurl}/v1/routines{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const RoutinesRequestBuilderNavigationMetadata: Record<Exclude<keyof RoutinesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byRoutineId: {\n requestsMetadata: WithRoutineItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"routineId\"],\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const RoutinesRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: RoutinesRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutinesGetResponseFromDiscriminatorValue,\n },\n post: {\n uriTemplate: RoutinesRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createRoutine400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n 403: createRoutine403ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostRoutinesRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { type AdditionalDataHolder, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\nexport interface CountGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The total number of workouts\n */\n workoutCount?: number | null;\n}\n/**\n * Builds and executes requests for operations under /v1/workouts/count\n */\nexport interface CountRequestBuilder extends BaseRequestBuilder<CountRequestBuilder> {\n /**\n * Get the total number of workouts on the account\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<CountGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<CountGetResponse | undefined>;\n /**\n * Get the total number of workouts on the account\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {CountGetResponse}\n */\n// @ts-ignore\nexport function createCountGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoCountGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoCountGetResponse(countGetResponse: Partial<CountGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"workout_count\": n => { countGetResponse.workoutCount = n.getNumberValue(); },\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeCountGetResponse(writer: SerializationWriter, countGetResponse: Partial<CountGetResponse> | undefined | null = {}) : void {\n if (countGetResponse) {\n writer.writeNumberValue(\"workout_count\", countGetResponse.workoutCount);\n writer.writeAdditionalData(countGetResponse.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const CountRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts/count\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const CountRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: CountRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createCountGetResponseFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createPaginatedWorkoutEventsFromDiscriminatorValue, type PaginatedWorkoutEvents } from '../../../models/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1/workouts/events\n */\nexport interface EventsRequestBuilder extends BaseRequestBuilder<EventsRequestBuilder> {\n /**\n * Returns a paginated array of workout events, indicating updates or deletions.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<PaginatedWorkoutEvents>}\n */\n get(requestConfiguration?: RequestConfiguration<EventsRequestBuilderGetQueryParameters> | undefined) : Promise<PaginatedWorkoutEvents | undefined>;\n /**\n * Returns a paginated array of workout events, indicating updates or deletions.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<EventsRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n}\n/**\n * Returns a paginated array of workout events, indicating updates or deletions.\n */\nexport interface EventsRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n since?: string;\n}\n/**\n * Uri template for the request builder.\n */\nexport const EventsRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts/events{?page*,pageSize*,since*}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const EventsRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: EventsRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createPaginatedWorkoutEventsFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createWorkoutFromDiscriminatorValue, serializePostWorkoutsRequestBody, serializeWorkout, type PostWorkoutsRequestBody, type Workout } from '../../../models/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout400Error}\n */\n// @ts-ignore\nexport function createWorkout400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout400Error;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout400Error(workout400Error: Partial<Workout400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { workout400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout400Error(writer: SerializationWriter, workout400Error: Partial<Workout400Error> | undefined | null = {}) : void {\n if (workout400Error) {\n writer.writeStringValue(\"error\", workout400Error.errorEscaped);\n writer.writeAdditionalData(workout400Error.additionalData);\n }\n}\n/**\n * Builds and executes requests for operations under /v1/workouts/{workoutId}\n */\nexport interface WithWorkoutItemRequestBuilder extends BaseRequestBuilder<WithWorkoutItemRequestBuilder> {\n /**\n * Get a single workout’s complete details by the workoutId\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Workout>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Workout | undefined>;\n /**\n * Update an existing workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Workout>}\n * @throws {Workout400Error} error when the service returns a 400 status code\n */\n put(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Workout | undefined>;\n /**\n * Get a single workout’s complete details by the workoutId\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n /**\n * Update an existing workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPutRequestInformation(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\nexport interface Workout400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithWorkoutItemRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts/{workoutId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithWorkoutItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WithWorkoutItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutFromDiscriminatorValue,\n },\n put: {\n uriTemplate: WithWorkoutItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createWorkout400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostWorkoutsRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createWorkoutFromDiscriminatorValue, serializePostWorkoutsRequestBody, serializeWorkout, type PostWorkoutsRequestBody, type Workout } from '../../models/index.js';\n// @ts-ignore\nimport { CountRequestBuilderRequestsMetadata, type CountRequestBuilder } from './count/index.js';\n// @ts-ignore\nimport { EventsRequestBuilderRequestsMetadata, type EventsRequestBuilder } from './events/index.js';\n// @ts-ignore\nimport { type WithWorkoutItemRequestBuilder, WithWorkoutItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout400Error}\n */\n// @ts-ignore\nexport function createWorkout400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout400Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {WorkoutsGetResponse}\n */\n// @ts-ignore\nexport function createWorkoutsGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkoutsGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout400Error(workout400Error: Partial<Workout400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { workout400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkoutsGetResponse(workoutsGetResponse: Partial<WorkoutsGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"page\": n => { workoutsGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { workoutsGetResponse.pageCount = n.getNumberValue(); },\n \"workouts\": n => { workoutsGetResponse.workouts = n.getCollectionOfObjectValues<Workout>(createWorkoutFromDiscriminatorValue); },\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout400Error(writer: SerializationWriter, workout400Error: Partial<Workout400Error> | undefined | null = {}) : void {\n if (workout400Error) {\n writer.writeStringValue(\"error\", workout400Error.errorEscaped);\n writer.writeAdditionalData(workout400Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkoutsGetResponse(writer: SerializationWriter, workoutsGetResponse: Partial<WorkoutsGetResponse> | undefined | null = {}) : void {\n if (workoutsGetResponse) {\n writer.writeNumberValue(\"page\", workoutsGetResponse.page);\n writer.writeNumberValue(\"page_count\", workoutsGetResponse.pageCount);\n writer.writeCollectionOfObjectValues<Workout>(\"workouts\", workoutsGetResponse.workouts, serializeWorkout);\n writer.writeAdditionalData(workoutsGetResponse.additionalData);\n }\n}\nexport interface Workout400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface WorkoutsGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n /**\n * The workouts property\n */\n workouts?: Workout[] | null;\n}\n/**\n * Builds and executes requests for operations under /v1/workouts\n */\nexport interface WorkoutsRequestBuilder extends BaseRequestBuilder<WorkoutsRequestBuilder> {\n /**\n * The count property\n */\n get count(): CountRequestBuilder;\n /**\n * The events property\n */\n get events(): EventsRequestBuilder;\n /**\n * Gets an item from the ApiSdk.v1.workouts.item collection\n * @param workoutId The id of the workout\n * @returns {WithWorkoutItemRequestBuilder}\n */\n byWorkoutId(workoutId: string) : WithWorkoutItemRequestBuilder;\n /**\n * Get a paginated list of workouts\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<WorkoutsGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<WorkoutsRequestBuilderGetQueryParameters> | undefined) : Promise<WorkoutsGetResponse | undefined>;\n /**\n * Create a new workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Workout>}\n * @throws {Workout400Error} error when the service returns a 400 status code\n */\n post(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Workout | undefined>;\n /**\n * Get a paginated list of workouts\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<WorkoutsRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n /**\n * Create a new workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPostRequestInformation(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of workouts\n */\nexport interface WorkoutsRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WorkoutsRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const WorkoutsRequestBuilderNavigationMetadata: Record<Exclude<keyof WorkoutsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byWorkoutId: {\n requestsMetadata: WithWorkoutItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"workoutId\"],\n },\n count: {\n requestsMetadata: CountRequestBuilderRequestsMetadata,\n },\n events: {\n requestsMetadata: EventsRequestBuilderRequestsMetadata,\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WorkoutsRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WorkoutsRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutsGetResponseFromDiscriminatorValue,\n },\n post: {\n uriTemplate: WorkoutsRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createWorkout400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostWorkoutsRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { Exercise_templatesRequestBuilderNavigationMetadata, Exercise_templatesRequestBuilderRequestsMetadata, type Exercise_templatesRequestBuilder } from './exercise_templates/index.js';\n// @ts-ignore\nimport { Routine_foldersRequestBuilderNavigationMetadata, Routine_foldersRequestBuilderRequestsMetadata, type Routine_foldersRequestBuilder } from './routine_folders/index.js';\n// @ts-ignore\nimport { RoutinesRequestBuilderNavigationMetadata, RoutinesRequestBuilderRequestsMetadata, type RoutinesRequestBuilder } from './routines/index.js';\n// @ts-ignore\nimport { type WorkoutsRequestBuilder, WorkoutsRequestBuilderNavigationMetadata, WorkoutsRequestBuilderRequestsMetadata } from './workouts/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1\n */\nexport interface V1RequestBuilder extends BaseRequestBuilder<V1RequestBuilder> {\n /**\n * The exercise_templates property\n */\n get exercise_templates(): Exercise_templatesRequestBuilder;\n /**\n * The routine_folders property\n */\n get routine_folders(): Routine_foldersRequestBuilder;\n /**\n * The routines property\n */\n get routines(): RoutinesRequestBuilder;\n /**\n * The workouts property\n */\n get workouts(): WorkoutsRequestBuilder;\n}\n/**\n * Uri template for the request builder.\n */\nexport const V1RequestBuilderUriTemplate = \"{+baseurl}/v1\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const V1RequestBuilderNavigationMetadata: Record<Exclude<keyof V1RequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n exercise_templates: {\n requestsMetadata: Exercise_templatesRequestBuilderRequestsMetadata,\n navigationMetadata: Exercise_templatesRequestBuilderNavigationMetadata,\n },\n routines: {\n requestsMetadata: RoutinesRequestBuilderRequestsMetadata,\n navigationMetadata: RoutinesRequestBuilderNavigationMetadata,\n },\n routine_folders: {\n requestsMetadata: Routine_foldersRequestBuilderRequestsMetadata,\n navigationMetadata: Routine_foldersRequestBuilderNavigationMetadata,\n },\n workouts: {\n requestsMetadata: WorkoutsRequestBuilderRequestsMetadata,\n navigationMetadata: WorkoutsRequestBuilderNavigationMetadata,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { type V1RequestBuilder, V1RequestBuilderNavigationMetadata } from './v1/index.js';\n// @ts-ignore\nimport { apiClientProxifier, ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions';\n// @ts-ignore\nimport { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form';\n// @ts-ignore\nimport { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json';\n// @ts-ignore\nimport { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart';\n// @ts-ignore\nimport { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text';\n\n/**\n * Instantiates a new {@link HevyClient} and sets the default values.\n * @param requestAdapter The request adapter to use to execute the requests.\n */\n// @ts-ignore\nexport function createHevyClient(requestAdapter: RequestAdapter) {\n if (requestAdapter === undefined) {\n throw new Error(\"requestAdapter cannot be undefined\");\n }\n let serializationWriterFactory : SerializationWriterFactoryRegistry\n let parseNodeFactoryRegistry : ParseNodeFactoryRegistry\n \n if (requestAdapter.getParseNodeFactory() instanceof ParseNodeFactoryRegistry) {\n parseNodeFactoryRegistry = requestAdapter.getParseNodeFactory() as ParseNodeFactoryRegistry\n } else {\n throw new Error(\"requestAdapter.getParseNodeFactory() is not a ParseNodeFactoryRegistry\")\n }\n \n if (requestAdapter.getSerializationWriterFactory() instanceof SerializationWriterFactoryRegistry) {\n serializationWriterFactory = requestAdapter.getSerializationWriterFactory() as SerializationWriterFactoryRegistry\n } else {\n throw new Error(\"requestAdapter.getSerializationWriterFactory() is not a SerializationWriterFactoryRegistry\")\n }\n \n serializationWriterFactory.registerDefaultSerializer(JsonSerializationWriterFactory);\n serializationWriterFactory.registerDefaultSerializer(TextSerializationWriterFactory);\n serializationWriterFactory.registerDefaultSerializer(FormSerializationWriterFactory);\n serializationWriterFactory.registerDefaultSerializer(MultipartSerializationWriterFactory);\n \n const backingStoreFactory = requestAdapter.getBackingStoreFactory();\n parseNodeFactoryRegistry.registerDefaultDeserializer(JsonParseNodeFactory, backingStoreFactory);\n parseNodeFactoryRegistry.registerDefaultDeserializer(TextParseNodeFactory, backingStoreFactory);\n parseNodeFactoryRegistry.registerDefaultDeserializer(FormParseNodeFactory, backingStoreFactory);\n const pathParameters: Record<string, unknown> = {\n \"baseurl\": requestAdapter.baseUrl,\n };\n return apiClientProxifier<HevyClient>(requestAdapter, pathParameters, HevyClientNavigationMetadata, undefined);\n}\n/**\n * The main entry point of the SDK, exposes the configuration and the fluent API.\n */\nexport interface HevyClient extends BaseRequestBuilder<HevyClient> {\n /**\n * The v1 property\n */\n get v1(): V1RequestBuilder;\n}\n/**\n * Uri template for the request builder.\n */\nexport const HevyClientUriTemplate = \"{+baseurl}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const HevyClientNavigationMetadata: Record<Exclude<keyof HevyClient, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n v1: {\n navigationMetadata: V1RequestBuilderNavigationMetadata,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n",null,null,null,null,null,null,"{\n\t\"name\": \"hevy-mcp\",\n\t\"version\": \"1.4.0\",\n\t\"main\": \"dist/index.js\",\n\t\"module\": \"dist/index.js\",\n\t\"types\": \"dist/index.d.ts\",\n\t\"files\": [\n\t\t\"dist\",\n\t\t\"README.md\"\n\t],\n\t\"access\": \"public\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/chrisdoc/hevy-mcp/issues\"\n\t},\n\t\"homepage\": \"https://github.com/chrisdoc/hevy-mcp#readme\",\n\t\"bin\": {\n\t\t\"hevy-mcp\": \"dist/index.js\"\n\t},\n\t\"scripts\": {\n\t\t\"inspect\": \"npm run build && npx -y @modelcontextprotocol/inspector@latest node dist/index.js\",\n\t\t\"test\": \"vitest\",\n\t\t\"export-specs\": \"node ./scripts/export-openapi-spec.js\",\n\t\t\"build\": \"tsup\",\n\t\t\"build:client\": \"kiota generate -l typescript -d openapi-spec.json -c HevyClient -o ./src/generated/client --log-level error --clean-output --clear-cache\",\n\t\t\"start\": \"node dist/index.js\",\n\t\t\"dev\": \"tsx watch --clear-screen=false src/index.ts\",\n\t\t\"check\": \"biome check --fix\",\n\t\t\"version:patch\": \"npm version patch\",\n\t\t\"version:minor\": \"npm version minor\",\n\t\t\"version:major\": \"npm version major\",\n\t\t\"release\": \"semantic-release\",\n\t\t\"commit\": \"commit\"\n\t},\n\t\"type\": \"module\",\n\t\"keywords\": [\n\t\t\"mcp\",\n\t\t\"hevy\",\n\t\t\"fitness\",\n\t\t\"api\",\n\t\t\"model context protocol\"\n\t],\n\t\"author\": \"Christoph Kieslich\",\n\t\"license\": \"MIT\",\n\t\"description\": \"A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.\",\n\t\"dependencies\": {\n\t\t\"@dotenvx/dotenvx\": \"^1.44.0\",\n\t\t\"@microsoft/kiota-abstractions\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-authentication-azure\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-bundle\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-http-fetchlibrary\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-serialization-json\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-serialization-text\": \"1.0.0-preview.94\",\n\t\t\"@modelcontextprotocol/sdk\": \"^1.11.3\",\n\t\t\"uuid\": \"^11.1.0\",\n\t\t\"zod\": \"^3.24.4\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@biomejs/biome\": \"1.9.4\",\n\t\t\"@commitlint/cli\": \"^19.8.0\",\n\t\t\"@commitlint/config-conventional\": \"^19.8.0\",\n\t\t\"@commitlint/prompt-cli\": \"^19.8.0\",\n\t\t\"@semantic-release/changelog\": \"^6.0.3\",\n\t\t\"@semantic-release/git\": \"^10.0.1\",\n\t\t\"@types/node\": \"^22.13.13\",\n\t\t\"@vitest/coverage-v8\": \"^3.1.1\",\n\t\t\"abstract-syntax-tree\": \"^2.22.0\",\n\t\t\"lefthook\": \"^1.11.5\",\n\t\t\"semantic-release\": \"^24.2.3\",\n\t\t\"tsup\": \"^8.4.0\",\n\t\t\"tsx\": \"^4.19.3\",\n\t\t\"typescript\": \"^5.8.3\",\n\t\t\"vitest\": \"^3.1.1\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=20.0.0\"\n\t}\n}\n"],"mappings":";;;;;AACA,OAAO;AACP,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;;;ACFrC,SAAS,SAAS;;;AC2GX,SAAS,cAAc,SAAoC;AACjE,SAAO;AAAA,IACN,IAAI,QAAQ;AAAA,IACZ,MAAM,QAAQ;AAAA,IACd,MAAM,QAAQ;AAAA,IACd,aAAa,QAAQ;AAAA,IACrB,UAAU,kBAAkB,QAAQ,aAAa,IAAI,QAAQ,WAAW,EAAE;AAAA,IAC1E,WAAW,QAAQ,WAAW,IAAI,CAAC,aAAuB;AACzD,aAAO;AAAA,QACN,MAAM,SAAS;AAAA,QACf,OAAO,SAAS;AAAA,QAChB,MAAM,SAAS,MAAM,IAAI,CAAC,SAAsB;AAAA,UAC/C,MAAM,IAAI;AAAA,UACV,QAAQ,IAAI;AAAA,UACZ,MAAM,IAAI;AAAA,UACV,UAAU,IAAI;AAAA,UACd,UAAU,IAAI;AAAA,UACd,KAAK,IAAI;AAAA,UACT,cAAc,IAAI;AAAA,QACnB,EAAE;AAAA,MACH;AAA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;AAAA,EAC5B;AAAA,EACA;AACD,CAAC;AAGD,IAAI,CAAC,QAAQ,IAAI,cAAc;AAC9B,UAAQ,MAAM,8CAA8C;AAC5D,UAAQ,KAAK,CAAC;AACf;AAIA,IAAM,SAAS,QAAQ,IAAI,gBAAgB;AAC3C,IAAM,aAAa,aAAa,QAAQ,gBAAgB;AAExD,qBAAqB,QAAQ,UAAU;AACvC,qBAAqB,QAAQ,UAAU;AACvC,sBAAsB,QAAQ,UAAU;AACxC,oBAAoB,QAAQ,UAAU;AAGtC,eAAe,YAAY;AAC1B,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC/B;AAEA,UAAU,EAAE,MAAM,CAAC,UAAU;AAC5B,UAAQ,MAAM,0BAA0B,KAAK;AAC7C,UAAQ,KAAK,CAAC;AACf,CAAC;","names":["server","hevyClient","z","server","hevyClient","z","z","server","hevyClient","z","z","server","hevyClient","z","createRoutine400ErrorFromDiscriminatorValue","deserializeIntoRoutine400Error","createRoutine400ErrorFromDiscriminatorValue","createWorkout400ErrorFromDiscriminatorValue","deserializeIntoWorkout400Error","createWorkout400ErrorFromDiscriminatorValue","DateOnly","Duration","TimeOnly","apiKey"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/tools/folders.ts","../src/utils/formatters.ts","../src/tools/routines.ts","../src/tools/templates.ts","../src/tools/workouts.ts","../src/utils/error-handler.ts","../src/utils/response-formatter.ts","../src/utils/hevyClient.ts","../src/generated/client/models/index.ts","../src/generated/client/v1/exercise_templates/item/index.ts","../src/generated/client/v1/exercise_templates/index.ts","../src/generated/client/v1/routine_folders/item/index.ts","../src/generated/client/v1/routine_folders/index.ts","../src/generated/client/v1/routines/item/index.ts","../src/generated/client/v1/routines/index.ts","../src/generated/client/v1/workouts/count/index.ts","../src/generated/client/v1/workouts/events/index.ts","../src/generated/client/v1/workouts/item/index.ts","../src/generated/client/v1/workouts/index.ts","../src/generated/client/v1/index.ts","../src/generated/client/hevyClient.ts","../node_modules/@microsoft/kiota-serialization-form/src/formParseNode.ts","../node_modules/@microsoft/kiota-serialization-form/src/formSerializationWriter.ts","../node_modules/@microsoft/kiota-serialization-form/src/formParseNodeFactory.ts","../node_modules/@microsoft/kiota-serialization-form/src/formSerializationWriterFactory.ts","../node_modules/@microsoft/kiota-serialization-multipart/src/multipartSerializationWriter.ts","../node_modules/@microsoft/kiota-serialization-multipart/src/multipartSerializationWriterFactory.ts","../package.json"],"sourcesContent":["#!/usr/bin/env node\nimport \"@dotenvx/dotenvx/config\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\n\nimport { registerFolderTools } from \"./tools/folders.js\";\nimport { registerRoutineTools } from \"./tools/routines.js\";\nimport { registerTemplateTools } from \"./tools/templates.js\";\n// Import tool registration functions\nimport { registerWorkoutTools } from \"./tools/workouts.js\";\nimport { createClient } from \"./utils/hevyClient.js\";\n\nimport { name, version } from \"../package.json\";\n\nconst HEVY_API_BASEURL = \"https://api.hevyapp.com\";\n\n// Create server instance\nconst server = new McpServer({\n\tname,\n\tversion,\n});\n\n// Check for API key\nif (!process.env.HEVY_API_KEY) {\n\tconsole.error(\"HEVY_API_KEY environment variable is not set\");\n\tprocess.exit(1);\n}\n\n// Configure client\n// We've already checked for HEVY_API_KEY existence above, so it's safe to use here\nconst apiKey = process.env.HEVY_API_KEY || \"\";\nconst hevyClient = createClient(apiKey, HEVY_API_BASEURL);\n// Register all tools\nregisterWorkoutTools(server, hevyClient);\nregisterRoutineTools(server, hevyClient);\nregisterTemplateTools(server, hevyClient);\nregisterFolderTools(server, hevyClient);\n\n// Start the server\nasync function runServer() {\n\tconst transport = new StdioServerTransport();\n\tawait server.connect(transport);\n}\n\nrunServer().catch((error) => {\n\tconsole.error(\"Fatal error in main():\", error);\n\tprocess.exit(1);\n});\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { RoutineFolder } from \"../generated/client/models/index.js\";\nimport { formatRoutineFolder } from \"../utils/formatters.js\";\n\n/**\n * Register all routine folder-related tools with the MCP server\n */\nexport function registerFolderTools(server: McpServer, hevyClient: HevyClient) {\n\t// Get routine folders\n\tserver.tool(\n\t\t\"get-routine-folders\",\n\t\t\"Get a paginated list of routine folders available on the account. Returns folder details including ID, title, index (order position), and creation/update timestamps. Useful for organizing routines into categories.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t},\n\t\tasync ({ page, pageSize }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routine_folders.get({\n\t\t\t\t\tqueryParameters: {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tpageSize,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Process routine folders to extract relevant information\n\t\t\t\tconst folders =\n\t\t\t\t\tdata?.routineFolders?.map((folder) => formatRoutineFolder(folder)) ||\n\t\t\t\t\t[];\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(folders, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error fetching routine folders:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routine folders: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Get single routine folder by ID\n\tserver.tool(\n\t\t\"get-routine-folder\",\n\t\t\"Get complete details of a specific routine folder by ID. Returns all folder information including title, index (order position), and creation/update timestamps.\",\n\t\t{\n\t\t\tfolderId: z.coerce.number().int(),\n\t\t},\n\t\tasync ({ folderId }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routine_folders\n\t\t\t\t\t.byFolderId(folderId.toString())\n\t\t\t\t\t.get();\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Routine folder with ID ${folderId} not found`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst folder = formatRoutineFolder(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(folder, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`Error fetching routine folder ${folderId}:`, error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routine folder: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Create new routine folder\n\tserver.tool(\n\t\t\"create-routine-folder\",\n\t\t\"Create a new routine folder in your Hevy account. The folder will be created at index 0, and all other folders will have their indexes incremented. Returns the complete folder details upon successful creation including the newly assigned folder ID.\",\n\t\t{\n\t\t\ttitle: z.string().min(1),\n\t\t},\n\t\tasync ({ title }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routine_folders.post({\n\t\t\t\t\troutineFolder: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: \"Failed to create routine folder\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst folder = formatRoutineFolder(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Routine folder created successfully:\\n${JSON.stringify(folder, null, 2)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error creating routine folder:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error creating routine folder: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type {\n\tRoutine_exercises as Exercise,\n\tRoutine_exercises_sets as ExerciseSet,\n\tExerciseTemplate,\n\tRoutine,\n\tRoutineFolder,\n\tWorkout,\n} from \"../generated/client/models/index.js\";\n\n/**\n * Formatted workout set interface\n */\nexport interface FormattedWorkoutSet {\n\ttype: string | undefined;\n\tweight: number | undefined | null;\n\treps: number | undefined | null;\n\tdistance: number | undefined | null;\n\tduration: number | undefined | null;\n\trpe: number | undefined | null;\n\tcustomMetric: number | undefined | null;\n}\n\n/**\n * Formatted workout exercise interface\n */\nexport interface FormattedWorkoutExercise {\n\tname: string | undefined;\n\tnotes: string | undefined | null;\n\tsets: FormattedWorkoutSet[] | undefined;\n}\n\n/**\n * Formatted workout interface\n */\nexport interface FormattedWorkout {\n\tid: string | undefined;\n\tdate: string | undefined;\n\tname: string | undefined;\n\tdescription: string | undefined | null;\n\tduration: string;\n\texercises: FormattedWorkoutExercise[] | undefined;\n}\n\n/**\n * Formatted routine set interface\n */\nexport interface FormattedRoutineSet {\n\tindex: number | undefined;\n\ttype: string | undefined;\n\tweight: number | undefined | null;\n\treps: number | undefined | null;\n\tdistance: number | undefined | null;\n\tduration: number | undefined | null;\n\tcustomMetric: number | undefined | null;\n}\n\n/**\n * Formatted routine exercise interface\n */\nexport interface FormattedRoutineExercise {\n\tname: string | undefined;\n\tindex: number | undefined;\n\texerciseTemplateId: string | undefined;\n\tnotes: string | undefined | null;\n\tsupersetId: number | undefined | null;\n\tsets: FormattedRoutineSet[] | undefined;\n}\n\n/**\n * Formatted routine interface\n */\nexport interface FormattedRoutine {\n\tid: string | undefined;\n\ttitle: string | undefined;\n\tfolderId: number | undefined | null;\n\tcreatedAt: string | undefined;\n\tupdatedAt: string | undefined;\n\texercises: FormattedRoutineExercise[] | undefined;\n}\n\n/**\n * Formatted routine folder interface\n */\nexport interface FormattedRoutineFolder {\n\tid: number | undefined;\n\ttitle: string | undefined;\n\tcreatedAt: string | undefined;\n\tupdatedAt: string | undefined;\n}\n\n/**\n * Formatted exercise template interface\n */\nexport interface FormattedExerciseTemplate {\n\tid: string | undefined;\n\ttitle: string | undefined;\n\ttype: string | undefined;\n\tprimaryMuscleGroup: string | undefined;\n\tsecondaryMuscleGroups: string[] | undefined;\n\tisCustom: boolean | undefined;\n}\n\n/**\n * Format a workout object for consistent presentation\n *\n * @param workout - The workout object from the API\n * @returns A formatted workout object with standardized properties\n */\nexport function formatWorkout(workout: Workout): FormattedWorkout {\n\treturn {\n\t\tid: workout.id,\n\t\tdate: workout.createdAt,\n\t\tname: workout.title,\n\t\tdescription: workout.description,\n\t\tduration: calculateDuration(workout.startTime || \"\", workout.endTime || \"\"),\n\t\texercises: workout.exercises?.map((exercise: Exercise) => {\n\t\t\treturn {\n\t\t\t\tname: exercise.title,\n\t\t\t\tnotes: exercise.notes,\n\t\t\t\tsets: exercise.sets?.map((set: ExerciseSet) => ({\n\t\t\t\t\ttype: set.type,\n\t\t\t\t\tweight: set.weightKg,\n\t\t\t\t\treps: set.reps,\n\t\t\t\t\tdistance: set.distanceMeters,\n\t\t\t\t\tduration: set.durationSeconds,\n\t\t\t\t\trpe: set.rpe,\n\t\t\t\t\tcustomMetric: set.customMetric,\n\t\t\t\t})),\n\t\t\t};\n\t\t}),\n\t};\n}\n\n/**\n * Format a routine object for consistent presentation\n *\n * @param routine - The routine object from the API\n * @returns A formatted routine object with standardized properties\n */\nexport function formatRoutine(routine: Routine): FormattedRoutine {\n\treturn {\n\t\tid: routine.id,\n\t\ttitle: routine.title,\n\t\tfolderId: routine.folderId,\n\t\tcreatedAt: routine.createdAt,\n\t\tupdatedAt: routine.updatedAt,\n\t\texercises: routine.exercises?.map((exercise: Exercise) => {\n\t\t\treturn {\n\t\t\t\tname: exercise.title,\n\t\t\t\tindex: exercise.index,\n\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\tnotes: exercise.notes,\n\t\t\t\tsupersetId: exercise.supersetsId,\n\t\t\t\tsets: exercise.sets?.map((set: ExerciseSet) => ({\n\t\t\t\t\tindex: set.index,\n\t\t\t\t\ttype: set.type,\n\t\t\t\t\tweight: set.weightKg,\n\t\t\t\t\treps: set.reps,\n\t\t\t\t\tdistance: set.distanceMeters,\n\t\t\t\t\tduration: set.durationSeconds,\n\t\t\t\t\tcustomMetric: set.customMetric,\n\t\t\t\t})),\n\t\t\t};\n\t\t}),\n\t};\n}\n\n/**\n * Format a routine folder object for consistent presentation\n *\n * @param folder - The routine folder object from the API\n * @returns A formatted routine folder object with standardized properties\n */\nexport function formatRoutineFolder(\n\tfolder: RoutineFolder,\n): FormattedRoutineFolder {\n\treturn {\n\t\tid: folder.id,\n\t\ttitle: folder.title,\n\t\tcreatedAt: folder.createdAt,\n\t\tupdatedAt: folder.updatedAt,\n\t};\n}\n\n/**\n * Calculate duration between two ISO timestamp strings\n *\n * @param startTime - The start time as ISO string or timestamp\n * @param endTime - The end time as ISO string or timestamp\n * @returns A formatted duration string (e.g. \"1h 30m 45s\") or \"Unknown duration\" if inputs are invalid\n */\nexport function calculateDuration(\n\tstartTime: string | number | null | undefined,\n\tendTime: string | number | null | undefined,\n): string {\n\tif (!startTime || !endTime) return \"Unknown duration\";\n\n\ttry {\n\t\tconst start = new Date(startTime);\n\t\tconst end = new Date(endTime);\n\n\t\t// Validate dates\n\t\tif (Number.isNaN(start.getTime()) || Number.isNaN(end.getTime())) {\n\t\t\treturn \"Unknown duration\";\n\t\t}\n\n\t\tconst durationMs = end.getTime() - start.getTime();\n\n\t\t// Handle negative durations\n\t\tif (durationMs < 0) {\n\t\t\treturn \"Invalid duration (end time before start time)\";\n\t\t}\n\n\t\tconst hours = Math.floor(durationMs / (1000 * 60 * 60));\n\t\tconst minutes = Math.floor((durationMs % (1000 * 60 * 60)) / (1000 * 60));\n\t\tconst seconds = Math.floor((durationMs % (1000 * 60)) / 1000);\n\n\t\treturn `${hours}h ${minutes}m ${seconds}s`;\n\t} catch (error) {\n\t\tconsole.error(\"Error calculating duration:\", error);\n\t\treturn \"Unknown duration\";\n\t}\n}\n\n/**\n * Format an exercise template object for consistent presentation\n *\n * @param template - The exercise template object from the API\n * @returns A formatted exercise template object with standardized properties\n */\nexport function formatExerciseTemplate(\n\ttemplate: ExerciseTemplate,\n): FormattedExerciseTemplate {\n\treturn {\n\t\tid: template.id,\n\t\ttitle: template.title,\n\t\ttype: template.type,\n\t\tprimaryMuscleGroup: template.primaryMuscleGroup,\n\t\tsecondaryMuscleGroups: template.secondaryMuscleGroups,\n\t\tisCustom: template.isCustom,\n\t};\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { Routine } from \"../generated/client/models/index.js\";\nimport { formatRoutine } from \"../utils/formatters.js\";\n\n/**\n * Register all routine-related tools with the MCP server\n */\nexport function registerRoutineTools(\n\tserver: McpServer,\n\thevyClient: HevyClient,\n) {\n\t// Get routines\n\tserver.tool(\n\t\t\"get-routines\",\n\t\t\"Get a paginated list of routines. Returns routine details including title, creation date, folder assignment, and exercise configurations. Results include both default and custom routines.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t},\n\t\tasync ({ page, pageSize }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routines.get({\n\t\t\t\t\tqueryParameters: {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tpageSize,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Process routines to extract relevant information\n\t\t\t\tconst routines =\n\t\t\t\t\tdata?.routines?.map((routine) => formatRoutine(routine)) || [];\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(routines, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error fetching routines:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routines: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Get single routine by ID\n\tserver.tool(\n\t\t\"get-routine\",\n\t\t\"Get complete details of a specific routine by ID. Returns all routine information including title, notes, assigned folder, and detailed exercise data with set configurations.\",\n\t\t{\n\t\t\troutineId: z.string().min(1),\n\t\t},\n\t\tasync ({ routineId }) => {\n\t\t\ttry {\n\t\t\t\t// Since the Kiota client doesn't have a get() method for routine by ID, we need to use the list endpoint and filter\n\t\t\t\tconst data = await hevyClient.v1.routines.byRoutineId(routineId).put({\n\t\t\t\t\troutine: {\n\t\t\t\t\t\ttitle: \"\", // We're providing a minimal body as required by the API\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Routine with ID ${routineId} not found`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst routine = formatRoutine(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(routine, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`Error fetching routine ${routineId}:`, error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching routine: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Create new routine\n\tserver.tool(\n\t\t\"create-routine\",\n\t\t\"Create a new workout routine in your Hevy account. Requires title and at least one exercise with sets. Optionally assign to a specific folder. Returns the complete routine details upon successful creation including the newly assigned routine ID.\",\n\t\t{\n\t\t\ttitle: z.string().min(1),\n\t\t\tfolderId: z.coerce.number().nullable().optional(),\n\t\t\tnotes: z.string().optional(),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\trestSeconds: z.coerce.number().int().min(0).optional(),\n\t\t\t\t\tnotes: z.string().optional(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\tasync ({ title, folderId, notes, exercises }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routines.post({\n\t\t\t\t\troutine: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tfolderId: folderId || null,\n\t\t\t\t\t\tnotes: notes || \"\",\n\t\t\t\t\t\texercises: exercises.map((exercise) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\trestSeconds: exercise.restSeconds || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: \"Failed to create routine\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst routine = formatRoutine(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Routine created successfully:\\n${JSON.stringify(routine, null, 2)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error creating routine:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error creating routine: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Update existing routine\n\tserver.tool(\n\t\t\"update-routine\",\n\t\t\"Update an existing workout routine by ID. You can modify the title, notes, and exercise data. Returns the updated routine with all changes applied. Note that you cannot change the folder assignment through this method.\",\n\t\t{\n\t\t\troutineId: z.string().min(1),\n\t\t\ttitle: z.string().min(1),\n\t\t\tnotes: z.string().optional(),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\trestSeconds: z.coerce.number().int().min(0).optional(),\n\t\t\t\t\tnotes: z.string().optional(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\tasync ({ routineId, title, notes, exercises }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.routines.byRoutineId(routineId).put({\n\t\t\t\t\troutine: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tnotes: notes || null,\n\t\t\t\t\t\texercises: exercises.map((exercise) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\trestSeconds: exercise.restSeconds || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Failed to update routine with ID ${routineId}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst routine = formatRoutine(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Routine updated successfully:\\n${JSON.stringify(routine, null, 2)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`Error updating routine ${routineId}:`, error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error updating routine: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { ExerciseTemplate } from \"../generated/client/models/index.js\";\nimport { formatExerciseTemplate } from \"../utils/formatters.js\";\n\n/**\n * Register all exercise template-related tools with the MCP server\n */\nexport function registerTemplateTools(\n\tserver: McpServer,\n\thevyClient: HevyClient,\n) {\n\t// Get exercise templates\n\tserver.tool(\n\t\t\"get-exercise-templates\",\n\t\t\"Get a paginated list of exercise templates available on the account. Returns both default and custom exercise templates with details including title, type, primary muscle group, and secondary muscle groups. Supports up to 100 templates per page.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(100).default(20),\n\t\t},\n\t\tasync ({ page, pageSize }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.exercise_templates.get({\n\t\t\t\t\tqueryParameters: {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tpageSize,\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Process exercise templates to extract relevant information\n\t\t\t\tconst templates =\n\t\t\t\t\tdata?.exerciseTemplates?.map((template) =>\n\t\t\t\t\t\tformatExerciseTemplate(template),\n\t\t\t\t\t) || [];\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(templates, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error fetching exercise templates:\", error);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching exercise templates: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\t// Get single exercise template by ID\n\tserver.tool(\n\t\t\"get-exercise-template\",\n\t\t\"Get complete details of a specific exercise template by ID. Returns all template information including title, type, primary muscle group, secondary muscle groups, and whether it's a custom exercise.\",\n\t\t{\n\t\t\texerciseTemplateId: z.string().min(1),\n\t\t},\n\t\tasync ({ exerciseTemplateId }) => {\n\t\t\ttry {\n\t\t\t\tconst data = await hevyClient.v1.exercise_templates\n\t\t\t\t\t.byExerciseTemplateId(exerciseTemplateId)\n\t\t\t\t\t.get();\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: `Exercise template with ID ${exerciseTemplateId} not found`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst template = formatExerciseTemplate(data);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: JSON.stringify(template, null, 2),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Error fetching exercise template ${exerciseTemplateId}:`,\n\t\t\t\t\terror,\n\t\t\t\t);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Error fetching exercise template: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { HevyClient } from \"../generated/client/hevyClient.js\";\nimport type { PostWorkoutsRequestBody } from \"../generated/client/models/index.js\";\nimport { withErrorHandling } from \"../utils/error-handler.js\";\nimport { formatWorkout } from \"../utils/formatters.js\";\nimport {\n\tcreateEmptyResponse,\n\tcreateJsonResponse,\n} from \"../utils/response-formatter.js\";\n\n/**\n * Type definition for exercise set types\n */\ntype SetType = \"warmup\" | \"normal\" | \"failure\" | \"dropset\";\n\n/**\n * Interface for exercise set input\n */\ninterface ExerciseSetInput {\n\ttype: SetType;\n\tweightKg?: number | null;\n\treps?: number | null;\n\tdistanceMeters?: number | null;\n\tdurationSeconds?: number | null;\n\trpe?: number | null;\n\tcustomMetric?: number | null;\n}\n\n/**\n * Interface for exercise input\n */\ninterface ExerciseInput {\n\texerciseTemplateId: string;\n\tsupersetId?: number | null;\n\tnotes?: string | null;\n\tsets: ExerciseSetInput[];\n}\n\n/**\n * Register all workout-related tools with the MCP server\n */\nexport function registerWorkoutTools(\n\tserver: McpServer,\n\thevyClient: HevyClient,\n) {\n\t// Get workouts\n\tserver.tool(\n\t\t\"get-workouts\",\n\t\t\"Get a paginated list of workouts. Returns workout details including title, description, start/end times, and exercises performed. Results are ordered from newest to oldest.\",\n\t\t{\n\t\t\tpage: z.coerce.number().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t},\n\t\twithErrorHandling(async ({ page, pageSize }) => {\n\t\t\tconst data = await hevyClient.v1.workouts.get({\n\t\t\t\tqueryParameters: {\n\t\t\t\t\tpage,\n\t\t\t\t\tpageSize,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\t// Process workouts to extract relevant information\n\t\t\tconst workouts =\n\t\t\t\tdata?.workouts?.map((workout) => formatWorkout(workout)) || [];\n\n\t\t\tif (workouts.length === 0) {\n\t\t\t\treturn createEmptyResponse(\n\t\t\t\t\t\"No workouts found for the specified parameters\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn createJsonResponse(workouts);\n\t\t}, \"get-workouts\"),\n\t);\n\n\t// Get single workout by ID\n\tserver.tool(\n\t\t\"get-workout\",\n\t\t\"Get complete details of a specific workout by ID. Returns all workout information including title, description, start/end times, and detailed exercise data.\",\n\t\t{\n\t\t\tworkoutId: z.string().min(1),\n\t\t},\n\t\twithErrorHandling(async ({ workoutId }) => {\n\t\t\tconst data = await hevyClient.v1.workouts.byWorkoutId(workoutId).get();\n\n\t\t\tif (!data) {\n\t\t\t\treturn createEmptyResponse(`Workout with ID ${workoutId} not found`);\n\t\t\t}\n\n\t\t\tconst workout = formatWorkout(data);\n\t\t\treturn createJsonResponse(workout);\n\t\t}, \"get-workout\"),\n\t);\n\n\t// Get workout count\n\tserver.tool(\n\t\t\"get-workout-count\",\n\t\t\"Get the total number of workouts on the account. Useful for pagination or statistics.\",\n\t\t{},\n\t\twithErrorHandling(async () => {\n\t\t\tconst data = await hevyClient.v1.workouts.count.get();\n\t\t\t// Use type assertion to access count property\n\t\t\tconst count = data\n\t\t\t\t? (data as { workoutCount?: number }).workoutCount || 0\n\t\t\t\t: 0;\n\t\t\treturn createJsonResponse({ count });\n\t\t}, \"get-workout-count\"),\n\t);\n\n\t// Get workout events (updates/deletes)\n\tserver.tool(\n\t\t\"get-workout-events\",\n\t\t\"Retrieve a paged list of workout events (updates or deletes) since a given date. Events are ordered from newest to oldest. The intention is to allow clients to keep their local cache of workouts up to date without having to fetch the entire list of workouts.\",\n\t\t{\n\t\t\tpage: z.coerce.number().int().gte(1).default(1),\n\t\t\tpageSize: z.coerce.number().int().gte(1).lte(10).default(5),\n\t\t\tsince: z.string().default(\"1970-01-01T00:00:00Z\"),\n\t\t},\n\t\twithErrorHandling(async ({ page, pageSize, since }) => {\n\t\t\tconst data = await hevyClient.v1.workouts.events.get({\n\t\t\t\tqueryParameters: {\n\t\t\t\t\tpage,\n\t\t\t\t\tpageSize,\n\t\t\t\t\tsince,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tconst events = data?.events || [];\n\n\t\t\tif (events.length === 0) {\n\t\t\t\treturn createEmptyResponse(\n\t\t\t\t\t`No workout events found for the specified parameters since ${since}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn createJsonResponse(events);\n\t\t}, \"get-workout-events\"),\n\t);\n\n\t// Create workout\n\tserver.tool(\n\t\t\"create-workout\",\n\t\t\"Create a new workout in your Hevy account. Requires title, start/end times, and at least one exercise with sets. Returns the complete workout details upon successful creation including the newly assigned workout ID.\",\n\t\t{\n\t\t\ttitle: z.string().min(1),\n\t\t\tdescription: z.string().optional().nullable(),\n\t\t\tstartTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tendTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tisPrivate: z.boolean().default(false),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\tnotes: z.string().optional().nullable(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\trpe: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\twithErrorHandling(\n\t\t\tasync ({\n\t\t\t\ttitle,\n\t\t\t\tdescription,\n\t\t\t\tstartTime,\n\t\t\t\tendTime,\n\t\t\t\tisPrivate,\n\t\t\t\texercises,\n\t\t\t}) => {\n\t\t\t\tconst requestBody: PostWorkoutsRequestBody = {\n\t\t\t\t\tworkout: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tdescription: description || null,\n\t\t\t\t\t\tstartTime,\n\t\t\t\t\t\tendTime,\n\t\t\t\t\t\tisPrivate,\n\t\t\t\t\t\texercises: exercises.map((exercise: ExerciseInput) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set: ExerciseSetInput) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\trpe: set.rpe || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tconst data = await hevyClient.v1.workouts.post(requestBody);\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn createEmptyResponse(\n\t\t\t\t\t\t\"Failed to create workout: Server returned no data\",\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst workout = formatWorkout(data);\n\t\t\t\treturn createJsonResponse(workout, {\n\t\t\t\t\tpretty: true,\n\t\t\t\t\tindent: 2,\n\t\t\t\t});\n\t\t\t},\n\t\t\t\"create-workout\",\n\t\t),\n\t);\n\n\t// Update workout\n\tserver.tool(\n\t\t\"update-workout\",\n\t\t\"Update an existing workout by ID. You can modify the title, description, start/end times, privacy setting, and exercise data. Returns the updated workout with all changes applied.\",\n\t\t{\n\t\t\tworkoutId: z.string().min(1),\n\t\t\ttitle: z.string().min(1),\n\t\t\tdescription: z.string().optional().nullable(),\n\t\t\tstartTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tendTime: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/),\n\t\t\tisPrivate: z.boolean().default(false),\n\t\t\texercises: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\texerciseTemplateId: z.string().min(1),\n\t\t\t\t\tsupersetId: z.coerce.number().nullable().optional(),\n\t\t\t\t\tnotes: z.string().optional().nullable(),\n\t\t\t\t\tsets: z.array(\n\t\t\t\t\t\tz.object({\n\t\t\t\t\t\t\ttype: z\n\t\t\t\t\t\t\t\t.enum([\"warmup\", \"normal\", \"failure\", \"dropset\"])\n\t\t\t\t\t\t\t\t.default(\"normal\"),\n\t\t\t\t\t\t\tweightKg: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\treps: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdistanceMeters: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\tdurationSeconds: z.coerce.number().int().optional().nullable(),\n\t\t\t\t\t\t\trpe: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t\tcustomMetric: z.coerce.number().optional().nullable(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t},\n\t\twithErrorHandling(\n\t\t\tasync ({\n\t\t\t\tworkoutId,\n\t\t\t\ttitle,\n\t\t\t\tdescription,\n\t\t\t\tstartTime,\n\t\t\t\tendTime,\n\t\t\t\tisPrivate,\n\t\t\t\texercises,\n\t\t\t}) => {\n\t\t\t\tconst requestBody: PostWorkoutsRequestBody = {\n\t\t\t\t\tworkout: {\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tdescription: description || null,\n\t\t\t\t\t\tstartTime,\n\t\t\t\t\t\tendTime,\n\t\t\t\t\t\tisPrivate,\n\t\t\t\t\t\texercises: exercises.map((exercise: ExerciseInput) => ({\n\t\t\t\t\t\t\texerciseTemplateId: exercise.exerciseTemplateId,\n\t\t\t\t\t\t\tsupersetId: exercise.supersetId || null,\n\t\t\t\t\t\t\tnotes: exercise.notes || null,\n\t\t\t\t\t\t\tsets: exercise.sets.map((set: ExerciseSetInput) => ({\n\t\t\t\t\t\t\t\ttype: set.type,\n\t\t\t\t\t\t\t\tweightKg: set.weightKg || null,\n\t\t\t\t\t\t\t\treps: set.reps || null,\n\t\t\t\t\t\t\t\tdistanceMeters: set.distanceMeters || null,\n\t\t\t\t\t\t\t\tdurationSeconds: set.durationSeconds || null,\n\t\t\t\t\t\t\t\trpe: set.rpe || null,\n\t\t\t\t\t\t\t\tcustomMetric: set.customMetric || null,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t})),\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tconst data = await hevyClient.v1.workouts\n\t\t\t\t\t.byWorkoutId(workoutId)\n\t\t\t\t\t.put(requestBody);\n\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn createEmptyResponse(\n\t\t\t\t\t\t`Failed to update workout with ID ${workoutId}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst workout = formatWorkout(data);\n\t\t\t\treturn createJsonResponse(workout, {\n\t\t\t\t\tpretty: true,\n\t\t\t\t\tindent: 2,\n\t\t\t\t});\n\t\t\t},\n\t\t\t\"update-workout-operation\",\n\t\t),\n\t);\n}\n","/**\n * Centralized error handling utility for MCP tools\n */\n\n// Define the McpToolResponse interface based on the SDK's structure\ninterface McpToolResponse {\n\tcontent: Array<{ type: string; text: string }>;\n\tisError?: boolean;\n}\n\n/**\n * Standard error response interface\n */\nexport interface ErrorResponse {\n\tmessage: string;\n\tcode?: string;\n\tdetails?: unknown;\n}\n\n/**\n * Create a standardized error response for MCP tools\n *\n * @param error - The error object or message\n * @param context - Optional context information about where the error occurred\n * @returns A formatted MCP tool response with error information\n */\nexport function createErrorResponse(\n\terror: unknown,\n\tcontext?: string,\n): McpToolResponse {\n\tconst errorMessage = error instanceof Error ? error.message : String(error);\n\t// Extract error code if available (for logging purposes)\n\tconst errorCode =\n\t\terror instanceof Error && \"code\" in error\n\t\t\t? (error as { code?: string }).code\n\t\t\t: undefined;\n\n\t// Include error code in logs if available\n\tif (errorCode) {\n\t\tconsole.debug(`Error code: ${errorCode}`);\n\t}\n\n\tconst contextPrefix = context ? `[${context}] ` : \"\";\n\tconst formattedMessage = `${contextPrefix}Error: ${errorMessage}`;\n\n\t// Log the error for server-side debugging\n\tconsole.error(formattedMessage, error);\n\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: formattedMessage,\n\t\t\t},\n\t\t],\n\t\tisError: true,\n\t};\n}\n\n/**\n * Wrap an async function with standardized error handling\n *\n * @param fn - The async function to wrap\n * @param context - Context information for error messages\n * @returns A function that catches errors and returns standardized error responses\n */\n// Define a more specific type for function parameters\ntype McpToolFunction = (\n\t...args: Record<string, unknown>[]\n) => Promise<McpToolResponse>;\n\n/**\n * Wrap an async function with standardized error handling\n *\n * @param fn - The async function to wrap\n * @param context - Context information for error messages\n * @returns A function that catches errors and returns standardized error responses\n */\nexport function withErrorHandling<T extends McpToolFunction>(\n\tfn: T,\n\tcontext: string,\n): T {\n\treturn (async (...args: Parameters<T>) => {\n\t\ttry {\n\t\t\treturn await fn(...args);\n\t\t} catch (error) {\n\t\t\treturn createErrorResponse(error, context);\n\t\t}\n\t}) as T;\n}\n","/**\n * Centralized response formatting utility for MCP tools\n */\n\nimport type { McpToolResponse } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n\n/**\n * Format options for JSON responses\n */\nexport interface JsonFormatOptions {\n\t/** Whether to pretty-print the JSON with indentation */\n\tpretty?: boolean;\n\t/** Indentation spaces for pretty-printing (default: 2) */\n\tindent?: number;\n}\n\n/**\n * Create a standardized success response with JSON data\n *\n * @param data - The data to include in the response\n * @param options - Formatting options\n * @returns A formatted MCP tool response with the data as JSON\n */\nexport function createJsonResponse(\n\tdata: unknown,\n\toptions: JsonFormatOptions = { pretty: true, indent: 2 },\n): McpToolResponse {\n\tconst jsonString = options.pretty\n\t\t? JSON.stringify(data, null, options.indent)\n\t\t: JSON.stringify(data);\n\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: jsonString,\n\t\t\t},\n\t\t],\n\t};\n}\n\n/**\n * Create a standardized success response with text data\n *\n * @param message - The text message to include in the response\n * @returns A formatted MCP tool response with the text message\n */\nexport function createTextResponse(message: string): McpToolResponse {\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: message,\n\t\t\t},\n\t\t],\n\t};\n}\n\n/**\n * Create a standardized success response for empty or null results\n *\n * @param message - Optional message to include (default: \"No data found\")\n * @returns A formatted MCP tool response for empty results\n */\nexport function createEmptyResponse(\n\tmessage = \"No data found\",\n): McpToolResponse {\n\treturn {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: message,\n\t\t\t},\n\t\t],\n\t};\n}\n","import {\n\tApiKeyAuthenticationProvider,\n\tApiKeyLocation,\n} from \"@microsoft/kiota-abstractions\";\nimport { FetchRequestAdapter } from \"@microsoft/kiota-http-fetchlibrary\";\nimport { createHevyClient } from \"../generated/client/hevyClient.js\";\n\nexport function createClient(apiKey: string, baseUrl: string) {\n\tconst authProvider = new ApiKeyAuthenticationProvider(\n\t\tapiKey,\n\t\t\"api-key\",\n\t\tApiKeyLocation.Header,\n\t);\n\tconst adapter = new FetchRequestAdapter(authProvider);\n\tadapter.baseUrl = baseUrl;\n\n\treturn createHevyClient(adapter);\n}\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {DeletedWorkout}\n */\n// @ts-ignore\nexport function createDeletedWorkoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoDeletedWorkout;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {ExerciseTemplate}\n */\n// @ts-ignore\nexport function createExerciseTemplateFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoExerciseTemplate;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {DeletedWorkout | UpdatedWorkout}\n */\n// @ts-ignore\nexport function createPaginatedWorkoutEvents_eventsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPaginatedWorkoutEvents_events;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PaginatedWorkoutEvents}\n */\n// @ts-ignore\nexport function createPaginatedWorkoutEventsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPaginatedWorkoutEvents;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutineFolderRequestBody_routine_folder}\n */\n// @ts-ignore\nexport function createPostRoutineFolderRequestBody_routine_folderFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutineFolderRequestBody_routine_folder;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutineFolderRequestBody}\n */\n// @ts-ignore\nexport function createPostRoutineFolderRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutineFolderRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestBody_routine}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestBody_routineFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestBody_routine;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestBody}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestExercise}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestExerciseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestExercise;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostRoutinesRequestSet}\n */\n// @ts-ignore\nexport function createPostRoutinesRequestSetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostRoutinesRequestSet;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestBody_workout}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestBody_workoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestBody_workout;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestBody}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestExercise}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestExerciseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestExercise;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PostWorkoutsRequestSet}\n */\n// @ts-ignore\nexport function createPostWorkoutsRequestSetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPostWorkoutsRequestSet;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestBody_routine}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestBody_routineFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestBody_routine;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestBody}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestBody;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestExercise}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestExerciseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestExercise;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {PutRoutinesRequestSet}\n */\n// @ts-ignore\nexport function createPutRoutinesRequestSetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoPutRoutinesRequestSet;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine_exercises_sets}\n */\n// @ts-ignore\nexport function createRoutine_exercises_setsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine_exercises_sets;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine_exercises}\n */\n// @ts-ignore\nexport function createRoutine_exercisesFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine_exercises;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {RoutineFolder}\n */\n// @ts-ignore\nexport function createRoutineFolderFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutineFolder;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine}\n */\n// @ts-ignore\nexport function createRoutineFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {UpdatedWorkout}\n */\n// @ts-ignore\nexport function createUpdatedWorkoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoUpdatedWorkout;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout_exercises_sets}\n */\n// @ts-ignore\nexport function createWorkout_exercises_setsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout_exercises_sets;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout_exercises}\n */\n// @ts-ignore\nexport function createWorkout_exercisesFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout_exercises;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout}\n */\n// @ts-ignore\nexport function createWorkoutFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout;\n}\nexport interface DeletedWorkout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A date string indicating when the workout was deleted\n */\n deletedAt?: string | null;\n /**\n * The unique identifier of the deleted workout\n */\n id?: string | null;\n /**\n * Indicates the type of the event (deleted)\n */\n type?: string | null;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoDeletedWorkout(deletedWorkout: Partial<DeletedWorkout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"deleted_at\": n => { deletedWorkout.deletedAt = n.getStringValue(); },\n \"id\": n => { deletedWorkout.id = n.getStringValue(); },\n \"type\": n => { deletedWorkout.type = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoExerciseTemplate(exerciseTemplate: Partial<ExerciseTemplate> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"id\": n => { exerciseTemplate.id = n.getStringValue(); },\n \"is_custom\": n => { exerciseTemplate.isCustom = n.getBooleanValue(); },\n \"primary_muscle_group\": n => { exerciseTemplate.primaryMuscleGroup = n.getStringValue(); },\n \"secondary_muscle_groups\": n => { exerciseTemplate.secondaryMuscleGroups = n.getCollectionOfPrimitiveValues<string>(); },\n \"title\": n => { exerciseTemplate.title = n.getStringValue(); },\n \"type\": n => { exerciseTemplate.type = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPaginatedWorkoutEvents(paginatedWorkoutEvents: Partial<PaginatedWorkoutEvents> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"events\": n => { paginatedWorkoutEvents.events = n.getCollectionOfObjectValues<DeletedWorkout>(createDeletedWorkoutFromDiscriminatorValue) ?? n.getCollectionOfObjectValues<UpdatedWorkout>(createUpdatedWorkoutFromDiscriminatorValue); },\n \"page\": n => { paginatedWorkoutEvents.page = n.getNumberValue(); },\n \"page_count\": n => { paginatedWorkoutEvents.pageCount = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPaginatedWorkoutEvents_events(paginatedWorkoutEvents_events: Partial<DeletedWorkout | UpdatedWorkout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n ...deserializeIntoDeletedWorkout(paginatedWorkoutEvents_events as DeletedWorkout),\n ...deserializeIntoUpdatedWorkout(paginatedWorkoutEvents_events as UpdatedWorkout),\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutineFolderRequestBody(postRoutineFolderRequestBody: Partial<PostRoutineFolderRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"routine_folder\": n => { postRoutineFolderRequestBody.routineFolder = n.getObjectValue<PostRoutineFolderRequestBody_routine_folder>(createPostRoutineFolderRequestBody_routine_folderFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutineFolderRequestBody_routine_folder(postRoutineFolderRequestBody_routine_folder: Partial<PostRoutineFolderRequestBody_routine_folder> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"title\": n => { postRoutineFolderRequestBody_routine_folder.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestBody(postRoutinesRequestBody: Partial<PostRoutinesRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"routine\": n => { postRoutinesRequestBody.routine = n.getObjectValue<PostRoutinesRequestBody_routine>(createPostRoutinesRequestBody_routineFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestBody_routine(postRoutinesRequestBody_routine: Partial<PostRoutinesRequestBody_routine> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercises\": n => { postRoutinesRequestBody_routine.exercises = n.getCollectionOfObjectValues<PostRoutinesRequestExercise>(createPostRoutinesRequestExerciseFromDiscriminatorValue); },\n \"folder_id\": n => { postRoutinesRequestBody_routine.folderId = n.getNumberValue(); },\n \"notes\": n => { postRoutinesRequestBody_routine.notes = n.getStringValue(); },\n \"title\": n => { postRoutinesRequestBody_routine.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestExercise(postRoutinesRequestExercise: Partial<PostRoutinesRequestExercise> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { postRoutinesRequestExercise.exerciseTemplateId = n.getStringValue(); },\n \"notes\": n => { postRoutinesRequestExercise.notes = n.getStringValue(); },\n \"rest_seconds\": n => { postRoutinesRequestExercise.restSeconds = n.getNumberValue(); },\n \"sets\": n => { postRoutinesRequestExercise.sets = n.getCollectionOfObjectValues<PostRoutinesRequestSet>(createPostRoutinesRequestSetFromDiscriminatorValue); },\n \"superset_id\": n => { postRoutinesRequestExercise.supersetId = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostRoutinesRequestSet(postRoutinesRequestSet: Partial<PostRoutinesRequestSet> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { postRoutinesRequestSet.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { postRoutinesRequestSet.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { postRoutinesRequestSet.durationSeconds = n.getNumberValue(); },\n \"reps\": n => { postRoutinesRequestSet.reps = n.getNumberValue(); },\n \"type\": n => { postRoutinesRequestSet.type = n.getEnumValue<PostRoutinesRequestSet_type>(PostRoutinesRequestSet_typeObject); },\n \"weight_kg\": n => { postRoutinesRequestSet.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestBody(postWorkoutsRequestBody: Partial<PostWorkoutsRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"workout\": n => { postWorkoutsRequestBody.workout = n.getObjectValue<PostWorkoutsRequestBody_workout>(createPostWorkoutsRequestBody_workoutFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestBody_workout(postWorkoutsRequestBody_workout: Partial<PostWorkoutsRequestBody_workout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"description\": n => { postWorkoutsRequestBody_workout.description = n.getStringValue(); },\n \"end_time\": n => { postWorkoutsRequestBody_workout.endTime = n.getStringValue(); },\n \"exercises\": n => { postWorkoutsRequestBody_workout.exercises = n.getCollectionOfObjectValues<PostWorkoutsRequestExercise>(createPostWorkoutsRequestExerciseFromDiscriminatorValue); },\n \"is_private\": n => { postWorkoutsRequestBody_workout.isPrivate = n.getBooleanValue(); },\n \"start_time\": n => { postWorkoutsRequestBody_workout.startTime = n.getStringValue(); },\n \"title\": n => { postWorkoutsRequestBody_workout.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestExercise(postWorkoutsRequestExercise: Partial<PostWorkoutsRequestExercise> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { postWorkoutsRequestExercise.exerciseTemplateId = n.getStringValue(); },\n \"notes\": n => { postWorkoutsRequestExercise.notes = n.getStringValue(); },\n \"sets\": n => { postWorkoutsRequestExercise.sets = n.getCollectionOfObjectValues<PostWorkoutsRequestSet>(createPostWorkoutsRequestSetFromDiscriminatorValue); },\n \"superset_id\": n => { postWorkoutsRequestExercise.supersetId = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPostWorkoutsRequestSet(postWorkoutsRequestSet: Partial<PostWorkoutsRequestSet> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { postWorkoutsRequestSet.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { postWorkoutsRequestSet.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { postWorkoutsRequestSet.durationSeconds = n.getNumberValue(); },\n \"reps\": n => { postWorkoutsRequestSet.reps = n.getNumberValue(); },\n \"rpe\": n => { postWorkoutsRequestSet.rpe = n.getNumberValue(); },\n \"type\": n => { postWorkoutsRequestSet.type = n.getEnumValue<PostWorkoutsRequestSet_type>(PostWorkoutsRequestSet_typeObject); },\n \"weight_kg\": n => { postWorkoutsRequestSet.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestBody(putRoutinesRequestBody: Partial<PutRoutinesRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"routine\": n => { putRoutinesRequestBody.routine = n.getObjectValue<PutRoutinesRequestBody_routine>(createPutRoutinesRequestBody_routineFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestBody_routine(putRoutinesRequestBody_routine: Partial<PutRoutinesRequestBody_routine> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercises\": n => { putRoutinesRequestBody_routine.exercises = n.getCollectionOfObjectValues<PutRoutinesRequestExercise>(createPutRoutinesRequestExerciseFromDiscriminatorValue); },\n \"notes\": n => { putRoutinesRequestBody_routine.notes = n.getStringValue(); },\n \"title\": n => { putRoutinesRequestBody_routine.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestExercise(putRoutinesRequestExercise: Partial<PutRoutinesRequestExercise> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { putRoutinesRequestExercise.exerciseTemplateId = n.getStringValue(); },\n \"notes\": n => { putRoutinesRequestExercise.notes = n.getStringValue(); },\n \"rest_seconds\": n => { putRoutinesRequestExercise.restSeconds = n.getNumberValue(); },\n \"sets\": n => { putRoutinesRequestExercise.sets = n.getCollectionOfObjectValues<PutRoutinesRequestSet>(createPutRoutinesRequestSetFromDiscriminatorValue); },\n \"superset_id\": n => { putRoutinesRequestExercise.supersetId = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoPutRoutinesRequestSet(putRoutinesRequestSet: Partial<PutRoutinesRequestSet> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { putRoutinesRequestSet.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { putRoutinesRequestSet.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { putRoutinesRequestSet.durationSeconds = n.getNumberValue(); },\n \"reps\": n => { putRoutinesRequestSet.reps = n.getNumberValue(); },\n \"type\": n => { putRoutinesRequestSet.type = n.getEnumValue<PutRoutinesRequestSet_type>(PutRoutinesRequestSet_typeObject); },\n \"weight_kg\": n => { putRoutinesRequestSet.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine(routine: Partial<Routine> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"created_at\": n => { routine.createdAt = n.getStringValue(); },\n \"exercises\": n => { routine.exercises = n.getCollectionOfObjectValues<Routine_exercises>(createRoutine_exercisesFromDiscriminatorValue); },\n \"folder_id\": n => { routine.folderId = n.getNumberValue(); },\n \"id\": n => { routine.id = n.getStringValue(); },\n \"title\": n => { routine.title = n.getStringValue(); },\n \"updated_at\": n => { routine.updatedAt = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine_exercises(routine_exercises: Partial<Routine_exercises> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { routine_exercises.exerciseTemplateId = n.getStringValue(); },\n \"index\": n => { routine_exercises.index = n.getNumberValue(); },\n \"notes\": n => { routine_exercises.notes = n.getStringValue(); },\n \"sets\": n => { routine_exercises.sets = n.getCollectionOfObjectValues<Routine_exercises_sets>(createRoutine_exercises_setsFromDiscriminatorValue); },\n \"supersets_id\": n => { routine_exercises.supersetsId = n.getNumberValue(); },\n \"title\": n => { routine_exercises.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine_exercises_sets(routine_exercises_sets: Partial<Routine_exercises_sets> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { routine_exercises_sets.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { routine_exercises_sets.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { routine_exercises_sets.durationSeconds = n.getNumberValue(); },\n \"index\": n => { routine_exercises_sets.index = n.getNumberValue(); },\n \"reps\": n => { routine_exercises_sets.reps = n.getNumberValue(); },\n \"rpe\": n => { routine_exercises_sets.rpe = n.getNumberValue(); },\n \"type\": n => { routine_exercises_sets.type = n.getStringValue(); },\n \"weight_kg\": n => { routine_exercises_sets.weightKg = n.getNumberValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutineFolder(routineFolder: Partial<RoutineFolder> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"created_at\": n => { routineFolder.createdAt = n.getStringValue(); },\n \"id\": n => { routineFolder.id = n.getNumberValue(); },\n \"index\": n => { routineFolder.index = n.getNumberValue(); },\n \"title\": n => { routineFolder.title = n.getStringValue(); },\n \"updated_at\": n => { routineFolder.updatedAt = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoUpdatedWorkout(updatedWorkout: Partial<UpdatedWorkout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"type\": n => { updatedWorkout.type = n.getStringValue(); },\n \"workout\": n => { updatedWorkout.workout = n.getObjectValue<Workout>(createWorkoutFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout(workout: Partial<Workout> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"created_at\": n => { workout.createdAt = n.getStringValue(); },\n \"description\": n => { workout.description = n.getStringValue(); },\n \"end_time\": n => { workout.endTime = n.getNumberValue(); },\n \"exercises\": n => { workout.exercises = n.getCollectionOfObjectValues<Workout_exercises>(createWorkout_exercisesFromDiscriminatorValue); },\n \"id\": n => { workout.id = n.getStringValue(); },\n \"start_time\": n => { workout.startTime = n.getNumberValue(); },\n \"title\": n => { workout.title = n.getStringValue(); },\n \"updated_at\": n => { workout.updatedAt = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout_exercises(workout_exercises: Partial<Workout_exercises> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_template_id\": n => { workout_exercises.exerciseTemplateId = n.getStringValue(); },\n \"index\": n => { workout_exercises.index = n.getNumberValue(); },\n \"notes\": n => { workout_exercises.notes = n.getStringValue(); },\n \"sets\": n => { workout_exercises.sets = n.getCollectionOfObjectValues<Workout_exercises_sets>(createWorkout_exercises_setsFromDiscriminatorValue); },\n \"supersets_id\": n => { workout_exercises.supersetsId = n.getNumberValue(); },\n \"title\": n => { workout_exercises.title = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout_exercises_sets(workout_exercises_sets: Partial<Workout_exercises_sets> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"custom_metric\": n => { workout_exercises_sets.customMetric = n.getNumberValue(); },\n \"distance_meters\": n => { workout_exercises_sets.distanceMeters = n.getNumberValue(); },\n \"duration_seconds\": n => { workout_exercises_sets.durationSeconds = n.getNumberValue(); },\n \"index\": n => { workout_exercises_sets.index = n.getNumberValue(); },\n \"reps\": n => { workout_exercises_sets.reps = n.getNumberValue(); },\n \"rpe\": n => { workout_exercises_sets.rpe = n.getNumberValue(); },\n \"type\": n => { workout_exercises_sets.type = n.getStringValue(); },\n \"weight_kg\": n => { workout_exercises_sets.weightKg = n.getNumberValue(); },\n }\n}\nexport interface ExerciseTemplate extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercise template ID.\n */\n id?: string | null;\n /**\n * A boolean indicating whether the exercise is a custom exercise.\n */\n isCustom?: boolean | null;\n /**\n * The primary muscle group of the exercise.\n */\n primaryMuscleGroup?: string | null;\n /**\n * The secondary muscle groups of the exercise.\n */\n secondaryMuscleGroups?: string[] | null;\n /**\n * The exercise title.\n */\n title?: string | null;\n /**\n * The exercise type.\n */\n type?: string | null;\n}\nexport interface PaginatedWorkoutEvents extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * An array of workout events (either updated or deleted)\n */\n events?: (DeletedWorkout | UpdatedWorkout)[] | null;\n /**\n * The current page number\n */\n page?: number | null;\n /**\n * The total number of pages available\n */\n pageCount?: number | null;\n}\nexport type PaginatedWorkoutEvents_events = DeletedWorkout | UpdatedWorkout;\nexport interface PostRoutineFolderRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The routine_folder property\n */\n routineFolder?: PostRoutineFolderRequestBody_routine_folder | null;\n}\nexport interface PostRoutineFolderRequestBody_routine_folder extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The title of the routine folder.\n */\n title?: string | null;\n}\nexport interface PostRoutinesRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The routine property\n */\n routine?: PostRoutinesRequestBody_routine | null;\n}\nexport interface PostRoutinesRequestBody_routine extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercises property\n */\n exercises?: PostRoutinesRequestExercise[] | null;\n /**\n * The folder id the routine should be added to. Pass null to insert the routine into default \"My Routines\" folder\n */\n folderId?: number | null;\n /**\n * Additional notes for the routine.\n */\n notes?: string | null;\n /**\n * The title of the routine.\n */\n title?: string | null;\n}\nexport interface PostRoutinesRequestExercise extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The ID of the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Additional notes for the exercise.\n */\n notes?: string | null;\n /**\n * The rest time in seconds.\n */\n restSeconds?: number | null;\n /**\n * The sets property\n */\n sets?: PostRoutinesRequestSet[] | null;\n /**\n * The ID of the superset.\n */\n supersetId?: number | null;\n}\nexport interface PostRoutinesRequestSet extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A custom metric for the set. Currently used for steps and floors.\n */\n customMetric?: number | null;\n /**\n * The distance in meters.\n */\n distanceMeters?: number | null;\n /**\n * The duration in seconds.\n */\n durationSeconds?: number | null;\n /**\n * The number of repetitions.\n */\n reps?: number | null;\n /**\n * The type of the set.\n */\n type?: PostRoutinesRequestSet_type | null;\n /**\n * The weight in kilograms.\n */\n weightKg?: number | null;\n}\nexport type PostRoutinesRequestSet_type = (typeof PostRoutinesRequestSet_typeObject)[keyof typeof PostRoutinesRequestSet_typeObject];\nexport interface PostWorkoutsRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The workout property\n */\n workout?: PostWorkoutsRequestBody_workout | null;\n}\nexport interface PostWorkoutsRequestBody_workout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A description for the workout workout.\n */\n description?: string | null;\n /**\n * The time the workout ended.\n */\n endTime?: string | null;\n /**\n * The exercises property\n */\n exercises?: PostWorkoutsRequestExercise[] | null;\n /**\n * A boolean indicating if the workout is private.\n */\n isPrivate?: boolean | null;\n /**\n * The time the workout started.\n */\n startTime?: string | null;\n /**\n * The title of the workout.\n */\n title?: string | null;\n}\nexport interface PostWorkoutsRequestExercise extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The ID of the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Additional notes for the exercise.\n */\n notes?: string | null;\n /**\n * The sets property\n */\n sets?: PostWorkoutsRequestSet[] | null;\n /**\n * The ID of the superset.\n */\n supersetId?: number | null;\n}\nexport interface PostWorkoutsRequestSet extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A custom metric for the set. Currently used for steps and floors.\n */\n customMetric?: number | null;\n /**\n * The distance in meters.\n */\n distanceMeters?: number | null;\n /**\n * The duration in seconds.\n */\n durationSeconds?: number | null;\n /**\n * The number of repetitions.\n */\n reps?: number | null;\n /**\n * The Rating of Perceived Exertion (RPE).\n */\n rpe?: number | null;\n /**\n * The type of the set.\n */\n type?: PostWorkoutsRequestSet_type | null;\n /**\n * The weight in kilograms.\n */\n weightKg?: number | null;\n}\nexport type PostWorkoutsRequestSet_type = (typeof PostWorkoutsRequestSet_typeObject)[keyof typeof PostWorkoutsRequestSet_typeObject];\nexport interface PutRoutinesRequestBody extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The routine property\n */\n routine?: PutRoutinesRequestBody_routine | null;\n}\nexport interface PutRoutinesRequestBody_routine extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercises property\n */\n exercises?: PutRoutinesRequestExercise[] | null;\n /**\n * Additional notes for the routine.\n */\n notes?: string | null;\n /**\n * The title of the routine.\n */\n title?: string | null;\n}\nexport interface PutRoutinesRequestExercise extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The ID of the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Additional notes for the exercise.\n */\n notes?: string | null;\n /**\n * The rest time in seconds.\n */\n restSeconds?: number | null;\n /**\n * The sets property\n */\n sets?: PutRoutinesRequestSet[] | null;\n /**\n * The ID of the superset.\n */\n supersetId?: number | null;\n}\nexport interface PutRoutinesRequestSet extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * A custom metric for the set. Currently used for steps and floors.\n */\n customMetric?: number | null;\n /**\n * The distance in meters.\n */\n distanceMeters?: number | null;\n /**\n * The duration in seconds.\n */\n durationSeconds?: number | null;\n /**\n * The number of repetitions.\n */\n reps?: number | null;\n /**\n * The type of the set.\n */\n type?: PutRoutinesRequestSet_type | null;\n /**\n * The weight in kilograms.\n */\n weightKg?: number | null;\n}\nexport type PutRoutinesRequestSet_type = (typeof PutRoutinesRequestSet_typeObject)[keyof typeof PutRoutinesRequestSet_typeObject];\nexport interface Routine extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * ISO 8601 timestamp of when the routine was created.\n */\n createdAt?: string | null;\n /**\n * The exercises property\n */\n exercises?: Routine_exercises[] | null;\n /**\n * The routine folder ID.\n */\n folderId?: number | null;\n /**\n * The routine ID.\n */\n id?: string | null;\n /**\n * The routine title.\n */\n title?: string | null;\n /**\n * ISO 8601 timestamp of when the routine was last updated.\n */\n updatedAt?: string | null;\n}\nexport interface Routine_exercises extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The id of the exercise template. This can be used to fetch the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Index indicating the order of the exercise in the routine.\n */\n index?: number | null;\n /**\n * Routine notes on the exercise\n */\n notes?: string | null;\n /**\n * The sets property\n */\n sets?: Routine_exercises_sets[] | null;\n /**\n * The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.\n */\n supersetsId?: number | null;\n /**\n * Title of the exercise\n */\n title?: string | null;\n}\nexport interface Routine_exercises_sets extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)\n */\n customMetric?: number | null;\n /**\n * Number of meters logged for the set\n */\n distanceMeters?: number | null;\n /**\n * Number of seconds logged for the set\n */\n durationSeconds?: number | null;\n /**\n * Index indicating the order of the set in the routine.\n */\n index?: number | null;\n /**\n * Number of reps logged for the set\n */\n reps?: number | null;\n /**\n * RPE (Relative perceived exertion) value logged for the set\n */\n rpe?: number | null;\n /**\n * The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'\n */\n type?: string | null;\n /**\n * Weight lifted in kilograms.\n */\n weightKg?: number | null;\n}\nexport interface RoutineFolder extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * ISO 8601 timestamp of when the folder was created.\n */\n createdAt?: string | null;\n /**\n * The routine folder ID.\n */\n id?: number | null;\n /**\n * The routine folder index. Describes the order of the folder in the list.\n */\n index?: number | null;\n /**\n * The routine folder title.\n */\n title?: string | null;\n /**\n * ISO 8601 timestamp of when the folder was last updated.\n */\n updatedAt?: string | null;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeDeletedWorkout(writer: SerializationWriter, deletedWorkout: Partial<DeletedWorkout> | undefined | null = {}) : void {\n if (deletedWorkout) {\n writer.writeStringValue(\"deleted_at\", deletedWorkout.deletedAt);\n writer.writeStringValue(\"id\", deletedWorkout.id);\n writer.writeStringValue(\"type\", deletedWorkout.type);\n writer.writeAdditionalData(deletedWorkout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeExerciseTemplate(writer: SerializationWriter, exerciseTemplate: Partial<ExerciseTemplate> | undefined | null = {}) : void {\n if (exerciseTemplate) {\n writer.writeStringValue(\"id\", exerciseTemplate.id);\n writer.writeBooleanValue(\"is_custom\", exerciseTemplate.isCustom);\n writer.writeStringValue(\"primary_muscle_group\", exerciseTemplate.primaryMuscleGroup);\n writer.writeCollectionOfPrimitiveValues<string>(\"secondary_muscle_groups\", exerciseTemplate.secondaryMuscleGroups);\n writer.writeStringValue(\"title\", exerciseTemplate.title);\n writer.writeStringValue(\"type\", exerciseTemplate.type);\n writer.writeAdditionalData(exerciseTemplate.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePaginatedWorkoutEvents(writer: SerializationWriter, paginatedWorkoutEvents: Partial<PaginatedWorkoutEvents> | undefined | null = {}) : void {\n if (paginatedWorkoutEvents) {\n writer.writeCollectionOfObjectValues<DeletedWorkout | UpdatedWorkout>(\"events\", paginatedWorkoutEvents.events, serializePaginatedWorkoutEvents_events);\n writer.writeNumberValue(\"page\", paginatedWorkoutEvents.page);\n writer.writeNumberValue(\"page_count\", paginatedWorkoutEvents.pageCount);\n writer.writeAdditionalData(paginatedWorkoutEvents.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePaginatedWorkoutEvents_events(writer: SerializationWriter, paginatedWorkoutEvents_events: Partial<DeletedWorkout | UpdatedWorkout> | undefined | null = {}) : void {\n serializeDeletedWorkout(writer, paginatedWorkoutEvents_events as DeletedWorkout);\n serializeUpdatedWorkout(writer, paginatedWorkoutEvents_events as UpdatedWorkout);\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutineFolderRequestBody(writer: SerializationWriter, postRoutineFolderRequestBody: Partial<PostRoutineFolderRequestBody> | undefined | null = {}) : void {\n if (postRoutineFolderRequestBody) {\n writer.writeObjectValue<PostRoutineFolderRequestBody_routine_folder>(\"routine_folder\", postRoutineFolderRequestBody.routineFolder, serializePostRoutineFolderRequestBody_routine_folder);\n writer.writeAdditionalData(postRoutineFolderRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutineFolderRequestBody_routine_folder(writer: SerializationWriter, postRoutineFolderRequestBody_routine_folder: Partial<PostRoutineFolderRequestBody_routine_folder> | undefined | null = {}) : void {\n if (postRoutineFolderRequestBody_routine_folder) {\n writer.writeStringValue(\"title\", postRoutineFolderRequestBody_routine_folder.title);\n writer.writeAdditionalData(postRoutineFolderRequestBody_routine_folder.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestBody(writer: SerializationWriter, postRoutinesRequestBody: Partial<PostRoutinesRequestBody> | undefined | null = {}) : void {\n if (postRoutinesRequestBody) {\n writer.writeObjectValue<PostRoutinesRequestBody_routine>(\"routine\", postRoutinesRequestBody.routine, serializePostRoutinesRequestBody_routine);\n writer.writeAdditionalData(postRoutinesRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestBody_routine(writer: SerializationWriter, postRoutinesRequestBody_routine: Partial<PostRoutinesRequestBody_routine> | undefined | null = {}) : void {\n if (postRoutinesRequestBody_routine) {\n writer.writeCollectionOfObjectValues<PostRoutinesRequestExercise>(\"exercises\", postRoutinesRequestBody_routine.exercises, serializePostRoutinesRequestExercise);\n writer.writeNumberValue(\"folder_id\", postRoutinesRequestBody_routine.folderId);\n writer.writeStringValue(\"notes\", postRoutinesRequestBody_routine.notes);\n writer.writeStringValue(\"title\", postRoutinesRequestBody_routine.title);\n writer.writeAdditionalData(postRoutinesRequestBody_routine.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestExercise(writer: SerializationWriter, postRoutinesRequestExercise: Partial<PostRoutinesRequestExercise> | undefined | null = {}) : void {\n if (postRoutinesRequestExercise) {\n writer.writeStringValue(\"exercise_template_id\", postRoutinesRequestExercise.exerciseTemplateId);\n writer.writeStringValue(\"notes\", postRoutinesRequestExercise.notes);\n writer.writeNumberValue(\"rest_seconds\", postRoutinesRequestExercise.restSeconds);\n writer.writeCollectionOfObjectValues<PostRoutinesRequestSet>(\"sets\", postRoutinesRequestExercise.sets, serializePostRoutinesRequestSet);\n writer.writeNumberValue(\"superset_id\", postRoutinesRequestExercise.supersetId);\n writer.writeAdditionalData(postRoutinesRequestExercise.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostRoutinesRequestSet(writer: SerializationWriter, postRoutinesRequestSet: Partial<PostRoutinesRequestSet> | undefined | null = {}) : void {\n if (postRoutinesRequestSet) {\n writer.writeNumberValue(\"custom_metric\", postRoutinesRequestSet.customMetric);\n writer.writeNumberValue(\"distance_meters\", postRoutinesRequestSet.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", postRoutinesRequestSet.durationSeconds);\n writer.writeNumberValue(\"reps\", postRoutinesRequestSet.reps);\n writer.writeEnumValue<PostRoutinesRequestSet_type>(\"type\", postRoutinesRequestSet.type);\n writer.writeNumberValue(\"weight_kg\", postRoutinesRequestSet.weightKg);\n writer.writeAdditionalData(postRoutinesRequestSet.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestBody(writer: SerializationWriter, postWorkoutsRequestBody: Partial<PostWorkoutsRequestBody> | undefined | null = {}) : void {\n if (postWorkoutsRequestBody) {\n writer.writeObjectValue<PostWorkoutsRequestBody_workout>(\"workout\", postWorkoutsRequestBody.workout, serializePostWorkoutsRequestBody_workout);\n writer.writeAdditionalData(postWorkoutsRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestBody_workout(writer: SerializationWriter, postWorkoutsRequestBody_workout: Partial<PostWorkoutsRequestBody_workout> | undefined | null = {}) : void {\n if (postWorkoutsRequestBody_workout) {\n writer.writeStringValue(\"description\", postWorkoutsRequestBody_workout.description);\n writer.writeStringValue(\"end_time\", postWorkoutsRequestBody_workout.endTime);\n writer.writeCollectionOfObjectValues<PostWorkoutsRequestExercise>(\"exercises\", postWorkoutsRequestBody_workout.exercises, serializePostWorkoutsRequestExercise);\n writer.writeBooleanValue(\"is_private\", postWorkoutsRequestBody_workout.isPrivate);\n writer.writeStringValue(\"start_time\", postWorkoutsRequestBody_workout.startTime);\n writer.writeStringValue(\"title\", postWorkoutsRequestBody_workout.title);\n writer.writeAdditionalData(postWorkoutsRequestBody_workout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestExercise(writer: SerializationWriter, postWorkoutsRequestExercise: Partial<PostWorkoutsRequestExercise> | undefined | null = {}) : void {\n if (postWorkoutsRequestExercise) {\n writer.writeStringValue(\"exercise_template_id\", postWorkoutsRequestExercise.exerciseTemplateId);\n writer.writeStringValue(\"notes\", postWorkoutsRequestExercise.notes);\n writer.writeCollectionOfObjectValues<PostWorkoutsRequestSet>(\"sets\", postWorkoutsRequestExercise.sets, serializePostWorkoutsRequestSet);\n writer.writeNumberValue(\"superset_id\", postWorkoutsRequestExercise.supersetId);\n writer.writeAdditionalData(postWorkoutsRequestExercise.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePostWorkoutsRequestSet(writer: SerializationWriter, postWorkoutsRequestSet: Partial<PostWorkoutsRequestSet> | undefined | null = {}) : void {\n if (postWorkoutsRequestSet) {\n writer.writeNumberValue(\"custom_metric\", postWorkoutsRequestSet.customMetric);\n writer.writeNumberValue(\"distance_meters\", postWorkoutsRequestSet.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", postWorkoutsRequestSet.durationSeconds);\n writer.writeNumberValue(\"reps\", postWorkoutsRequestSet.reps);\n writer.writeNumberValue(\"rpe\", postWorkoutsRequestSet.rpe);\n writer.writeEnumValue<PostWorkoutsRequestSet_type>(\"type\", postWorkoutsRequestSet.type);\n writer.writeNumberValue(\"weight_kg\", postWorkoutsRequestSet.weightKg);\n writer.writeAdditionalData(postWorkoutsRequestSet.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestBody(writer: SerializationWriter, putRoutinesRequestBody: Partial<PutRoutinesRequestBody> | undefined | null = {}) : void {\n if (putRoutinesRequestBody) {\n writer.writeObjectValue<PutRoutinesRequestBody_routine>(\"routine\", putRoutinesRequestBody.routine, serializePutRoutinesRequestBody_routine);\n writer.writeAdditionalData(putRoutinesRequestBody.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestBody_routine(writer: SerializationWriter, putRoutinesRequestBody_routine: Partial<PutRoutinesRequestBody_routine> | undefined | null = {}) : void {\n if (putRoutinesRequestBody_routine) {\n writer.writeCollectionOfObjectValues<PutRoutinesRequestExercise>(\"exercises\", putRoutinesRequestBody_routine.exercises, serializePutRoutinesRequestExercise);\n writer.writeStringValue(\"notes\", putRoutinesRequestBody_routine.notes);\n writer.writeStringValue(\"title\", putRoutinesRequestBody_routine.title);\n writer.writeAdditionalData(putRoutinesRequestBody_routine.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestExercise(writer: SerializationWriter, putRoutinesRequestExercise: Partial<PutRoutinesRequestExercise> | undefined | null = {}) : void {\n if (putRoutinesRequestExercise) {\n writer.writeStringValue(\"exercise_template_id\", putRoutinesRequestExercise.exerciseTemplateId);\n writer.writeStringValue(\"notes\", putRoutinesRequestExercise.notes);\n writer.writeNumberValue(\"rest_seconds\", putRoutinesRequestExercise.restSeconds);\n writer.writeCollectionOfObjectValues<PutRoutinesRequestSet>(\"sets\", putRoutinesRequestExercise.sets, serializePutRoutinesRequestSet);\n writer.writeNumberValue(\"superset_id\", putRoutinesRequestExercise.supersetId);\n writer.writeAdditionalData(putRoutinesRequestExercise.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializePutRoutinesRequestSet(writer: SerializationWriter, putRoutinesRequestSet: Partial<PutRoutinesRequestSet> | undefined | null = {}) : void {\n if (putRoutinesRequestSet) {\n writer.writeNumberValue(\"custom_metric\", putRoutinesRequestSet.customMetric);\n writer.writeNumberValue(\"distance_meters\", putRoutinesRequestSet.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", putRoutinesRequestSet.durationSeconds);\n writer.writeNumberValue(\"reps\", putRoutinesRequestSet.reps);\n writer.writeEnumValue<PutRoutinesRequestSet_type>(\"type\", putRoutinesRequestSet.type);\n writer.writeNumberValue(\"weight_kg\", putRoutinesRequestSet.weightKg);\n writer.writeAdditionalData(putRoutinesRequestSet.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine(writer: SerializationWriter, routine: Partial<Routine> | undefined | null = {}) : void {\n if (routine) {\n writer.writeStringValue(\"created_at\", routine.createdAt);\n writer.writeCollectionOfObjectValues<Routine_exercises>(\"exercises\", routine.exercises, serializeRoutine_exercises);\n writer.writeNumberValue(\"folder_id\", routine.folderId);\n writer.writeStringValue(\"id\", routine.id);\n writer.writeStringValue(\"title\", routine.title);\n writer.writeStringValue(\"updated_at\", routine.updatedAt);\n writer.writeAdditionalData(routine.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine_exercises(writer: SerializationWriter, routine_exercises: Partial<Routine_exercises> | undefined | null = {}) : void {\n if (routine_exercises) {\n writer.writeStringValue(\"exercise_template_id\", routine_exercises.exerciseTemplateId);\n writer.writeNumberValue(\"index\", routine_exercises.index);\n writer.writeStringValue(\"notes\", routine_exercises.notes);\n writer.writeCollectionOfObjectValues<Routine_exercises_sets>(\"sets\", routine_exercises.sets, serializeRoutine_exercises_sets);\n writer.writeNumberValue(\"supersets_id\", routine_exercises.supersetsId);\n writer.writeStringValue(\"title\", routine_exercises.title);\n writer.writeAdditionalData(routine_exercises.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine_exercises_sets(writer: SerializationWriter, routine_exercises_sets: Partial<Routine_exercises_sets> | undefined | null = {}) : void {\n if (routine_exercises_sets) {\n writer.writeNumberValue(\"custom_metric\", routine_exercises_sets.customMetric);\n writer.writeNumberValue(\"distance_meters\", routine_exercises_sets.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", routine_exercises_sets.durationSeconds);\n writer.writeNumberValue(\"index\", routine_exercises_sets.index);\n writer.writeNumberValue(\"reps\", routine_exercises_sets.reps);\n writer.writeNumberValue(\"rpe\", routine_exercises_sets.rpe);\n writer.writeStringValue(\"type\", routine_exercises_sets.type);\n writer.writeNumberValue(\"weight_kg\", routine_exercises_sets.weightKg);\n writer.writeAdditionalData(routine_exercises_sets.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutineFolder(writer: SerializationWriter, routineFolder: Partial<RoutineFolder> | undefined | null = {}) : void {\n if (routineFolder) {\n writer.writeStringValue(\"created_at\", routineFolder.createdAt);\n writer.writeNumberValue(\"id\", routineFolder.id);\n writer.writeNumberValue(\"index\", routineFolder.index);\n writer.writeStringValue(\"title\", routineFolder.title);\n writer.writeStringValue(\"updated_at\", routineFolder.updatedAt);\n writer.writeAdditionalData(routineFolder.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeUpdatedWorkout(writer: SerializationWriter, updatedWorkout: Partial<UpdatedWorkout> | undefined | null = {}) : void {\n if (updatedWorkout) {\n writer.writeStringValue(\"type\", updatedWorkout.type);\n writer.writeObjectValue<Workout>(\"workout\", updatedWorkout.workout, serializeWorkout);\n writer.writeAdditionalData(updatedWorkout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout(writer: SerializationWriter, workout: Partial<Workout> | undefined | null = {}) : void {\n if (workout) {\n writer.writeStringValue(\"created_at\", workout.createdAt);\n writer.writeStringValue(\"description\", workout.description);\n writer.writeNumberValue(\"end_time\", workout.endTime);\n writer.writeCollectionOfObjectValues<Workout_exercises>(\"exercises\", workout.exercises, serializeWorkout_exercises);\n writer.writeStringValue(\"id\", workout.id);\n writer.writeNumberValue(\"start_time\", workout.startTime);\n writer.writeStringValue(\"title\", workout.title);\n writer.writeStringValue(\"updated_at\", workout.updatedAt);\n writer.writeAdditionalData(workout.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout_exercises(writer: SerializationWriter, workout_exercises: Partial<Workout_exercises> | undefined | null = {}) : void {\n if (workout_exercises) {\n writer.writeStringValue(\"exercise_template_id\", workout_exercises.exerciseTemplateId);\n writer.writeNumberValue(\"index\", workout_exercises.index);\n writer.writeStringValue(\"notes\", workout_exercises.notes);\n writer.writeCollectionOfObjectValues<Workout_exercises_sets>(\"sets\", workout_exercises.sets, serializeWorkout_exercises_sets);\n writer.writeNumberValue(\"supersets_id\", workout_exercises.supersetsId);\n writer.writeStringValue(\"title\", workout_exercises.title);\n writer.writeAdditionalData(workout_exercises.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout_exercises_sets(writer: SerializationWriter, workout_exercises_sets: Partial<Workout_exercises_sets> | undefined | null = {}) : void {\n if (workout_exercises_sets) {\n writer.writeNumberValue(\"custom_metric\", workout_exercises_sets.customMetric);\n writer.writeNumberValue(\"distance_meters\", workout_exercises_sets.distanceMeters);\n writer.writeNumberValue(\"duration_seconds\", workout_exercises_sets.durationSeconds);\n writer.writeNumberValue(\"index\", workout_exercises_sets.index);\n writer.writeNumberValue(\"reps\", workout_exercises_sets.reps);\n writer.writeNumberValue(\"rpe\", workout_exercises_sets.rpe);\n writer.writeStringValue(\"type\", workout_exercises_sets.type);\n writer.writeNumberValue(\"weight_kg\", workout_exercises_sets.weightKg);\n writer.writeAdditionalData(workout_exercises_sets.additionalData);\n }\n}\nexport interface UpdatedWorkout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Indicates the type of the event (updated)\n */\n type?: string | null;\n /**\n * The workout property\n */\n workout?: Workout | null;\n}\nexport interface Workout extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * ISO 8601 timestamp of when the workout was created.\n */\n createdAt?: string | null;\n /**\n * The workout description.\n */\n description?: string | null;\n /**\n * ISO 8601 timestamp of when the workout was recorded to have ended.\n */\n endTime?: number | null;\n /**\n * The exercises property\n */\n exercises?: Workout_exercises[] | null;\n /**\n * The workout ID.\n */\n id?: string | null;\n /**\n * ISO 8601 timestamp of when the workout was recorded to have started.\n */\n startTime?: number | null;\n /**\n * The workout title.\n */\n title?: string | null;\n /**\n * ISO 8601 timestamp of when the workout was last updated.\n */\n updatedAt?: string | null;\n}\nexport interface Workout_exercises extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The id of the exercise template. This can be used to fetch the exercise template.\n */\n exerciseTemplateId?: string | null;\n /**\n * Index indicating the order of the exercise in the workout.\n */\n index?: number | null;\n /**\n * Notes on the exercise\n */\n notes?: string | null;\n /**\n * The sets property\n */\n sets?: Workout_exercises_sets[] | null;\n /**\n * The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.\n */\n supersetsId?: number | null;\n /**\n * Title of the exercise\n */\n title?: string | null;\n}\nexport interface Workout_exercises_sets extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)\n */\n customMetric?: number | null;\n /**\n * Number of meters logged for the set\n */\n distanceMeters?: number | null;\n /**\n * Number of seconds logged for the set\n */\n durationSeconds?: number | null;\n /**\n * Index indicating the order of the set in the workout.\n */\n index?: number | null;\n /**\n * Number of reps logged for the set\n */\n reps?: number | null;\n /**\n * RPE (Relative perceived exertion) value logged for the set\n */\n rpe?: number | null;\n /**\n * The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'\n */\n type?: string | null;\n /**\n * Weight lifted in kilograms.\n */\n weightKg?: number | null;\n}\n/**\n * The type of the set.\n */\nexport const PostRoutinesRequestSet_typeObject = {\n Warmup: \"warmup\",\n Normal: \"normal\",\n Failure: \"failure\",\n Dropset: \"dropset\",\n} as const;\n/**\n * The type of the set.\n */\nexport const PostWorkoutsRequestSet_typeObject = {\n Warmup: \"warmup\",\n Normal: \"normal\",\n Failure: \"failure\",\n Dropset: \"dropset\",\n} as const;\n/**\n * The type of the set.\n */\nexport const PutRoutinesRequestSet_typeObject = {\n Warmup: \"warmup\",\n Normal: \"normal\",\n Failure: \"failure\",\n Dropset: \"dropset\",\n} as const;\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createExerciseTemplateFromDiscriminatorValue, type ExerciseTemplate } from '../../../models/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1/exercise_templates/{exerciseTemplateId}\n */\nexport interface WithExerciseTemplateItemRequestBuilder extends BaseRequestBuilder<WithExerciseTemplateItemRequestBuilder> {\n /**\n * Get a single exercise template by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<ExerciseTemplate>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ExerciseTemplate | undefined>;\n /**\n * Get a single exercise template by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithExerciseTemplateItemRequestBuilderUriTemplate = \"{+baseurl}/v1/exercise_templates/{exerciseTemplateId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithExerciseTemplateItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WithExerciseTemplateItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createExerciseTemplateFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createExerciseTemplateFromDiscriminatorValue, serializeExerciseTemplate, type ExerciseTemplate } from '../../models/index.js';\n// @ts-ignore\nimport { type WithExerciseTemplateItemRequestBuilder, WithExerciseTemplateItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Exercise_templatesGetResponse}\n */\n// @ts-ignore\nexport function createExercise_templatesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoExercise_templatesGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoExercise_templatesGetResponse(exercise_templatesGetResponse: Partial<Exercise_templatesGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"exercise_templates\": n => { exercise_templatesGetResponse.exerciseTemplates = n.getCollectionOfObjectValues<ExerciseTemplate>(createExerciseTemplateFromDiscriminatorValue); },\n \"page\": n => { exercise_templatesGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { exercise_templatesGetResponse.pageCount = n.getNumberValue(); },\n }\n}\nexport interface Exercise_templatesGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The exercise_templates property\n */\n exerciseTemplates?: ExerciseTemplate[] | null;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n}\n/**\n * Builds and executes requests for operations under /v1/exercise_templates\n */\nexport interface Exercise_templatesRequestBuilder extends BaseRequestBuilder<Exercise_templatesRequestBuilder> {\n /**\n * Gets an item from the ApiSdk.v1.exercise_templates.item collection\n * @param exerciseTemplateId The id of the exercise template\n * @returns {WithExerciseTemplateItemRequestBuilder}\n */\n byExerciseTemplateId(exerciseTemplateId: string) : WithExerciseTemplateItemRequestBuilder;\n /**\n * Get a paginated list of exercise templates available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Exercise_templatesGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<Exercise_templatesRequestBuilderGetQueryParameters> | undefined) : Promise<Exercise_templatesGetResponse | undefined>;\n /**\n * Get a paginated list of exercise templates available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<Exercise_templatesRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of exercise templates available on the account.\n */\nexport interface Exercise_templatesRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 100)\n */\n pageSize?: number;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeExercise_templatesGetResponse(writer: SerializationWriter, exercise_templatesGetResponse: Partial<Exercise_templatesGetResponse> | undefined | null = {}) : void {\n if (exercise_templatesGetResponse) {\n writer.writeCollectionOfObjectValues<ExerciseTemplate>(\"exercise_templates\", exercise_templatesGetResponse.exerciseTemplates, serializeExerciseTemplate);\n writer.writeNumberValue(\"page\", exercise_templatesGetResponse.page);\n writer.writeNumberValue(\"page_count\", exercise_templatesGetResponse.pageCount);\n writer.writeAdditionalData(exercise_templatesGetResponse.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const Exercise_templatesRequestBuilderUriTemplate = \"{+baseurl}/v1/exercise_templates{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const Exercise_templatesRequestBuilderNavigationMetadata: Record<Exclude<keyof Exercise_templatesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byExerciseTemplateId: {\n requestsMetadata: WithExerciseTemplateItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"exerciseTemplateId\"],\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const Exercise_templatesRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: Exercise_templatesRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createExercise_templatesGetResponseFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFolderFromDiscriminatorValue, type RoutineFolder } from '../../../models/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1/routine_folders/{folderId}\n */\nexport interface WithFolderItemRequestBuilder extends BaseRequestBuilder<WithFolderItemRequestBuilder> {\n /**\n * Get a single routine folder by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<RoutineFolder>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<RoutineFolder | undefined>;\n /**\n * Get a single routine folder by id.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithFolderItemRequestBuilderUriTemplate = \"{+baseurl}/v1/routine_folders/{folderId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithFolderItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WithFolderItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFolderFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFolderFromDiscriminatorValue, serializePostRoutineFolderRequestBody, serializeRoutineFolder, type PostRoutineFolderRequestBody, type RoutineFolder } from '../../models/index.js';\n// @ts-ignore\nimport { type WithFolderItemRequestBuilder, WithFolderItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine_foldersGetResponse}\n */\n// @ts-ignore\nexport function createRoutine_foldersGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine_foldersGetResponse;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {RoutineFolder400Error}\n */\n// @ts-ignore\nexport function createRoutineFolder400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutineFolder400Error;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine_foldersGetResponse(routine_foldersGetResponse: Partial<Routine_foldersGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"page\": n => { routine_foldersGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { routine_foldersGetResponse.pageCount = n.getNumberValue(); },\n \"routine_folders\": n => { routine_foldersGetResponse.routineFolders = n.getCollectionOfObjectValues<RoutineFolder>(createRoutineFolderFromDiscriminatorValue); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutineFolder400Error(routineFolder400Error: Partial<RoutineFolder400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routineFolder400Error.errorEscaped = n.getStringValue(); },\n }\n}\nexport interface Routine_foldersGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n /**\n * The routine_folders property\n */\n routineFolders?: RoutineFolder[] | null;\n}\n/**\n * Builds and executes requests for operations under /v1/routine_folders\n */\nexport interface Routine_foldersRequestBuilder extends BaseRequestBuilder<Routine_foldersRequestBuilder> {\n /**\n * Gets an item from the ApiSdk.v1.routine_folders.item collection\n * @param folderId The id of the routine folder\n * @returns {WithFolderItemRequestBuilder}\n */\n byFolderId(folderId: string) : WithFolderItemRequestBuilder;\n /**\n * Get a paginated list of routine folders available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Routine_foldersGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<Routine_foldersRequestBuilderGetQueryParameters> | undefined) : Promise<Routine_foldersGetResponse | undefined>;\n /**\n * Create a new routine folder. The folder will be created at index 0, and all other folders will have their indexes incremented.\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<RoutineFolder>}\n * @throws {RoutineFolder400Error} error when the service returns a 400 status code\n */\n post(body: PostRoutineFolderRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<RoutineFolder | undefined>;\n /**\n * Get a paginated list of routine folders available on the account.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<Routine_foldersRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n /**\n * Create a new routine folder. The folder will be created at index 0, and all other folders will have their indexes incremented.\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPostRequestInformation(body: PostRoutineFolderRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of routine folders available on the account.\n */\nexport interface Routine_foldersRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n}\nexport interface RoutineFolder400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine_foldersGetResponse(writer: SerializationWriter, routine_foldersGetResponse: Partial<Routine_foldersGetResponse> | undefined | null = {}) : void {\n if (routine_foldersGetResponse) {\n writer.writeNumberValue(\"page\", routine_foldersGetResponse.page);\n writer.writeNumberValue(\"page_count\", routine_foldersGetResponse.pageCount);\n writer.writeCollectionOfObjectValues<RoutineFolder>(\"routine_folders\", routine_foldersGetResponse.routineFolders, serializeRoutineFolder);\n writer.writeAdditionalData(routine_foldersGetResponse.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutineFolder400Error(writer: SerializationWriter, routineFolder400Error: Partial<RoutineFolder400Error> | undefined | null = {}) : void {\n if (routineFolder400Error) {\n writer.writeStringValue(\"error\", routineFolder400Error.errorEscaped);\n writer.writeAdditionalData(routineFolder400Error.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const Routine_foldersRequestBuilderUriTemplate = \"{+baseurl}/v1/routine_folders{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const Routine_foldersRequestBuilderNavigationMetadata: Record<Exclude<keyof Routine_foldersRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byFolderId: {\n requestsMetadata: WithFolderItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"folderId\"],\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const Routine_foldersRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: Routine_foldersRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutine_foldersGetResponseFromDiscriminatorValue,\n },\n post: {\n uriTemplate: Routine_foldersRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createRoutineFolder400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFolderFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostRoutineFolderRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFromDiscriminatorValue, serializePutRoutinesRequestBody, serializeRoutine, type PutRoutinesRequestBody, type Routine } from '../../../models/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine400Error}\n */\n// @ts-ignore\nexport function createRoutine400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine400Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine404Error}\n */\n// @ts-ignore\nexport function createRoutine404ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine404Error;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine400Error(routine400Error: Partial<Routine400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine404Error(routine404Error: Partial<Routine404Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine404Error.errorEscaped = n.getStringValue(); },\n }\n}\nexport interface Routine400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface Routine404Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine400Error(writer: SerializationWriter, routine400Error: Partial<Routine400Error> | undefined | null = {}) : void {\n if (routine400Error) {\n writer.writeStringValue(\"error\", routine400Error.errorEscaped);\n writer.writeAdditionalData(routine400Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine404Error(writer: SerializationWriter, routine404Error: Partial<Routine404Error> | undefined | null = {}) : void {\n if (routine404Error) {\n writer.writeStringValue(\"error\", routine404Error.errorEscaped);\n writer.writeAdditionalData(routine404Error.additionalData);\n }\n}\n/**\n * Builds and executes requests for operations under /v1/routines/{routineId}\n */\nexport interface WithRoutineItemRequestBuilder extends BaseRequestBuilder<WithRoutineItemRequestBuilder> {\n /**\n * Update an existing routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Routine>}\n * @throws {Routine400Error} error when the service returns a 400 status code\n * @throws {Routine404Error} error when the service returns a 404 status code\n */\n put(body: PutRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Routine | undefined>;\n /**\n * Update an existing routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPutRequestInformation(body: PutRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithRoutineItemRequestBuilderUriTemplate = \"{+baseurl}/v1/routines/{routineId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithRoutineItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n put: {\n uriTemplate: WithRoutineItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createRoutine400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n 404: createRoutine404ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePutRoutinesRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createRoutineFromDiscriminatorValue, serializePostRoutinesRequestBody, serializeRoutine, type PostRoutinesRequestBody, type Routine } from '../../models/index.js';\n// @ts-ignore\nimport { type WithRoutineItemRequestBuilder, WithRoutineItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine400Error}\n */\n// @ts-ignore\nexport function createRoutine400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine400Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Routine403Error}\n */\n// @ts-ignore\nexport function createRoutine403ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutine403Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {RoutinesGetResponse}\n */\n// @ts-ignore\nexport function createRoutinesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoRoutinesGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine400Error(routine400Error: Partial<Routine400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutine403Error(routine403Error: Partial<Routine403Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { routine403Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoRoutinesGetResponse(routinesGetResponse: Partial<RoutinesGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"page\": n => { routinesGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { routinesGetResponse.pageCount = n.getNumberValue(); },\n \"routines\": n => { routinesGetResponse.routines = n.getCollectionOfObjectValues<Routine>(createRoutineFromDiscriminatorValue); },\n }\n}\nexport interface Routine400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface Routine403Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface RoutinesGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n /**\n * The routines property\n */\n routines?: Routine[] | null;\n}\n/**\n * Builds and executes requests for operations under /v1/routines\n */\nexport interface RoutinesRequestBuilder extends BaseRequestBuilder<RoutinesRequestBuilder> {\n /**\n * Gets an item from the ApiSdk.v1.routines.item collection\n * @param routineId The id of the routine\n * @returns {WithRoutineItemRequestBuilder}\n */\n byRoutineId(routineId: string) : WithRoutineItemRequestBuilder;\n /**\n * Get a paginated list of routines\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<RoutinesGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<RoutinesRequestBuilderGetQueryParameters> | undefined) : Promise<RoutinesGetResponse | undefined>;\n /**\n * Create a new routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Routine>}\n * @throws {Routine400Error} error when the service returns a 400 status code\n * @throws {Routine403Error} error when the service returns a 403 status code\n */\n post(body: PostRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Routine | undefined>;\n /**\n * Get a paginated list of routines\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<RoutinesRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n /**\n * Create a new routine\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPostRequestInformation(body: PostRoutinesRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of routines\n */\nexport interface RoutinesRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine400Error(writer: SerializationWriter, routine400Error: Partial<Routine400Error> | undefined | null = {}) : void {\n if (routine400Error) {\n writer.writeStringValue(\"error\", routine400Error.errorEscaped);\n writer.writeAdditionalData(routine400Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutine403Error(writer: SerializationWriter, routine403Error: Partial<Routine403Error> | undefined | null = {}) : void {\n if (routine403Error) {\n writer.writeStringValue(\"error\", routine403Error.errorEscaped);\n writer.writeAdditionalData(routine403Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeRoutinesGetResponse(writer: SerializationWriter, routinesGetResponse: Partial<RoutinesGetResponse> | undefined | null = {}) : void {\n if (routinesGetResponse) {\n writer.writeNumberValue(\"page\", routinesGetResponse.page);\n writer.writeNumberValue(\"page_count\", routinesGetResponse.pageCount);\n writer.writeCollectionOfObjectValues<Routine>(\"routines\", routinesGetResponse.routines, serializeRoutine);\n writer.writeAdditionalData(routinesGetResponse.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const RoutinesRequestBuilderUriTemplate = \"{+baseurl}/v1/routines{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const RoutinesRequestBuilderNavigationMetadata: Record<Exclude<keyof RoutinesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byRoutineId: {\n requestsMetadata: WithRoutineItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"routineId\"],\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const RoutinesRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: RoutinesRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutinesGetResponseFromDiscriminatorValue,\n },\n post: {\n uriTemplate: RoutinesRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createRoutine400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n 403: createRoutine403ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createRoutineFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostRoutinesRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { type AdditionalDataHolder, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\nexport interface CountGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * The total number of workouts\n */\n workoutCount?: number | null;\n}\n/**\n * Builds and executes requests for operations under /v1/workouts/count\n */\nexport interface CountRequestBuilder extends BaseRequestBuilder<CountRequestBuilder> {\n /**\n * Get the total number of workouts on the account\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<CountGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<CountGetResponse | undefined>;\n /**\n * Get the total number of workouts on the account\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {CountGetResponse}\n */\n// @ts-ignore\nexport function createCountGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoCountGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoCountGetResponse(countGetResponse: Partial<CountGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"workout_count\": n => { countGetResponse.workoutCount = n.getNumberValue(); },\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeCountGetResponse(writer: SerializationWriter, countGetResponse: Partial<CountGetResponse> | undefined | null = {}) : void {\n if (countGetResponse) {\n writer.writeNumberValue(\"workout_count\", countGetResponse.workoutCount);\n writer.writeAdditionalData(countGetResponse.additionalData);\n }\n}\n/**\n * Uri template for the request builder.\n */\nexport const CountRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts/count\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const CountRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: CountRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createCountGetResponseFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createPaginatedWorkoutEventsFromDiscriminatorValue, type PaginatedWorkoutEvents } from '../../../models/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1/workouts/events\n */\nexport interface EventsRequestBuilder extends BaseRequestBuilder<EventsRequestBuilder> {\n /**\n * Returns a paginated array of workout events, indicating updates or deletions.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<PaginatedWorkoutEvents>}\n */\n get(requestConfiguration?: RequestConfiguration<EventsRequestBuilderGetQueryParameters> | undefined) : Promise<PaginatedWorkoutEvents | undefined>;\n /**\n * Returns a paginated array of workout events, indicating updates or deletions.\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<EventsRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n}\n/**\n * Returns a paginated array of workout events, indicating updates or deletions.\n */\nexport interface EventsRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n since?: string;\n}\n/**\n * Uri template for the request builder.\n */\nexport const EventsRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts/events{?page*,pageSize*,since*}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const EventsRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: EventsRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createPaginatedWorkoutEventsFromDiscriminatorValue,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createWorkoutFromDiscriminatorValue, serializePostWorkoutsRequestBody, serializeWorkout, type PostWorkoutsRequestBody, type Workout } from '../../../models/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout400Error}\n */\n// @ts-ignore\nexport function createWorkout400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout400Error;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout400Error(workout400Error: Partial<Workout400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { workout400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout400Error(writer: SerializationWriter, workout400Error: Partial<Workout400Error> | undefined | null = {}) : void {\n if (workout400Error) {\n writer.writeStringValue(\"error\", workout400Error.errorEscaped);\n writer.writeAdditionalData(workout400Error.additionalData);\n }\n}\n/**\n * Builds and executes requests for operations under /v1/workouts/{workoutId}\n */\nexport interface WithWorkoutItemRequestBuilder extends BaseRequestBuilder<WithWorkoutItemRequestBuilder> {\n /**\n * Get a single workout’s complete details by the workoutId\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Workout>}\n */\n get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Workout | undefined>;\n /**\n * Update an existing workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Workout>}\n * @throws {Workout400Error} error when the service returns a 400 status code\n */\n put(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Workout | undefined>;\n /**\n * Get a single workout’s complete details by the workoutId\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n /**\n * Update an existing workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPutRequestInformation(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\nexport interface Workout400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WithWorkoutItemRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts/{workoutId}\";\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WithWorkoutItemRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WithWorkoutItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutFromDiscriminatorValue,\n },\n put: {\n uriTemplate: WithWorkoutItemRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createWorkout400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostWorkoutsRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { createWorkoutFromDiscriminatorValue, serializePostWorkoutsRequestBody, serializeWorkout, type PostWorkoutsRequestBody, type Workout } from '../../models/index.js';\n// @ts-ignore\nimport { CountRequestBuilderRequestsMetadata, type CountRequestBuilder } from './count/index.js';\n// @ts-ignore\nimport { EventsRequestBuilderRequestsMetadata, type EventsRequestBuilder } from './events/index.js';\n// @ts-ignore\nimport { type WithWorkoutItemRequestBuilder, WithWorkoutItemRequestBuilderRequestsMetadata } from './item/index.js';\n// @ts-ignore\nimport { type AdditionalDataHolder, type ApiError, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';\n\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {Workout400Error}\n */\n// @ts-ignore\nexport function createWorkout400ErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkout400Error;\n}\n/**\n * Creates a new instance of the appropriate class based on discriminator value\n * @param parseNode The parse node to use to read the discriminator value and create the object\n * @returns {WorkoutsGetResponse}\n */\n// @ts-ignore\nexport function createWorkoutsGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {\n return deserializeIntoWorkoutsGetResponse;\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkout400Error(workout400Error: Partial<Workout400Error> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"error\": n => { workout400Error.errorEscaped = n.getStringValue(); },\n }\n}\n/**\n * The deserialization information for the current model\n * @returns {Record<string, (node: ParseNode) => void>}\n */\n// @ts-ignore\nexport function deserializeIntoWorkoutsGetResponse(workoutsGetResponse: Partial<WorkoutsGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {\n return {\n \"page\": n => { workoutsGetResponse.page = n.getNumberValue(); },\n \"page_count\": n => { workoutsGetResponse.pageCount = n.getNumberValue(); },\n \"workouts\": n => { workoutsGetResponse.workouts = n.getCollectionOfObjectValues<Workout>(createWorkoutFromDiscriminatorValue); },\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkout400Error(writer: SerializationWriter, workout400Error: Partial<Workout400Error> | undefined | null = {}) : void {\n if (workout400Error) {\n writer.writeStringValue(\"error\", workout400Error.errorEscaped);\n writer.writeAdditionalData(workout400Error.additionalData);\n }\n}\n/**\n * Serializes information the current object\n * @param writer Serialization writer to use to serialize this model\n */\n// @ts-ignore\nexport function serializeWorkoutsGetResponse(writer: SerializationWriter, workoutsGetResponse: Partial<WorkoutsGetResponse> | undefined | null = {}) : void {\n if (workoutsGetResponse) {\n writer.writeNumberValue(\"page\", workoutsGetResponse.page);\n writer.writeNumberValue(\"page_count\", workoutsGetResponse.pageCount);\n writer.writeCollectionOfObjectValues<Workout>(\"workouts\", workoutsGetResponse.workouts, serializeWorkout);\n writer.writeAdditionalData(workoutsGetResponse.additionalData);\n }\n}\nexport interface Workout400Error extends AdditionalDataHolder, ApiError, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Error message\n */\n errorEscaped?: string | null;\n}\nexport interface WorkoutsGetResponse extends AdditionalDataHolder, Parsable {\n /**\n * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.\n */\n additionalData?: Record<string, unknown>;\n /**\n * Current page number\n */\n page?: number | null;\n /**\n * Total number of pages\n */\n pageCount?: number | null;\n /**\n * The workouts property\n */\n workouts?: Workout[] | null;\n}\n/**\n * Builds and executes requests for operations under /v1/workouts\n */\nexport interface WorkoutsRequestBuilder extends BaseRequestBuilder<WorkoutsRequestBuilder> {\n /**\n * The count property\n */\n get count(): CountRequestBuilder;\n /**\n * The events property\n */\n get events(): EventsRequestBuilder;\n /**\n * Gets an item from the ApiSdk.v1.workouts.item collection\n * @param workoutId The id of the workout\n * @returns {WithWorkoutItemRequestBuilder}\n */\n byWorkoutId(workoutId: string) : WithWorkoutItemRequestBuilder;\n /**\n * Get a paginated list of workouts\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<WorkoutsGetResponse>}\n */\n get(requestConfiguration?: RequestConfiguration<WorkoutsRequestBuilderGetQueryParameters> | undefined) : Promise<WorkoutsGetResponse | undefined>;\n /**\n * Create a new workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {Promise<Workout>}\n * @throws {Workout400Error} error when the service returns a 400 status code\n */\n post(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Workout | undefined>;\n /**\n * Get a paginated list of workouts\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toGetRequestInformation(requestConfiguration?: RequestConfiguration<WorkoutsRequestBuilderGetQueryParameters> | undefined) : RequestInformation;\n /**\n * Create a new workout\n * @param body The request body\n * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.\n * @returns {RequestInformation}\n */\n toPostRequestInformation(body: PostWorkoutsRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;\n}\n/**\n * Get a paginated list of workouts\n */\nexport interface WorkoutsRequestBuilderGetQueryParameters {\n /**\n * Page number (Must be 1 or greater)\n */\n page?: number;\n /**\n * Number of items on the requested page (Max 10)\n */\n pageSize?: number;\n}\n/**\n * Uri template for the request builder.\n */\nexport const WorkoutsRequestBuilderUriTemplate = \"{+baseurl}/v1/workouts{?page*,pageSize*}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const WorkoutsRequestBuilderNavigationMetadata: Record<Exclude<keyof WorkoutsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n byWorkoutId: {\n requestsMetadata: WithWorkoutItemRequestBuilderRequestsMetadata,\n pathParametersMappings: [\"workoutId\"],\n },\n count: {\n requestsMetadata: CountRequestBuilderRequestsMetadata,\n },\n events: {\n requestsMetadata: EventsRequestBuilderRequestsMetadata,\n },\n};\n/**\n * Metadata for all the requests in the request builder.\n */\nexport const WorkoutsRequestBuilderRequestsMetadata: RequestsMetadata = {\n get: {\n uriTemplate: WorkoutsRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutsGetResponseFromDiscriminatorValue,\n },\n post: {\n uriTemplate: WorkoutsRequestBuilderUriTemplate,\n responseBodyContentType: \"application/json\",\n errorMappings: {\n 400: createWorkout400ErrorFromDiscriminatorValue as ParsableFactory<Parsable>,\n },\n adapterMethodName: \"send\",\n responseBodyFactory: createWorkoutFromDiscriminatorValue,\n requestBodyContentType: \"application/json\",\n requestBodySerializer: serializePostWorkoutsRequestBody,\n requestInformationContentSetMethod: \"setContentFromParsable\",\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { Exercise_templatesRequestBuilderNavigationMetadata, Exercise_templatesRequestBuilderRequestsMetadata, type Exercise_templatesRequestBuilder } from './exercise_templates/index.js';\n// @ts-ignore\nimport { Routine_foldersRequestBuilderNavigationMetadata, Routine_foldersRequestBuilderRequestsMetadata, type Routine_foldersRequestBuilder } from './routine_folders/index.js';\n// @ts-ignore\nimport { RoutinesRequestBuilderNavigationMetadata, RoutinesRequestBuilderRequestsMetadata, type RoutinesRequestBuilder } from './routines/index.js';\n// @ts-ignore\nimport { type WorkoutsRequestBuilder, WorkoutsRequestBuilderNavigationMetadata, WorkoutsRequestBuilderRequestsMetadata } from './workouts/index.js';\n// @ts-ignore\nimport { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';\n\n/**\n * Builds and executes requests for operations under /v1\n */\nexport interface V1RequestBuilder extends BaseRequestBuilder<V1RequestBuilder> {\n /**\n * The exercise_templates property\n */\n get exercise_templates(): Exercise_templatesRequestBuilder;\n /**\n * The routine_folders property\n */\n get routine_folders(): Routine_foldersRequestBuilder;\n /**\n * The routines property\n */\n get routines(): RoutinesRequestBuilder;\n /**\n * The workouts property\n */\n get workouts(): WorkoutsRequestBuilder;\n}\n/**\n * Uri template for the request builder.\n */\nexport const V1RequestBuilderUriTemplate = \"{+baseurl}/v1\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const V1RequestBuilderNavigationMetadata: Record<Exclude<keyof V1RequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n exercise_templates: {\n requestsMetadata: Exercise_templatesRequestBuilderRequestsMetadata,\n navigationMetadata: Exercise_templatesRequestBuilderNavigationMetadata,\n },\n routines: {\n requestsMetadata: RoutinesRequestBuilderRequestsMetadata,\n navigationMetadata: RoutinesRequestBuilderNavigationMetadata,\n },\n routine_folders: {\n requestsMetadata: Routine_foldersRequestBuilderRequestsMetadata,\n navigationMetadata: Routine_foldersRequestBuilderNavigationMetadata,\n },\n workouts: {\n requestsMetadata: WorkoutsRequestBuilderRequestsMetadata,\n navigationMetadata: WorkoutsRequestBuilderNavigationMetadata,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n","/* tslint:disable */\n/* eslint-disable */\n// Generated by Microsoft Kiota\n// @ts-ignore\nimport { type V1RequestBuilder, V1RequestBuilderNavigationMetadata } from './v1/index.js';\n// @ts-ignore\nimport { apiClientProxifier, ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions';\n// @ts-ignore\nimport { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form';\n// @ts-ignore\nimport { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json';\n// @ts-ignore\nimport { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart';\n// @ts-ignore\nimport { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text';\n\n/**\n * Instantiates a new {@link HevyClient} and sets the default values.\n * @param requestAdapter The request adapter to use to execute the requests.\n */\n// @ts-ignore\nexport function createHevyClient(requestAdapter: RequestAdapter) {\n if (requestAdapter === undefined) {\n throw new Error(\"requestAdapter cannot be undefined\");\n }\n let serializationWriterFactory : SerializationWriterFactoryRegistry\n let parseNodeFactoryRegistry : ParseNodeFactoryRegistry\n \n if (requestAdapter.getParseNodeFactory() instanceof ParseNodeFactoryRegistry) {\n parseNodeFactoryRegistry = requestAdapter.getParseNodeFactory() as ParseNodeFactoryRegistry\n } else {\n throw new Error(\"requestAdapter.getParseNodeFactory() is not a ParseNodeFactoryRegistry\")\n }\n \n if (requestAdapter.getSerializationWriterFactory() instanceof SerializationWriterFactoryRegistry) {\n serializationWriterFactory = requestAdapter.getSerializationWriterFactory() as SerializationWriterFactoryRegistry\n } else {\n throw new Error(\"requestAdapter.getSerializationWriterFactory() is not a SerializationWriterFactoryRegistry\")\n }\n \n serializationWriterFactory.registerDefaultSerializer(JsonSerializationWriterFactory);\n serializationWriterFactory.registerDefaultSerializer(TextSerializationWriterFactory);\n serializationWriterFactory.registerDefaultSerializer(FormSerializationWriterFactory);\n serializationWriterFactory.registerDefaultSerializer(MultipartSerializationWriterFactory);\n \n const backingStoreFactory = requestAdapter.getBackingStoreFactory();\n parseNodeFactoryRegistry.registerDefaultDeserializer(JsonParseNodeFactory, backingStoreFactory);\n parseNodeFactoryRegistry.registerDefaultDeserializer(TextParseNodeFactory, backingStoreFactory);\n parseNodeFactoryRegistry.registerDefaultDeserializer(FormParseNodeFactory, backingStoreFactory);\n const pathParameters: Record<string, unknown> = {\n \"baseurl\": requestAdapter.baseUrl,\n };\n return apiClientProxifier<HevyClient>(requestAdapter, pathParameters, HevyClientNavigationMetadata, undefined);\n}\n/**\n * The main entry point of the SDK, exposes the configuration and the fluent API.\n */\nexport interface HevyClient extends BaseRequestBuilder<HevyClient> {\n /**\n * The v1 property\n */\n get v1(): V1RequestBuilder;\n}\n/**\n * Uri template for the request builder.\n */\nexport const HevyClientUriTemplate = \"{+baseurl}\";\n/**\n * Metadata for all the navigation properties in the request builder.\n */\nexport const HevyClientNavigationMetadata: Record<Exclude<keyof HevyClient, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {\n v1: {\n navigationMetadata: V1RequestBuilderNavigationMetadata,\n },\n};\n/* tslint:enable */\n/* eslint-enable */\n",null,null,null,null,null,null,"{\n\t\"name\": \"hevy-mcp\",\n\t\"version\": \"1.3.1\",\n\t\"main\": \"dist/index.js\",\n\t\"module\": \"dist/index.js\",\n\t\"types\": \"dist/index.d.ts\",\n\t\"files\": [\"dist\", \"README.md\"],\n\t\"access\": \"public\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/chrisdoc/hevy-mcp/issues\"\n\t},\n\t\"homepage\": \"https://github.com/chrisdoc/hevy-mcp#readme\",\n\t\"bin\": {\n\t\t\"hevy-mcp\": \"dist/index.js\"\n\t},\n\t\"scripts\": {\n\t\t\"inspect\": \"npm run build && npx -y @modelcontextprotocol/inspector@latest node dist/index.js\",\n\t\t\"test\": \"vitest\",\n\t\t\"export-specs\": \"node ./scripts/export-openapi-spec.js\",\n\t\t\"build\": \"tsup\",\n\t\t\"build:client\": \"kiota generate -l typescript -d openapi-spec.json -c HevyClient -o ./src/generated/client --log-level error --clean-output --clear-cache\",\n\t\t\"start\": \"node dist/index.js\",\n\t\t\"dev\": \"tsx watch --clear-screen=false src/index.ts\",\n\t\t\"check\": \"biome check --fix\",\n\t\t\"version:patch\": \"npm version patch\",\n\t\t\"version:minor\": \"npm version minor\",\n\t\t\"version:major\": \"npm version major\",\n\t\t\"release\": \"semantic-release\",\n\t\t\"commit\": \"commit\"\n\t},\n\t\"type\": \"module\",\n\t\"keywords\": [\"mcp\", \"hevy\", \"fitness\", \"api\", \"model context protocol\"],\n\t\"author\": \"Christoph Kieslich\",\n\t\"license\": \"MIT\",\n\t\"description\": \"A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.\",\n\t\"dependencies\": {\n\t\t\"@dotenvx/dotenvx\": \"^1.44.0\",\n\t\t\"@microsoft/kiota-abstractions\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-authentication-azure\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-bundle\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-http-fetchlibrary\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-serialization-json\": \"1.0.0-preview.94\",\n\t\t\"@microsoft/kiota-serialization-text\": \"1.0.0-preview.94\",\n\t\t\"@modelcontextprotocol/sdk\": \"^1.11.3\",\n\t\t\"uuid\": \"^11.1.0\",\n\t\t\"zod\": \"^3.24.4\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@biomejs/biome\": \"1.9.4\",\n\t\t\"@commitlint/cli\": \"^19.8.0\",\n\t\t\"@commitlint/config-conventional\": \"^19.8.0\",\n\t\t\"@commitlint/prompt-cli\": \"^19.8.0\",\n\t\t\"@semantic-release/changelog\": \"^6.0.3\",\n\t\t\"@semantic-release/git\": \"^10.0.1\",\n\t\t\"@types/node\": \"^22.13.13\",\n\t\t\"@vitest/coverage-v8\": \"^3.1.1\",\n\t\t\"abstract-syntax-tree\": \"^2.22.0\",\n\t\t\"lefthook\": \"^1.11.5\",\n\t\t\"semantic-release\": \"^24.2.3\",\n\t\t\"tsup\": \"^8.4.0\",\n\t\t\"tsx\": \"^4.19.3\",\n\t\t\"typescript\": \"^5.8.3\",\n\t\t\"vitest\": \"^3.1.1\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=20.0.0\"\n\t}\n}\n"],"mappings":";;;;;AACA,OAAO;AACP,SAAS,iBAAiB;AAC1B,SA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E,2BAAyB,4BAA4B,sBAAsB,mBAAmB;AAC9F,2BAAyB,4BAA4B,sBAAsB,mBAAmB;AAC9F,2BAAyB,4BAA4B,sBAAsB,mBAAmB;AAC9F,QAAM,iBAA0C;AAAA,IAC5C,WAAW,eAAe;AAAA,EAC9B;AACA,SAAO,mBAA+B,gBAAgB,gBAAgB,8BAA8B,MAAS;AACjH;AAiBO,IAAM,+BAA0H;AAAA,EACnI,IAAI;AAAA,IACA,oBAAoB;AAAA,EACxB;AACJ;;;AbnEO,SAAS,aAAaE,SAAgB,SAAiB;AAC7D,QAAM,eAAe,IAAI;AAAA,IACxBA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EAChB;AACA,QAAM,UAAU,IAAI,oBAAoB,YAAY;AACpD,UAAQ,UAAU;AAElB,SAAO,iBAAiB,OAAO;AAChC;;;AoBhBC,WAAQ;AACR,cAAW;;;A5BYZ,IAAM,mBAAmB;AAGzB,IAAM,SAAS,IAAI,UAAU;AAAA,EAC5B;AAAA,EACA;AACD,CAAC;AAGD,IAAI,CAAC,QAAQ,IAAI,cAAc;AAC9B,UAAQ,MAAM,8CAA8C;AAC5D,UAAQ,KAAK,CAAC;AACf;AAIA,IAAM,SAAS,QAAQ,IAAI,gBAAgB;AAC3C,IAAM,aAAa,aAAa,QAAQ,gBAAgB;AAExD,qBAAqB,QAAQ,UAAU;AACvC,qBAAqB,QAAQ,UAAU;AACvC,sBAAsB,QAAQ,UAAU;AACxC,oBAAoB,QAAQ,UAAU;AAGtC,eAAe,YAAY;AAC1B,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC/B;AAEA,UAAU,EAAE,MAAM,CAAC,UAAU;AAC5B,UAAQ,MAAM,0BAA0B,KAAK;AAC7C,UAAQ,KAAK,CAAC;AACf,CAAC;","names":["server","hevyClient","z","server","hevyClient","z","z","server","hevyClient","z","z","server","hevyClient","z","createRoutine400ErrorFromDiscriminatorValue","deserializeIntoRoutine400Error","createRoutine400ErrorFromDiscriminatorValue","createWorkout400ErrorFromDiscriminatorValue","deserializeIntoWorkout400Error","createWorkout400ErrorFromDiscriminatorValue","DateOnly","Duration","TimeOnly","apiKey"]}
|