@dmdata/telegram-json-types 1.1.14 → 1.1.16

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 (34) hide show
  1. package/README.md +6 -1
  2. package/dist/jschema/earthquake-hypocenter-update_1.0.0.json +1 -1
  3. package/dist/jschema/earthquake-information_1.0.0.json +1 -1
  4. package/dist/jschema/earthquake-information_1.1.0.json +1 -1
  5. package/dist/jschema/earthquake-nankai_1.0.0.json +1 -1
  6. package/dist/jschema/forecast-2week-temperature_1.0.0.json +1 -0
  7. package/dist/jschema/forecast-prefecture_1.0.0.json +1 -0
  8. package/dist/jschema/forecast-season_1.0.0.json +1 -0
  9. package/dist/jschema/forecast-warning-possibility_1.0.0.json +1 -0
  10. package/dist/jschema/forecast-weathermap_1.0.0.json +1 -0
  11. package/dist/jschema/tsunami-information_1.0.0.json +1 -1
  12. package/dist/jschema/tsunami-information_1.1.0.json +1 -0
  13. package/dist/jschema/weather-impact-society_1.0.1.json +1 -0
  14. package/dist/jschema/weather-information_1.0.0.json +1 -1
  15. package/package.json +2 -4
  16. package/test/sample-schema-check.test.ts +23 -13
  17. package/types/component/earthquake.d.ts +1 -1
  18. package/types/index.d.ts +19 -2
  19. package/types/schema/earthquake-nankai/1.0.0.d.ts +18 -3
  20. package/types/schema/forecast-2week-temperature/1.0.0.d.ts +110 -0
  21. package/types/schema/forecast-2week-temperature/index.d.ts +7 -0
  22. package/types/schema/forecast-prefecture/1.0.0.d.ts +526 -0
  23. package/types/schema/forecast-prefecture/index.d.ts +7 -0
  24. package/types/schema/forecast-season/1.0.0.d.ts +169 -0
  25. package/types/schema/forecast-season/index.d.ts +7 -0
  26. package/types/schema/forecast-warning-possibility/1.0.0.d.ts +382 -0
  27. package/types/schema/forecast-warning-possibility/index.d.ts +7 -0
  28. package/types/schema/forecast-weathermap/1.0.0.d.ts +194 -0
  29. package/types/schema/forecast-weathermap/index.d.ts +7 -0
  30. package/types/schema/tsunami-information/1.1.0.d.ts +298 -0
  31. package/types/schema/tsunami-information/index.d.ts +3 -1
  32. package/types/schema/weather-impact-society/1.0.1.d.ts +117 -0
  33. package/types/schema/weather-impact-society/index.d.ts +3 -1
  34. package/types/schema/weather-information/1.0.0.d.ts +39 -2
@@ -0,0 +1,382 @@
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
+
4
+ export namespace ForecastWarningPossibility {
5
+ export interface Schema {
6
+ type: 'forecast-warning-possibility';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface WindSpeed {
11
+ type: '最大風速';
12
+ unit: 'm/s';
13
+ value: string;
14
+ condition?: '以下' | '以上';
15
+ range?: never;
16
+ }
17
+
18
+ export interface WindSpeedRange {
19
+ type: '最大風速';
20
+ range: {
21
+ type: '範囲';
22
+ unit: 'm/s';
23
+ from: string;
24
+ to: string;
25
+ };
26
+ value?: never;
27
+ condition?: never;
28
+ }
29
+
30
+ export interface WaveHeight {
31
+ type: '波高';
32
+ unit: 'm';
33
+ value: string;
34
+ condition?: '以下' | '以上';
35
+ range?: never;
36
+ }
37
+
38
+ export interface WaveHeightNoValue {
39
+ type: '波高';
40
+ unit: 'm';
41
+ value: null;
42
+ condition: '流氷に覆われている' | string;
43
+ range?: never;
44
+ }
45
+
46
+ export interface WaveHeightRange {
47
+ type: '波高';
48
+ range: {
49
+ type: '範囲';
50
+ unit: 'm';
51
+ from: string;
52
+ to: string;
53
+ };
54
+ value?: never;
55
+ condition?: never;
56
+ }
57
+
58
+ export interface Precipitation<Type extends '1時間最大雨量' | '3時間最大雨量' | '24時間最大雨量'> {
59
+ type: Type;
60
+ unit: 'mm';
61
+ value: string;
62
+ condition?: '以下' | '以上';
63
+ range?: never;
64
+ }
65
+
66
+ export interface PrecipitationRange<Type extends '1時間最大雨量' | '3時間最大雨量' | '24時間最大雨量'> {
67
+ type: Type;
68
+ range: {
69
+ type: '範囲';
70
+ unit: 'mm';
71
+ from: string;
72
+ to: string;
73
+ };
74
+ value?: never;
75
+ condition?: never;
76
+ }
77
+
78
+ export interface SnowfallDepth<Type extends '6時間最大降雪量' | '24時間最大降雪量'> {
79
+ type: Type;
80
+ unit: 'cm';
81
+ value: string;
82
+ condition?: '以上';
83
+ range?: never;
84
+ }
85
+
86
+ export interface SnowfallDepthRange<Type extends '6時間最大降雪量' | '24時間最大降雪量'> {
87
+ type: Type;
88
+ range: {
89
+ type: '範囲';
90
+ unit: 'cm';
91
+ from: string;
92
+ to: string;
93
+ };
94
+ value?: never;
95
+ condition?: never;
96
+ }
97
+
98
+ export interface TimeSeriesTimeDefine {
99
+ timeId: string;
100
+ dateTime: string;
101
+ duration: string;
102
+ name: string;
103
+ }
104
+
105
+ export interface TimeSeriesItemPrecipitationNoRangeDetail<Type extends '1時間最大雨量' | '3時間最大雨量'> {
106
+ refId: string;
107
+ text: string;
108
+ base: {
109
+ locals: [
110
+ {
111
+ name: null;
112
+ precipitation: Precipitation<Type>;
113
+ }
114
+ ] |
115
+ {
116
+ name: string;
117
+ precipitation: Precipitation<Type>;
118
+ }[]
119
+ };
120
+ subArea?: {
121
+ name: string;
122
+ base: {
123
+ precipitation: Precipitation<Type>;
124
+ };
125
+ };
126
+ }
127
+
128
+ export interface TimeSeriesItemKindPrecipitationNoRange<Type extends '1時間最大雨量' | '3時間最大雨量'> {
129
+ type: Type;
130
+ details: TimeSeriesItemPrecipitationNoRangeDetail<Type>[];
131
+ }
132
+
133
+ export interface TimeSeriesItemSnowfallDepthNoRangeDetail {
134
+ refId: string;
135
+ text: string;
136
+ base: {
137
+ locals: [
138
+ {
139
+ name: null;
140
+ depth: SnowfallDepth<'6時間最大降雪量'>;
141
+ }
142
+ ] |
143
+ {
144
+ name: string;
145
+ depth: SnowfallDepth<'6時間最大降雪量'>;
146
+ }[]
147
+ };
148
+ subArea?: {
149
+ name: string;
150
+ base: {
151
+ depth: SnowfallDepth<'6時間最大降雪量'>;
152
+ };
153
+ };
154
+ }
155
+
156
+ export interface TimeSeriesItemKindSnowfallDepthNoRange {
157
+ type: '6時間最大降雪量';
158
+ details: TimeSeriesItemSnowfallDepthNoRangeDetail[];
159
+ }
160
+
161
+ export interface TimeSeriesItemWindSpeedDetail {
162
+ refId: string;
163
+ text: string;
164
+ base: {
165
+ locals: [
166
+ {
167
+ name: null;
168
+ speed: WindSpeed | WindSpeedRange;
169
+ }
170
+ ] |
171
+ {
172
+ name: string;
173
+ speed: WindSpeed | WindSpeedRange;
174
+ }[]
175
+ };
176
+ subArea?: {
177
+ name: string;
178
+ base: {
179
+ speed: WindSpeed | WindSpeedRange;
180
+ };
181
+ };
182
+ }
183
+
184
+ export interface TimeSeriesItemKindWindSpeed {
185
+ type: '最大風速';
186
+ details: TimeSeriesItemWindSpeedDetail[];
187
+ }
188
+
189
+ export interface TimeSeriesItemWaveHeightDetail {
190
+ refId: string;
191
+ text: string;
192
+ base: {
193
+ locals: [
194
+ {
195
+ name: null;
196
+ height: WaveHeight | WaveHeightRange | WaveHeightNoValue;
197
+ }
198
+ ] |
199
+ {
200
+ name: string;
201
+ height: WaveHeight | WaveHeightRange | WaveHeightNoValue;
202
+ }[]
203
+ };
204
+ subArea?: {
205
+ name: string;
206
+ base: {
207
+ height: WaveHeight | WaveHeightRange | WaveHeightNoValue;
208
+ };
209
+ };
210
+ }
211
+
212
+ export interface TimeSeriesItemKindWaveHeight {
213
+ type: '波';
214
+ details: TimeSeriesItemWaveHeightDetail[];
215
+ }
216
+
217
+
218
+ export interface TimeSeries6HoursItem extends Components.CodeName {
219
+ kinds: [
220
+ TimeSeriesItemKindPrecipitationNoRange<'1時間最大雨量'>,
221
+ TimeSeriesItemKindPrecipitationNoRange<'3時間最大雨量'>,
222
+ TimeSeriesItemKindSnowfallDepthNoRange,
223
+ TimeSeriesItemKindWindSpeed,
224
+ TimeSeriesItemKindWaveHeight
225
+ ] | [
226
+ TimeSeriesItemKindPrecipitationNoRange<'1時間最大雨量'>,
227
+ TimeSeriesItemKindPrecipitationNoRange<'3時間最大雨量'>,
228
+ TimeSeriesItemKindSnowfallDepthNoRange,
229
+ TimeSeriesItemKindWindSpeed,
230
+ ];
231
+ }
232
+
233
+ export interface TimeSeries6Hours {
234
+ timeDefines: TimeSeriesTimeDefine[];
235
+ items: TimeSeries6HoursItem[];
236
+ }
237
+
238
+ export interface TimeSeriesItemPrecipitationDetail {
239
+ refId: string;
240
+ text: string;
241
+ base: {
242
+ locals: [
243
+ {
244
+ name: null;
245
+ precipitation: Precipitation<'24時間最大雨量'> | PrecipitationRange<'24時間最大雨量'>;
246
+ }
247
+ ] |
248
+ {
249
+ name: string;
250
+ precipitation: Precipitation<'24時間最大雨量'> | PrecipitationRange<'24時間最大雨量'>;
251
+ }[]
252
+ };
253
+ subArea?: {
254
+ name: string;
255
+ base: {
256
+ precipitation: Precipitation<'24時間最大雨量'> | PrecipitationRange<'24時間最大雨量'>;
257
+ };
258
+ };
259
+ }
260
+
261
+ export interface TimeSeriesItemKindPrecipitation {
262
+ type: '24時間最大雨量';
263
+ details: TimeSeriesItemPrecipitationDetail[];
264
+ }
265
+
266
+ export interface TimeSeriesItemSnowfallDepthDetail {
267
+ refId: string;
268
+ text: string;
269
+ base: {
270
+ locals: [
271
+ {
272
+ name: null;
273
+ depth: SnowfallDepth<'24時間最大降雪量'> | SnowfallDepthRange<'24時間最大降雪量'>;
274
+ }
275
+ ] |
276
+ {
277
+ name: string;
278
+ depth: SnowfallDepth<'24時間最大降雪量'> | SnowfallDepthRange<'24時間最大降雪量'>;
279
+ }[]
280
+ };
281
+ subArea?: {
282
+ name: string;
283
+ base: {
284
+ depth: SnowfallDepth<'24時間最大降雪量'> | SnowfallDepthRange<'24時間最大降雪量'>;
285
+ };
286
+ };
287
+ }
288
+
289
+ export interface TimeSeriesItemKindSnowfallDepth {
290
+ type: '24時間最大降雪量';
291
+ details: TimeSeriesItemSnowfallDepthDetail[];
292
+ }
293
+
294
+ export interface TimeSeries24HoursItem extends Components.CodeName {
295
+ kinds: [
296
+ TimeSeriesItemKindPrecipitation,
297
+ TimeSeriesItemKindSnowfallDepth
298
+ ];
299
+ }
300
+
301
+ export interface TimeSeries24Hours {
302
+ timeDefines: [TimeSeriesTimeDefine];
303
+ items: TimeSeries24HoursItem[];
304
+ }
305
+
306
+ export interface TimeSeriesPossibilityRanksItemRank<Type extends '雨' | '雪' | '風(風雪)' | '波' | '潮位'> {
307
+ refId: string;
308
+ type: `${Type}の警報級の可能性`;
309
+ value: '高' | '中' | 'なし' | null;
310
+ condition?: '値なし';
311
+ }
312
+
313
+ export interface TimeSeriesPossibilityRanksItemKind<Type extends '雨' | '雪' | '風(風雪)' | '波' | '潮位'> {
314
+ type: `${Type}の警報級の可能性`;
315
+ text?: string;
316
+ possibilityRanks: TimeSeriesPossibilityRanksItemRank<Type>[];
317
+ }
318
+
319
+ export interface TimeSeriesPossibilityRanksItem extends Components.CodeName {
320
+ kinds: [
321
+ TimeSeriesPossibilityRanksItemKind<'雨'>,
322
+ TimeSeriesPossibilityRanksItemKind<'雪'>,
323
+ TimeSeriesPossibilityRanksItemKind<'風(風雪)'>,
324
+ TimeSeriesPossibilityRanksItemKind<'波'>,
325
+ TimeSeriesPossibilityRanksItemKind<'潮位'>
326
+ ] | [
327
+ TimeSeriesPossibilityRanksItemKind<'雨'>,
328
+ TimeSeriesPossibilityRanksItemKind<'雪'>,
329
+ TimeSeriesPossibilityRanksItemKind<'風(風雪)'>
330
+ ];
331
+ }
332
+
333
+
334
+ export interface TimeSeriesPossibilityRanks<TimeDefineName extends boolean = true> {
335
+ timeDefines: TimeDefineName extends true ? TimeSeriesTimeDefine[] : Omit<TimeSeriesTimeDefine, 'name'>[];
336
+ items: TimeSeriesPossibilityRanksItem[];
337
+ }
338
+
339
+ export interface PublicBodyVPFD60 {
340
+ timeSeries: [
341
+ TimeSeries6Hours,
342
+ TimeSeries24Hours,
343
+ TimeSeriesPossibilityRanks
344
+ ];
345
+ }
346
+
347
+ export interface PublicBodyVPFW60 {
348
+ timeSeries: [
349
+ TimeSeriesPossibilityRanks<false>
350
+ ];
351
+ }
352
+
353
+ export interface PublicVPFD60 extends TelegramJSONMain {
354
+ _schema: Schema;
355
+ type: '警報級の可能性(明日まで)';
356
+ title: string;
357
+ infoType: '発表' | '訂正' | '遅延';
358
+ targetDateTimeDubious: never;
359
+ targetDuration: string;
360
+ validDateTime: never;
361
+ eventId: null;
362
+ serialNo: null;
363
+ infoKind: '警報級の可能性(明日まで)';
364
+ body: PublicBodyVPFD60;
365
+ }
366
+
367
+ export interface PublicVPFW60 extends TelegramJSONMain {
368
+ _schema: Schema;
369
+ type: '警報級の可能性(明後日以降)';
370
+ title: string;
371
+ infoType: '発表' | '訂正' | '遅延';
372
+ targetDateTimeDubious: never;
373
+ targetDuration: string;
374
+ validDateTime: never;
375
+ eventId: null;
376
+ serialNo: null;
377
+ infoKind: '警報級の可能性(明後日以降)';
378
+ body: PublicBodyVPFW60;
379
+ }
380
+
381
+ export type Main = PublicVPFD60 | PublicVPFW60;
382
+ }
@@ -0,0 +1,7 @@
1
+ import { ForecastWarningPossibility as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };
@@ -0,0 +1,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
+ 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
+ }
@@ -0,0 +1,7 @@
1
+ import { ForecastWeathermap as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };