[node] Big Ships lib refactoring
This commit is contained in:
parent
a58394230d
commit
234770b611
27 changed files with 500 additions and 589 deletions
35
nodejs/lib/errors.ts
Normal file
35
nodejs/lib/errors.ts
Normal file
|
@ -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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue