From 234770b611df32178382b557df396db220070a7f Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 5 Apr 2024 00:42:30 +0200 Subject: [node] Big Ships lib refactoring --- nodejs/lib/errors.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 nodejs/lib/errors.ts (limited to 'nodejs/lib/errors.ts') diff --git a/nodejs/lib/errors.ts b/nodejs/lib/errors.ts new file mode 100644 index 0000000..f9dca89 --- /dev/null +++ b/nodejs/lib/errors.ts @@ -0,0 +1,35 @@ +import { Cooldown } from './types.ts'; + +export type MarketTradeVolumeError = { + waypointSymbol: string; + tradeSymbol: string; + units: number; + tradeVolume: number; +}; + +export type RateLimitError = { + type: string; + retryAfter: number; + limitBurst: number; + limitPerSecond: number; + remaining: number; + reset: Date; +}; + +export type ShipIsCurrentlyInTransitError = { + arrival: Date; + departureSymbol: string; + departureTime: Date; + destinationSymbol: string; + secondsToArrival: number; +}; + +export type ShipIsStillOnCooldownError = { + cooldown: Cooldown; +}; + +export type ShipRequiresMoreFuelForNavigationError = { + fuelAvailable: number; + fuelRequired: number; + shipSymbol: string; +}; -- cgit v1.2.3