@idm-plugin/meteo2 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { OMOptions } from '@idm-plugin/meteo';
1
2
  /**
2
3
  * 大气海洋要素
3
4
  */
@@ -29,38 +30,6 @@ export interface OMParams {
29
30
  fake?: boolean;
30
31
  fakes?: boolean[];
31
32
  }
32
- /**
33
- * 请求参数
34
- */
35
- export interface OMOptions {
36
- requestId?: string;
37
- pastDays?: number;
38
- forecastDays?: number;
39
- weatherModels?: string;
40
- marineModels?: string;
41
- precision?: number;
42
- selfHosted?: boolean;
43
- meteo2?: boolean;
44
- memberLength?: number;
45
- }
46
- export interface MeteoModel {
47
- rank: number;
48
- name: string;
49
- alias?: string;
50
- model: string;
51
- disabled?: boolean;
52
- provider?: string;
53
- country?: string;
54
- resolution?: number;
55
- tips?: string;
56
- length?: number;
57
- frequency?: number;
58
- models?: string[];
59
- categories?: string;
60
- variables?: string;
61
- }
62
- export declare const WEATHER_MODELS: MeteoModel[];
63
- export declare const MARINE_MODELS: MeteoModel[];
64
33
  /**
65
34
  * @see https://open-meteo.com/en/docs
66
35
  * @see https://openmeteo.s3.amazonaws.com/index.html
@@ -73,8 +42,8 @@ export declare class MeteoHelper2 {
73
42
  private readonly CLIMATE;
74
43
  private readonly SEASONAL;
75
44
  constructor(apikey: string, debug?: boolean);
76
- standardWeatherModels(): Promise<MeteoModel[]>;
77
- standardMarineModels(): Promise<MeteoModel[]>;
45
+ standardWeatherModels(): Promise<any>;
46
+ standardMarineModels(): Promise<any>;
78
47
  autoPickMeteoModel(model0?: string): Promise<OMOptions>;
79
48
  range(start: number, stop: number, step: number): number[];
80
49
  /**
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @see https://www.worldtides.info/apidocs
3
+ * 潮汐参数
4
+ */
5
+ export interface TdOptions {
6
+ requestId?: string;
7
+ }
8
+ /**
9
+ * @see https://open-meteo.com/en/docs
10
+ * @see https://openmeteo.s3.amazonaws.com/index.html
11
+ */
12
+ export declare class TidesHelper {
13
+ private readonly apikey;
14
+ private readonly debug;
15
+ constructor(apikey: string, debug?: boolean);
16
+ private toStdLng;
17
+ /**
18
+ * 潮汐预报数据
19
+ * @param lat
20
+ * @param lng
21
+ *
22
+ * Start date (in YYYY-MM-DD format) to retrieve the tidal heights or extremes starting at midnight local time. You can also pass "today" to use the current date of the location.
23
+ * @param date
24
+ *
25
+ * If this parameter is present the low and high tides will be returned.
26
+ * By default the heights will be returned from 6 hours ago to 42 hours in the future.
27
+ * You can specify the start, date, length, days, and step parameters to customize this.
28
+ * @param extremes
29
+ *
30
+ * If this parameter is present the tidal heights will be calculated and returned.
31
+ * By default the heights will be returned from 6 hours ago to 42 hours in the future in 30 minutes intervals.
32
+ * You can specify the start, date, length, days, and step parameters to customize this.
33
+ * @param heights
34
+ *
35
+ * If this parameter is present the datums (vertical reference levels) will be returned
36
+ * @param datums
37
+ *
38
+ * If this parameter is present, heights and extremes will be returned referring to this datum (vertical reference level). The possible datums are listed here.
39
+ * The default is MSL (Mean Sea Level), but we highly recommend setting this to CD.
40
+ * @see https://www.worldtides.info/datums
41
+ * @param datum
42
+ * @param options
43
+ */
44
+ tidesForecast(lat: number, lng: number, days?: number, date?: string, extremes?: boolean, heights?: boolean, datums?: boolean, datum?: string, options?: TdOptions): Promise<any>;
45
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/meteo2",
3
3
  "private": false,
4
- "version": "0.3.5",
4
+ "version": "0.3.7",
5
5
  "description": "idm plugin for meteo2(open meteo)",
6
6
  "type": "module",
7
7
  "keywords": [
@@ -28,6 +28,7 @@
28
28
  "release": "yarn build && yarn publish --access public"
29
29
  },
30
30
  "dependencies": {
31
+ "@idm-plugin/meteo": "^0.3.1",
31
32
  "@log4js-node/log4js-api": "^1.0.2",
32
33
  "got": "11",
33
34
  "moment": "^2.30.1",