UNPKG

trainingpeaks-sdk

Version:
146 lines 6.6 kB
export declare const ERROR_CODES: { readonly AUTH_FAILED: "AUTH_1001"; readonly AUTH_TOKEN_EXPIRED: "AUTH_1002"; readonly AUTH_TOKEN_INVALID: "AUTH_1003"; readonly AUTH_TOKEN_REFRESH_FAILED: "AUTH_1004"; readonly AUTH_NO_ADAPTER_FOUND: "AUTH_1005"; readonly AUTH_USER_NOT_FOUND: "AUTH_1006"; readonly AUTH_INVALID_CREDENTIALS: "AUTH_1007"; readonly AUTH_WEB_AUTH_FAILED: "AUTH_1008"; readonly AUTH_REFRESH_NOT_SUPPORTED: "AUTH_1009"; readonly AUTH_LOGIN_FAILED: "AUTH_1010"; readonly AUTH_TOKEN_NOT_FOUND: "AUTH_1011"; readonly AUTH_VERIFICATION_TOKEN_MISSING: "AUTH_1012"; readonly AUTH_COOKIE_MISSING: "AUTH_1013"; readonly AUTH_USER_DATA_MISSING: "AUTH_1014"; readonly AUTH_NO_ACTIVE_SESSION: "AUTH_1015"; readonly USER_FETCH_FAILED: "USER_3001"; readonly USER_NOT_FOUND: "USER_3002"; readonly WORKOUT_CREATION_FAILED: "WORKOUT_2001"; readonly WORKOUT_UPLOAD_FAILED: "WORKOUT_2002"; readonly WORKOUT_DELETION_FAILED: "WORKOUT_2003"; readonly WORKOUT_NOT_FOUND: "WORKOUT_2004"; readonly WORKOUT_VALIDATION_FAILED: "WORKOUT_2005"; readonly WORKOUT_STRUCTURE_INVALID: "WORKOUT_2006"; readonly WORKOUT_FILE_INVALID: "WORKOUT_2007"; readonly WORKOUT_NAME_INVALID: "WORKOUT_2008"; readonly WORKOUT_DESCRIPTION_INVALID: "WORKOUT_2009"; readonly WORKOUT_TAGS_INVALID: "WORKOUT_2010"; readonly WORKOUT_METADATA_INVALID: "WORKOUT_2011"; readonly WORKOUT_REPOSITORY_ERROR: "WORKOUT_2012"; readonly WORKOUT_LIST_ERROR: "WORKOUT_2013"; readonly NETWORK_TIMEOUT: "NETWORK_4001"; readonly NETWORK_CONNECTION_FAILED: "NETWORK_4002"; readonly NETWORK_REQUEST_FAILED: "NETWORK_4003"; readonly NETWORK_RESPONSE_INVALID: "NETWORK_4004"; readonly NETWORK_RATE_LIMITED: "NETWORK_4005"; readonly NETWORK_SERVER_ERROR: "NETWORK_4006"; readonly NETWORK_SERVICE_UNAVAILABLE: "NETWORK_4007"; readonly VALIDATION_FAILED: "VALIDATION_5001"; readonly VALIDATION_REQUIRED_FIELD: "VALIDATION_5002"; readonly VALIDATION_INVALID_FORMAT: "VALIDATION_5003"; readonly VALIDATION_OUT_OF_RANGE: "VALIDATION_5004"; readonly CONFIG_INVALID: "CONFIG_6001"; readonly CONFIG_MISSING: "CONFIG_6002"; readonly CONFIG_INVALID_URL: "CONFIG_6003"; readonly INTERNAL_ERROR: "INTERNAL_9001"; readonly UNKNOWN_ERROR: "UNKNOWN_9999"; }; export type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES]; export declare const ERROR_MESSAGES: { readonly AUTH_1001: "Authentication failed"; readonly AUTH_1002: "Authentication token has expired"; readonly AUTH_1003: "Authentication token is invalid"; readonly AUTH_1004: "Failed to refresh authentication token"; readonly AUTH_1005: "No suitable authentication method found"; readonly AUTH_1006: "User not found after authentication"; readonly AUTH_1007: "Invalid credentials provided"; readonly AUTH_1008: "Web authentication failed"; readonly AUTH_1009: "Token refresh not supported for this authentication method"; readonly AUTH_1010: "Login failed"; readonly AUTH_1011: "Authentication token not found"; readonly AUTH_1012: "Request verification token missing"; readonly AUTH_1013: "Required authentication cookie missing"; readonly AUTH_1014: "User data missing from response"; readonly AUTH_1015: "No active session found. Please login first."; readonly WORKOUT_2001: "Failed to create workout"; readonly WORKOUT_2002: "Failed to upload workout"; readonly WORKOUT_2003: "Failed to delete workout"; readonly WORKOUT_2004: "Workout not found"; readonly WORKOUT_2005: "Workout validation failed"; readonly WORKOUT_2006: "Workout structure is invalid"; readonly WORKOUT_2007: "Workout file is invalid"; readonly WORKOUT_2008: "Workout name is invalid"; readonly WORKOUT_2009: "Workout description is invalid"; readonly WORKOUT_2010: "Workout tags are invalid"; readonly WORKOUT_2011: "Workout metadata is invalid"; readonly WORKOUT_2012: "Workout repository error"; readonly WORKOUT_2013: "Failed to get workouts list"; readonly USER_3001: "Failed to get user"; readonly USER_3002: "User not found"; readonly NETWORK_4001: "Network request timed out"; readonly NETWORK_4002: "Network connection failed"; readonly NETWORK_4003: "Network request failed"; readonly NETWORK_4004: "Invalid network response"; readonly NETWORK_4005: "Rate limit exceeded"; readonly NETWORK_4006: "Server error occurred"; readonly NETWORK_4007: "Service temporarily unavailable"; readonly VALIDATION_5001: "Validation failed"; readonly VALIDATION_5002: "Required field is missing"; readonly VALIDATION_5003: "Invalid format"; readonly VALIDATION_5004: "Value is out of valid range"; readonly CONFIG_6001: "Invalid configuration"; readonly CONFIG_6002: "Missing configuration"; readonly CONFIG_6003: "Invalid URL in configuration"; readonly INTERNAL_9001: "Internal error occurred"; readonly UNKNOWN_9999: "An unknown error occurred"; }; export declare const ERROR_STATUS_CODES: { readonly AUTH_1001: 401; readonly AUTH_1002: 401; readonly AUTH_1003: 401; readonly AUTH_1004: 401; readonly AUTH_1005: 500; readonly AUTH_1006: 404; readonly AUTH_1007: 401; readonly AUTH_1008: 401; readonly AUTH_1009: 501; readonly AUTH_1010: 401; readonly AUTH_1011: 401; readonly AUTH_1012: 400; readonly AUTH_1013: 401; readonly AUTH_1014: 502; readonly AUTH_1015: 401; readonly USER_3001: 500; readonly USER_3002: 404; readonly WORKOUT_2001: 500; readonly WORKOUT_2002: 500; readonly WORKOUT_2003: 500; readonly WORKOUT_2004: 404; readonly WORKOUT_2005: 400; readonly WORKOUT_2006: 400; readonly WORKOUT_2007: 400; readonly WORKOUT_2008: 400; readonly WORKOUT_2009: 400; readonly WORKOUT_2010: 400; readonly WORKOUT_2011: 400; readonly WORKOUT_2012: 500; readonly WORKOUT_2013: 500; readonly NETWORK_4001: 408; readonly NETWORK_4002: 503; readonly NETWORK_4003: 500; readonly NETWORK_4004: 502; readonly NETWORK_4005: 429; readonly NETWORK_4006: 500; readonly NETWORK_4007: 503; readonly VALIDATION_5001: 400; readonly VALIDATION_5002: 400; readonly VALIDATION_5003: 400; readonly VALIDATION_5004: 400; readonly CONFIG_6001: 500; readonly CONFIG_6002: 500; readonly CONFIG_6003: 500; readonly INTERNAL_9001: 500; readonly UNKNOWN_9999: 500; }; //# sourceMappingURL=error-codes.d.ts.map