summaryrefslogtreecommitdiff
path: root/nodejs/lib/errors.ts
blob: f9dca89b425b9a114559922a25a02ed467da0b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
};