forked from deptagency/dept-weather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules.d.ts
63 lines (52 loc) · 1.81 KB
/
modules.d.ts
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
declare module 'weatherlink' {
function WeatherLink(arg: Record<'apiKey' | 'apiSecret', string>): {
getAllStations: () => Promise<import('./models/weatherlink').Stations>;
getStations: (arg: { stationIds: number[] }) => Promise<import('./models/weatherlink').Stations>;
getAllSensors: () => Promise<any>;
getSensors: (arg: { sensorIds: number[] }) => Promise<any>;
getSensorCatalog: () => Promise<any>;
getAllSensorsWithSpecs: () => Promise<any>;
getCurrent: (arg: { stationId: number }) => Promise<import('./models/weatherlink').CurrentConditions>;
getHistoric: (arg: { stationId: number; startTimestamp: string; endTimestamp: string }) => Promise<any>;
};
export default WeatherLink;
}
declare module 'feels' {
export interface Options {
temp?: number | null;
humidity?: number | null;
speed?: number | null;
dewPoint?: number | null;
wvp?: number | null;
round?: boolean | ((temp: number, from: string, to: string) => number);
units?: {
temp: string;
speed: string;
};
}
export type Method = 'HI' | 'AWBGT' | 'HI_CA' | 'AAT' | 'WCI';
class Feels {
constructor(opts: Options);
like(methods: Method[] | Method): number;
}
export default Feels;
}
declare module 'geo2zip' {
export declare type PointInput = string | number;
export interface Options {
limit: number;
}
export type ZIPCode = string;
function geo2zip(location: PointInput[], extraOptions: Partial<Options> = {}): Promise<ZIPCode[]>;
export default geo2zip;
}
declare module 'geodist' {
export declare type Point = number[] | { lat: number; lon: number };
export interface Options {
exact?: boolean;
limit?: number;
unit?: string;
}
function getDistance(start: Point, end: Point, options?: Options): number;
export default getDistance;
}