trainingpeaks-sdk
Version:
TypeScript SDK for TrainingPeaks API integration
83 lines • 2.18 kB
TypeScript
export type BaseUrls = {
api: string;
home: string;
app: string;
};
export type ApiConfig = {
baseUrls?: Partial<BaseUrls>;
usersVersion?: string;
fitnessVersion?: string;
paths?: Partial<{
login: string;
users: string;
token: string;
userProfile: string;
tokenRefresh: string;
userPreferences: string;
fitness: string;
athletes: string;
workouts: string;
}>;
endpoints?: Partial<{
LOGIN_PAGE: string;
TOKEN: string;
USER_PROFILE: string;
TOKEN_REFRESH: string;
USER_PREFERENCES: string;
WORKOUTS_LIST: string;
}>;
};
export declare const DEFAULT_BASE_URLS: BaseUrls;
export declare const DEFAULT_PATHS: {
readonly login: "/login";
readonly users: "/users";
readonly token: "/token";
readonly userProfile: "/user";
readonly tokenRefresh: "/token/refresh";
readonly userPreferences: "/preferences";
readonly fitness: "/fitness";
readonly athletes: "/athletes";
readonly workouts: "/workouts";
};
export type ApiUrls = {
baseUrls: {
API: string;
LOGIN: string;
USERS: string;
APP: string;
};
endpoints: {
LOGIN_PAGE: string;
TOKEN: string;
USER_PROFILE: string;
TOKEN_REFRESH: string;
USER_PREFERENCES: string;
WORKOUTS_LIST: string;
};
origins: {
APP: string;
APP_WITH_SLASH: string;
};
};
export declare const createApiUrls: (config?: ApiConfig) => ApiUrls;
export declare const DEFAULT_API_URLS: ApiUrls;
export declare const API_BASE_URLS: {
API: string;
LOGIN: string;
USERS: string;
APP: string;
};
export declare const API_ORIGINS: {
APP: string;
APP_WITH_SLASH: string;
};
export declare const API_ENDPOINTS: {
LOGIN_PAGE: string;
TOKEN: string;
USER_PROFILE: string;
TOKEN_REFRESH: string;
USER_PREFERENCES: string;
WORKOUTS_LIST: string;
};
export declare const generateWorkoutListUrl: (athleteId: string, startDate: string, endDate: string, config?: ApiConfig) => string;
//# sourceMappingURL=api-urls.d.ts.map