trainingpeaks-sdk
Version:
TypeScript SDK for TrainingPeaks API integration
87 lines • 4.02 kB
TypeScript
import { z } from 'zod';
export declare const UserSchema: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
username: z.ZodString;
avatar: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>, z.ZodTransform<string | undefined, string>>>;
preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
export declare const AuthTokenSchema: z.ZodObject<{
accessToken: z.ZodString;
tokenType: z.ZodString;
expiresIn: z.ZodNumber;
expires: z.ZodDate;
refreshToken: z.ZodOptional<z.ZodString>;
scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const WorkoutSchema: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
description: z.ZodString;
date: z.ZodDate;
duration: z.ZodNumber;
distance: z.ZodOptional<z.ZodNumber>;
activityType: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
fileContent: z.ZodOptional<z.ZodString>;
fileName: z.ZodOptional<z.ZodString>;
createdAt: z.ZodOptional<z.ZodDate>;
updatedAt: z.ZodOptional<z.ZodDate>;
structure: z.ZodOptional<z.ZodObject<{
structure: z.ZodArray<z.ZodObject<{
type: z.ZodEnum<typeof import("../../types/index.js").ElementType>;
length: z.ZodObject<{
value: z.ZodNumber;
unit: z.ZodEnum<typeof import("../../types/index.js").LengthUnit>;
}, z.core.$strip>;
steps: z.ZodArray<z.ZodObject<{
name: z.ZodString;
length: z.ZodObject<{
value: z.ZodNumber;
unit: z.ZodEnum<typeof import("../../types/index.js").LengthUnit>;
}, z.core.$strip>;
targets: z.ZodArray<z.ZodObject<{
minValue: z.ZodNumber;
maxValue: z.ZodNumber;
}, z.core.$strip>>;
intensityClass: z.ZodEnum<typeof import("../../types/index.js").IntensityClass>;
openDuration: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>>;
begin: z.ZodNumber;
end: z.ZodNumber;
}, z.core.$strip>>;
polyline: z.ZodArray<z.ZodArray<z.ZodNumber>>;
primaryLengthMetric: z.ZodEnum<typeof import("../../types/index.js").LengthMetric>;
primaryIntensityMetric: z.ZodEnum<typeof import("../../types/index.js").IntensityMetric>;
primaryIntensityTargetOrRange: z.ZodEnum<typeof import("../../types/index.js").IntensityTargetType>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const TrainingPeaksAthleteSchema: z.ZodObject<{
athleteId: z.ZodNumber;
firstName: z.ZodString;
lastName: z.ZodString;
email: z.ZodString;
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
cellPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
age: z.ZodOptional<z.ZodNumber>;
athleteType: z.ZodNumber;
userType: z.ZodNumber;
lastPlannedWorkout: z.ZodOptional<z.ZodNullable<z.ZodString>>;
settings: z.ZodOptional<z.ZodUnknown>;
personPhotoUrl: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>, z.ZodTransform<string | null | undefined, string | null | undefined>>;
coachedBy: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
userName: z.ZodString;
lastUpgradeOn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
downgradeAllowed: z.ZodDefault<z.ZodBoolean>;
expireOn: z.ZodString;
premiumTrial: z.ZodDefault<z.ZodBoolean>;
premiumTrialDaysRemaining: z.ZodDefault<z.ZodNumber>;
downgradeAllowedOn: z.ZodOptional<z.ZodString>;
workoutIndexState: z.ZodDefault<z.ZodNumber>;
prCalcState: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
export type User = z.infer<typeof UserSchema>;
export type AuthToken = z.infer<typeof AuthTokenSchema>;
export type Workout = z.infer<typeof WorkoutSchema>;
export type TrainingPeaksAthlete = z.infer<typeof TrainingPeaksAthleteSchema>;
//# sourceMappingURL=entities.schema.d.ts.map