@dmdata/telegram-json-types 1.2.0 → 1.2.3

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.
Files changed (52) hide show
  1. package/.github/workflows/release.yml +33 -0
  2. package/LICENSE +21 -21
  3. package/README.md +79 -79
  4. package/dist/jschema/forecast-weathermap_1.0.0.json +1 -1
  5. package/dist/jschema/weather-warning-timeseries_1.0.0.json +1 -1
  6. package/dist/jschema-load.js +3 -36
  7. package/index.d.ts +2 -2
  8. package/package.json +30 -32
  9. package/test/sample-schema-check.test.ts +68 -68
  10. package/tsconfig.json +25 -25
  11. package/types/component/coordinate.d.ts +27 -27
  12. package/types/component/earthquake.d.ts +77 -77
  13. package/types/component/index.d.ts +17 -17
  14. package/types/component/unit-value.d.ts +13 -13
  15. package/types/component/util.d.ts +20 -20
  16. package/types/index.d.ts +84 -84
  17. package/types/schema/earthquake-counts/1.0.0.d.ts +69 -69
  18. package/types/schema/earthquake-explanation/1.0.0.d.ts +57 -57
  19. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +53 -53
  20. package/types/schema/earthquake-information/1.0.0.d.ts +158 -158
  21. package/types/schema/earthquake-information/1.1.0.d.ts +224 -224
  22. package/types/schema/earthquake-information/index.d.ts +9 -9
  23. package/types/schema/earthquake-nankai/1.0.0.d.ts +101 -101
  24. package/types/schema/eew-information/1.0.0.d.ts +221 -221
  25. package/types/schema/eew-information/index.d.ts +7 -7
  26. package/types/schema/forecast-2week-temperature/1.0.0.d.ts +110 -110
  27. package/types/schema/forecast-prefecture/1.0.0.d.ts +537 -537
  28. package/types/schema/forecast-season/1.0.0.d.ts +169 -169
  29. package/types/schema/forecast-warning-possibility/1.0.0.d.ts +388 -388
  30. package/types/schema/forecast-warning-possibility/1.1.0.d.ts +129 -129
  31. package/types/schema/forecast-warning-possibility/index.d.ts +9 -9
  32. package/types/schema/forecast-weathermap/1.0.0.d.ts +206 -194
  33. package/types/schema/tsunami-information/1.0.0.d.ts +261 -261
  34. package/types/schema/tsunami-information/1.1.0.d.ts +298 -298
  35. package/types/schema/tsunami-information/index.d.ts +9 -9
  36. package/types/schema/volcano-information/1.0.0.d.ts +450 -450
  37. package/types/schema/weather-commentary/1.0.0.d.ts +984 -984
  38. package/types/schema/weather-commentary/index.d.ts +7 -7
  39. package/types/schema/weather-early/1.0.0.d.ts +111 -111
  40. package/types/schema/weather-impact-society/1.0.0.d.ts +143 -143
  41. package/types/schema/weather-impact-society/1.0.1.d.ts +118 -118
  42. package/types/schema/weather-information/1.0.0.d.ts +67 -67
  43. package/types/schema/weather-landslide/1.0.0.d.ts +51 -51
  44. package/types/schema/weather-river-flood/1.0.0.d.ts +192 -192
  45. package/types/schema/weather-tornado/1.0.0.d.ts +55 -55
  46. package/types/schema/weather-typhoon/1.0.0.d.ts +146 -146
  47. package/types/schema/weather-typhoon/index.d.ts +7 -7
  48. package/types/schema/weather-warning/1.0.0.d.ts +213 -213
  49. package/types/schema/weather-warning/1.1.0.d.ts +469 -469
  50. package/types/schema/weather-warning/index.d.ts +9 -9
  51. package/types/schema/weather-warning-timeseries/1.0.0.d.ts +357 -385
  52. package/types/schema/weather-warning-timeseries/index.d.ts +7 -7
@@ -1,194 +1,206 @@
1
- import { TelegramJSONMain } from '../../main';
2
- import { Components } from '../../component';
3
-
4
- export namespace ForecastWeathermap {
5
- export interface Schema {
6
- type: 'forecast-weathermap';
7
- version: '1.0.0';
8
- }
9
-
10
- export interface Direction {
11
- type: '移動方向';
12
- unit: '°';
13
- value: string | null;
14
- condition?: '不定';
15
- }
16
-
17
- export interface WindDirection {
18
- type: '風向';
19
- unit: '°';
20
- value: string;
21
- }
22
-
23
- export interface SpeedMeter {
24
- type: '移動速度';
25
- unit: 'km/h';
26
- value: string | null;
27
- condition?: 'ゆっくり' | 'ほとんど停滞' | string;
28
- }
29
-
30
- export interface SpeedKnot {
31
- type: '移動速度';
32
- unit: 'knot';
33
- value: string | null;
34
- condition?: 'SLW' | 'ALMOST STNR' | string;
35
- }
36
-
37
- export interface WindSpeedMeter {
38
- type: '最大風速';
39
- unit: 'm/s';
40
- value: string;
41
- }
42
-
43
- export interface WindSpeedKnot {
44
- type: '最大風速';
45
- unit: 'knot';
46
- value: string;
47
- }
48
-
49
- export interface Pressure<Type extends string = ''> {
50
- type: `${Type}気圧`;
51
- unit: 'hPa';
52
- value: string;
53
- }
54
-
55
- export interface WeatherMapItemDisturbanceKindCenter {
56
- type: '低気圧' | '高気圧' | '熱帯低気圧' | '低圧部';
57
- coordinate: Components.Coordinate;
58
- direction: Direction;
59
- speeds: [SpeedMeter, SpeedKnot];
60
- pressure: Pressure<'中心'>;
61
- }
62
-
63
- export interface WeatherMapItemDisturbance {
64
- type: '低気圧' | '高気圧' | '熱帯低気圧' | '低圧部';
65
- kinds: [
66
- WeatherMapItemDisturbanceKindCenter
67
- ];
68
- }
69
-
70
- export interface WeatherMapItemTyphoonKindCenter extends Omit<WeatherMapItemDisturbanceKindCenter, 'type'> {
71
- type: '台風';
72
- }
73
-
74
- export interface WeatherMapItemTyphoonKindWindSpeed {
75
- type: '風';
76
- speeds: [WindSpeedMeter, WindSpeedKnot];
77
- }
78
-
79
- export interface WeatherMapItemTyphoonKindName {
80
- type: '呼称';
81
- text: string | null;
82
- kana: string | null;
83
- number: string | null;
84
- }
85
-
86
- export interface WeatherMapItemTyphoonKindClass {
87
- type: '階級';
88
- category: 'TS' | 'STS' | 'TY' | 'HR' | 'Tropical Storm' | null;
89
- name: '台風' | 'ハリケーン' | '発達した熱帯低気圧' | null;
90
- }
91
-
92
- export interface WeatherMapItemTyphoon {
93
- type: '台風';
94
- kinds: [
95
- WeatherMapItemTyphoonKindCenter,
96
- WeatherMapItemTyphoonKindWindSpeed,
97
- WeatherMapItemTyphoonKindName,
98
- WeatherMapItemTyphoonKindClass
99
- ];
100
- }
101
-
102
- export interface WeatherMapItemIsobarKind {
103
- type: '等圧線';
104
- pressure: Pressure;
105
- line: [number, number][];
106
- }
107
-
108
- export interface WeatherMapItemIsobar {
109
- type: '等圧線';
110
- kinds: [
111
- WeatherMapItemIsobarKind
112
- ];
113
- }
114
-
115
- export interface WeatherMapItemFrontKind {
116
- type: '寒冷前線' | '温暖前線' | '停滞前線' | '閉塞前線';
117
- line: [number, number][];
118
- }
119
-
120
- export interface WeatherMapItemFront {
121
- type: '寒冷前線' | '温暖前線' | '停滞前線' | '閉塞前線';
122
- kinds: [
123
- WeatherMapItemFrontKind
124
- ];
125
- }
126
-
127
- export interface WeatherMap {
128
- type: '実況' | '予想';
129
- elapsedTime: 'PT0H' | 'PT24H' | 'PT48H';
130
- dateTime: string;
131
- items: (WeatherMapItemDisturbance | WeatherMapItemTyphoon | WeatherMapItemIsobar | WeatherMapItemFront)[];
132
- }
133
-
134
- export interface SevereWeatherWindKind {
135
- type: '悪天情報(強風)';
136
- direction: WindDirection;
137
- speed: WindSpeedKnot;
138
- }
139
-
140
- export interface SevereWeatherWind {
141
- type: '悪天情報(強風)';
142
- name: '強風域';
143
- coordinates: [[number, number]];
144
- kinds: [
145
- SevereWeatherWindKind
146
- ];
147
- }
148
-
149
- export interface SevereWeatherFogPolygon {
150
- type: '悪天情報(霧)';
151
- name: '霧域';
152
- code?: never;
153
- polygons: [[number, number][]];
154
- }
155
-
156
- export interface SevereWeatherFogArea extends Components.CodeName {
157
- type: '悪天情報(霧)';
158
- polygons?: never;
159
- }
160
-
161
- export interface SevereWeatherIcePolygon {
162
- type: '悪天情報(海氷)' | '悪天情報(船体着氷)';
163
- name: '海氷域' | '船体着氷域';
164
- coordinates: [number, number][];
165
- }
166
-
167
- export interface SevereWeather {
168
- type: '実況' | '予想';
169
- elapsedTime: 'PT0H' | 'PT24H' | 'PT48H';
170
- dateTime: string;
171
- items: (SevereWeatherWind | SevereWeatherFogPolygon | SevereWeatherFogArea | SevereWeatherIcePolygon)[];
172
- }
173
-
174
- export interface PublicBody {
175
- weathermap: WeatherMap;
176
- severeWeather?: SevereWeather;
177
- }
178
-
179
- export interface Public extends TelegramJSONMain {
180
- _schema: Schema;
181
- type: '地上実況図' | '地上24時間予想図' | '地上48時間予想図' | 'アジア太平洋地上実況図' | 'アジア太平洋海上悪天24時間予想図' | 'アジア太平洋海上悪天48時間予想図';
182
- title: '地上実況図' | '地上24時間予想図' | '地上48時間予想図' | 'アジア太平洋地上実況図' | 'アジア太平洋海上悪天24時間予想図' | 'アジア太平洋海上悪天48時間予想図';
183
- infoType: '発表' | '訂正' | '遅延';
184
- targetDateTimeDubious: never;
185
- targetDuration: never;
186
- validDateTime: never;
187
- eventId: null;
188
- serialNo: null;
189
- infoKind: '天気図情報';
190
- body: PublicBody;
191
- }
192
-
193
- export type Main = Public;
194
- }
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
+
4
+ export namespace ForecastWeathermap {
5
+ export interface Schema {
6
+ type: 'forecast-weathermap';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ interface Coordinate {
11
+ latitude: {
12
+ text: string;
13
+ value: string;
14
+ };
15
+ longitude: {
16
+ text: string;
17
+ value: string;
18
+ };
19
+ condition?: '付近';
20
+ }
21
+
22
+ export interface Direction {
23
+ type: '移動方向';
24
+ unit: '°';
25
+ value: string | null;
26
+ condition?: '不定';
27
+ }
28
+
29
+ export interface WindDirection {
30
+ type: '風向';
31
+ unit: '°';
32
+ value: string;
33
+ }
34
+
35
+ export interface SpeedMeter {
36
+ type: '移動速度';
37
+ unit: 'km/h';
38
+ value: string | null;
39
+ condition?: 'ゆっくり' | 'ほとんど停滞' | string;
40
+ }
41
+
42
+ export interface SpeedKnot {
43
+ type: '移動速度';
44
+ unit: 'knot';
45
+ value: string | null;
46
+ condition?: 'SLW' | 'ALMOST STNR' | string;
47
+ }
48
+
49
+ export interface WindSpeedMeter {
50
+ type: '最大風速';
51
+ unit: 'm/s';
52
+ value: string;
53
+ }
54
+
55
+ export interface WindSpeedKnot {
56
+ type: '最大風速';
57
+ unit: 'knot';
58
+ value: string;
59
+ }
60
+
61
+ export interface Pressure<Type extends string = ''> {
62
+ type: `${Type}気圧`;
63
+ unit: 'hPa';
64
+ value: string;
65
+ }
66
+
67
+ export interface WeatherMapItemDisturbanceKindCenter {
68
+ type: '低気圧' | '高気圧' | '熱帯低気圧' | '低圧部';
69
+ coordinate: Coordinate;
70
+ direction: Direction;
71
+ speeds: [SpeedMeter, SpeedKnot];
72
+ pressure: Pressure<'中心'>;
73
+ }
74
+
75
+ export interface WeatherMapItemDisturbance {
76
+ type: '低気圧' | '高気圧' | '熱帯低気圧' | '低圧部';
77
+ kinds: [
78
+ WeatherMapItemDisturbanceKindCenter
79
+ ];
80
+ }
81
+
82
+ export interface WeatherMapItemTyphoonKindCenter extends Omit<WeatherMapItemDisturbanceKindCenter, 'type'> {
83
+ type: '台風';
84
+ }
85
+
86
+ export interface WeatherMapItemTyphoonKindWindSpeed {
87
+ type: '';
88
+ speeds: [WindSpeedMeter, WindSpeedKnot];
89
+ }
90
+
91
+ export interface WeatherMapItemTyphoonKindName {
92
+ type: '呼称';
93
+ text: string | null;
94
+ kana: string | null;
95
+ number: string | null;
96
+ }
97
+
98
+ export interface WeatherMapItemTyphoonKindClass {
99
+ type: '階級';
100
+ category: 'TS' | 'STS' | 'TY' | 'HR' | 'Tropical Storm' | null;
101
+ name: '台風' | 'ハリケーン' | '発達した熱帯低気圧' | null;
102
+ }
103
+
104
+ export interface WeatherMapItemTyphoon {
105
+ type: '台風';
106
+ kinds: [
107
+ WeatherMapItemTyphoonKindCenter,
108
+ WeatherMapItemTyphoonKindWindSpeed,
109
+ WeatherMapItemTyphoonKindName,
110
+ WeatherMapItemTyphoonKindClass
111
+ ];
112
+ }
113
+
114
+ export interface WeatherMapItemIsobarKind {
115
+ type: '等圧線';
116
+ pressure: Pressure;
117
+ line: [number, number][];
118
+ }
119
+
120
+ export interface WeatherMapItemIsobar {
121
+ type: '等圧線';
122
+ kinds: [
123
+ WeatherMapItemIsobarKind
124
+ ];
125
+ }
126
+
127
+ export interface WeatherMapItemFrontKind {
128
+ type: '寒冷前線' | '温暖前線' | '停滞前線' | '閉塞前線';
129
+ line: [number, number][];
130
+ }
131
+
132
+ export interface WeatherMapItemFront {
133
+ type: '寒冷前線' | '温暖前線' | '停滞前線' | '閉塞前線';
134
+ kinds: [
135
+ WeatherMapItemFrontKind
136
+ ];
137
+ }
138
+
139
+ export interface WeatherMap {
140
+ type: '実況' | '予想';
141
+ elapsedTime: 'PT0H' | 'PT24H' | 'PT48H';
142
+ dateTime: string;
143
+ items: (WeatherMapItemDisturbance | WeatherMapItemTyphoon | WeatherMapItemIsobar | WeatherMapItemFront)[];
144
+ }
145
+
146
+ export interface SevereWeatherWindKind {
147
+ type: '悪天情報(強風)';
148
+ direction: WindDirection;
149
+ speed: WindSpeedKnot;
150
+ }
151
+
152
+ export interface SevereWeatherWind {
153
+ type: '悪天情報(強風)';
154
+ name: '強風域';
155
+ coordinates: [[number, number]];
156
+ kinds: [
157
+ SevereWeatherWindKind
158
+ ];
159
+ }
160
+
161
+ export interface SevereWeatherFogPolygon {
162
+ type: '悪天情報(霧)';
163
+ name: '霧域';
164
+ code?: never;
165
+ polygons: [[number, number][]];
166
+ }
167
+
168
+ export interface SevereWeatherFogArea extends Components.CodeName {
169
+ type: '悪天情報(霧)';
170
+ polygons?: never;
171
+ }
172
+
173
+ export interface SevereWeatherIcePolygon {
174
+ type: '悪天情報(海氷)' | '悪天情報(船体着氷)';
175
+ name: '海氷域' | '船体着氷域';
176
+ coordinates: [number, number][];
177
+ }
178
+
179
+ export interface SevereWeather {
180
+ type: '実況' | '予想';
181
+ elapsedTime: 'PT0H' | 'PT24H' | 'PT48H';
182
+ dateTime: string;
183
+ items: (SevereWeatherWind | SevereWeatherFogPolygon | SevereWeatherFogArea | SevereWeatherIcePolygon)[];
184
+ }
185
+
186
+ export interface PublicBody {
187
+ weathermap: WeatherMap;
188
+ severeWeather?: SevereWeather;
189
+ }
190
+
191
+ export interface Public extends TelegramJSONMain {
192
+ _schema: Schema;
193
+ type: '地上実況図' | '地上24時間予想図' | '地上48時間予想図' | 'アジア太平洋地上実況図' | 'アジア太平洋海上悪天24時間予想図' | 'アジア太平洋海上悪天48時間予想図';
194
+ title: '地上実況図' | '地上24時間予想図' | '地上48時間予想図' | 'アジア太平洋地上実況図' | 'アジア太平洋海上悪天24時間予想図' | 'アジア太平洋海上悪天48時間予想図';
195
+ infoType: '発表' | '訂正' | '遅延';
196
+ targetDateTimeDubious: never;
197
+ targetDuration: never;
198
+ validDateTime: never;
199
+ eventId: null;
200
+ serialNo: null;
201
+ infoKind: '天気図情報';
202
+ body: PublicBody;
203
+ }
204
+
205
+ export type Main = Public;
206
+ }