@dmdata/telegram-json-types 1.0.9-jschema.3 → 1.1.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.
- package/README.md +13 -4
- package/dist/jschema/earthquake-counts_1.0.0.json +1 -1
- package/dist/jschema/earthquake-hypocenter-update_1.0.0.json +1 -1
- package/dist/jschema/earthquake-information_1.0.0.json +1 -1
- package/dist/jschema/earthquake-information_1.1.0.json +1 -1
- package/dist/jschema/eew-information_1.0.0.json +1 -1
- package/dist/jschema/tsunami-information_1.0.0.json +1 -1
- package/dist/jschema/volcano-information_1.0.0.json +1 -1
- package/dist/jschema/weather-early_1.0.0.json +1 -0
- package/dist/jschema/weather-impact-society_1.0.0.json +1 -0
- package/dist/jschema/weather-information_1.0.0.json +1 -0
- package/dist/jschema/weather-landslide_1.0.0.json +1 -0
- package/dist/jschema/weather-river-flood_1.0.0.json +1 -0
- package/dist/jschema/weather-tornado_1.0.0.json +1 -0
- package/dist/jschema/weather-typhoon_1.0.0.json +1 -1
- package/dist/jschema/weather-warning_1.0.0.json +1 -0
- package/jest.config.ts +202 -0
- package/package.json +15 -3
- package/test/sample-schema-check.test.ts +54 -0
- package/tsconfig.json +2 -1
- package/types/component/code-name.ts +4 -0
- package/types/index.d.ts +37 -1
- package/types/schema/earthquake-counts/1.0.0.d.ts +2 -2
- package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +1 -1
- package/types/schema/earthquake-information/1.0.0.d.ts +14 -20
- package/types/schema/earthquake-information/1.1.0.d.ts +15 -21
- package/types/schema/earthquake-nankai/1.0.0.d.ts +2 -3
- package/types/schema/earthquake-nankai/index.d.ts +1 -1
- package/types/schema/eew-information/1.0.0.d.ts +20 -26
- package/types/schema/tsunami-information/1.0.0.d.ts +74 -55
- package/types/schema/volcano-information/1.0.0.d.ts +21 -20
- package/types/schema/weather-early/1.0.0.d.ts +135 -0
- package/types/schema/weather-early/index.d.ts +7 -0
- package/types/schema/weather-impact-society/1.0.0.d.ts +140 -0
- package/types/schema/weather-impact-society/index.d.ts +7 -0
- package/types/schema/weather-information/1.0.0.d.ts +30 -0
- package/types/schema/weather-information/index.d.ts +7 -0
- package/types/schema/weather-landslide/1.0.0.d.ts +51 -0
- package/types/schema/weather-landslide/index.d.ts +7 -0
- package/types/schema/weather-river-flood/1.0.0.d.ts +192 -0
- package/types/schema/weather-river-flood/index.d.ts +7 -0
- package/types/schema/weather-tornado/1.0.0.d.ts +51 -0
- package/types/schema/weather-tornado/index.d.ts +7 -0
- package/types/schema/weather-typhoon/1.0.0.d.ts +24 -13
- package/types/schema/weather-warning/1.0.0.d.ts +212 -0
- package/types/schema/weather-warning/index.d.ts +7 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TelegramJSONMain } from '@t/main';
|
|
2
2
|
import { Coordinate } from '@t/component/coordinate';
|
|
3
|
-
import {
|
|
3
|
+
import { UnitValueNotNull } from '@t/component/unit-value';
|
|
4
4
|
|
|
5
5
|
export namespace WeatherTyphoon {
|
|
6
6
|
export interface Schema {
|
|
@@ -18,11 +18,11 @@ export namespace WeatherTyphoon {
|
|
|
18
18
|
|
|
19
19
|
export interface Axis {
|
|
20
20
|
direction: Direction;
|
|
21
|
-
radius:
|
|
21
|
+
radius: UnitValueNotNull;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export interface RealStateClassification {
|
|
25
|
-
category: 'TD' | 'TY' | 'STS' | 'Hurricane' | 'Tropical Storm' | 'LOW' | null;
|
|
25
|
+
category: 'TD' | 'TY' | 'TS' | 'STS' | 'Hurricane' | 'Tropical Storm' | 'LOW' | null;
|
|
26
26
|
name: '熱帯低気圧' | '台風' | 'ハリケーン' | '発達した熱帯低気圧' | '温帯低気圧' | null;
|
|
27
27
|
area: '大型' | '超大型' | null;
|
|
28
28
|
intensity: '強い' | '非常に強い' | '猛烈な' | null;
|
|
@@ -30,12 +30,23 @@ export namespace WeatherTyphoon {
|
|
|
30
30
|
|
|
31
31
|
export type ForecastClassification = Omit<RealStateClassification, 'area'>;
|
|
32
32
|
|
|
33
|
+
export type RealStateCenterSpeed = {
|
|
34
|
+
type: '移動速度';
|
|
35
|
+
unit: 'km/h';
|
|
36
|
+
} & ({
|
|
37
|
+
value: string;
|
|
38
|
+
condition: never;
|
|
39
|
+
} | {
|
|
40
|
+
value: null;
|
|
41
|
+
condition: 'ゆっくり' | 'ほとんど停滞';
|
|
42
|
+
})
|
|
43
|
+
|
|
33
44
|
export interface RealStateCenter {
|
|
34
45
|
coordinate: Coordinate;
|
|
35
|
-
location: string;
|
|
46
|
+
location: string | null;
|
|
36
47
|
direction: Direction;
|
|
37
|
-
speed:
|
|
38
|
-
pressure: UnitValueNotNull
|
|
48
|
+
speed: RealStateCenterSpeed;
|
|
49
|
+
pressure: UnitValueNotNull<'中心気圧', 'hPa'>;
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
export type ForecastCenter = {
|
|
@@ -43,7 +54,7 @@ export namespace WeatherTyphoon {
|
|
|
43
54
|
basePoint: Coordinate;
|
|
44
55
|
axes: Axis[];
|
|
45
56
|
};
|
|
46
|
-
} & Omit<RealStateCenter, '
|
|
57
|
+
} & Omit<RealStateCenter, 'coordinate'>;
|
|
47
58
|
|
|
48
59
|
export interface RealStateWindArea {
|
|
49
60
|
strong: Axis[];
|
|
@@ -51,9 +62,9 @@ export namespace WeatherTyphoon {
|
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
export interface RealStateWind {
|
|
54
|
-
average:
|
|
55
|
-
instantaneous:
|
|
56
|
-
area
|
|
65
|
+
average: UnitValueNotNull<'最大風速', 'm/s', '中心付近' | '中心付近を除く' | 'なし' | never>;
|
|
66
|
+
instantaneous: UnitValueNotNull<'最大瞬間風速', 'm/s'>;
|
|
67
|
+
area?: RealStateWindArea;
|
|
57
68
|
}
|
|
58
69
|
|
|
59
70
|
export interface ForecastWindArea {
|
|
@@ -61,9 +72,9 @@ export namespace WeatherTyphoon {
|
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
export interface ForecastWind {
|
|
64
|
-
average:
|
|
65
|
-
instantaneous:
|
|
66
|
-
area
|
|
75
|
+
average: UnitValueNotNull<'最大風速', 'm/s', '中心付近' | '中心付近を除く' | 'なし' | never>;
|
|
76
|
+
instantaneous: UnitValueNotNull<'最大瞬間風速', 'm/s'>;
|
|
77
|
+
area?: ForecastWindArea;
|
|
67
78
|
}
|
|
68
79
|
|
|
69
80
|
export interface RealState {
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { TelegramJSONMain } from '@t/main';
|
|
2
|
+
import { CodeName } from '@t/component/code-name';
|
|
3
|
+
|
|
4
|
+
export namespace WeatherWarning {
|
|
5
|
+
export interface Schema {
|
|
6
|
+
type: 'weather-warning';
|
|
7
|
+
version: '1.0.0';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface KindNextKindDateTime {
|
|
11
|
+
value: string;
|
|
12
|
+
validFormat: string;
|
|
13
|
+
precision: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface KindNextKind extends CodeName {
|
|
17
|
+
condition?: '土砂災害' | '浸水害' | '土砂災害、浸水害';
|
|
18
|
+
dateTime: KindNextKindDateTime;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export interface Kind extends CodeName {
|
|
23
|
+
status: '発表' | '継続' | '特別警報から警報' | '特別警報から注意報' | '警報から注意報' | '解除';
|
|
24
|
+
condition?: '土砂災害' | '浸水害' | '土砂災害、浸水害';
|
|
25
|
+
attentions?: string[];
|
|
26
|
+
additions?: string[];
|
|
27
|
+
lastKind?: CodeName;
|
|
28
|
+
nextKinds?: KindNextKind[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface KindVPOA50 extends CodeName {
|
|
32
|
+
status: '発表' | 'なし';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface PrefectureBase extends CodeName {
|
|
36
|
+
kinds: Kind[];
|
|
37
|
+
changeStatus: '警報・注意報種別に変化有' | '警報・注意報種別に変化無、量的予想事項等に変化有' | '変化無';
|
|
38
|
+
fullStatus: '全域' | '一部';
|
|
39
|
+
editingMark: boolean;
|
|
40
|
+
condition: never;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface PrefectureNone extends CodeName {
|
|
44
|
+
kinds: {}[];
|
|
45
|
+
changeStatus: never;
|
|
46
|
+
fullStatus: never;
|
|
47
|
+
editingMark: never;
|
|
48
|
+
condition: '発表警報・注意報はなし';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type Prefecture = PrefectureBase | PrefectureNone;
|
|
52
|
+
|
|
53
|
+
export interface PrefectureVPOA50 extends CodeName {
|
|
54
|
+
kinds: [KindVPOA50];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type Region = Prefecture;
|
|
58
|
+
export type Area = Prefecture;
|
|
59
|
+
export type City = Omit<PrefectureBase, 'fullStatus' | 'editingMark'> | PrefectureNone;
|
|
60
|
+
|
|
61
|
+
export interface TimeSeriesTimeDefine {
|
|
62
|
+
timeId: string;
|
|
63
|
+
dateTime: string;
|
|
64
|
+
duration: string;
|
|
65
|
+
name: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface TimeSeriesItemKindRiskDegreeLocalSignificance extends CodeName {
|
|
69
|
+
refId: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface TimeSeriesItemKindRiskDegreeLocalPeakTime {
|
|
73
|
+
date?: string;
|
|
74
|
+
term: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface TimeSeriesItemKindRiskDegreeLocalFuture extends CodeName {
|
|
78
|
+
sentence: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface TimeSeriesItemKindRiskDegreeLocal {
|
|
82
|
+
name: string | null;
|
|
83
|
+
significances: TimeSeriesItemKindRiskDegreeLocalSignificance[];
|
|
84
|
+
peakTime?: TimeSeriesItemKindRiskDegreeLocalPeakTime;
|
|
85
|
+
attentions?: string[];
|
|
86
|
+
additions?: string[];
|
|
87
|
+
future?: TimeSeriesItemKindRiskDegreeLocalFuture;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface TimeSeriesItemKindRiskDegree {
|
|
91
|
+
type: string;
|
|
92
|
+
locals: TimeSeriesItemKindRiskDegreeLocal[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface TimeSeriesItemKindQuantitativeTimelineLocalForecastValue {
|
|
96
|
+
refId: string;
|
|
97
|
+
unit: string;
|
|
98
|
+
value: string | null;
|
|
99
|
+
condition?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface TimeSeriesItemKindQuantitativeTimelineLocalForecastNotValue {
|
|
103
|
+
refId: string;
|
|
104
|
+
unit: string;
|
|
105
|
+
value: null;
|
|
106
|
+
condition?: '値なし';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type TimeSeriesItemKindQuantitativeTimelineLocalForecast =
|
|
110
|
+
TimeSeriesItemKindQuantitativeTimelineLocalForecastValue
|
|
111
|
+
| TimeSeriesItemKindQuantitativeTimelineLocalForecastNotValue
|
|
112
|
+
|
|
113
|
+
export interface TimeSeriesItemKindQuantitativeTimelineLocal {
|
|
114
|
+
name: string | null;
|
|
115
|
+
forecasts: TimeSeriesItemKindQuantitativeTimelineLocalForecast [];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface TimeSeriesItemKindQuantitativeWholeLocalForecastValue {
|
|
119
|
+
unit: string;
|
|
120
|
+
value: string;
|
|
121
|
+
condition?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface TimeSeriesItemKindQuantitativeWholeLocalForecastNotValue {
|
|
125
|
+
unit: string;
|
|
126
|
+
value: null;
|
|
127
|
+
condition: '値なし';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type TimeSeriesItemKindQuantitativeWholeLocalForecast =
|
|
131
|
+
TimeSeriesItemKindQuantitativeWholeLocalForecastValue
|
|
132
|
+
| TimeSeriesItemKindQuantitativeWholeLocalForecastNotValue;
|
|
133
|
+
|
|
134
|
+
export interface TimeSeriesItemKindQuantitativeWholeLocal {
|
|
135
|
+
name: string | null;
|
|
136
|
+
forecast: TimeSeriesItemKindQuantitativeWholeLocalForecast;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface TimeSeriesItemKindQuantitativeTimeline {
|
|
140
|
+
type: string;
|
|
141
|
+
forecastType: 'timeline';
|
|
142
|
+
locals: TimeSeriesItemKindQuantitativeTimelineLocal [];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface TimeSeriesItemKindQuantitativeWhole {
|
|
146
|
+
type: string;
|
|
147
|
+
forecastType: 'whole';
|
|
148
|
+
locals: TimeSeriesItemKindQuantitativeWholeLocal[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type TimeSeriesItemKindQuantitative =
|
|
152
|
+
TimeSeriesItemKindQuantitativeTimeline
|
|
153
|
+
| TimeSeriesItemKindQuantitativeWhole;
|
|
154
|
+
|
|
155
|
+
export interface TimeSeriesItemKind extends CodeName {
|
|
156
|
+
riskDegrees: TimeSeriesItemKindRiskDegree[];
|
|
157
|
+
quantitative?: TimeSeriesItemKindQuantitative[];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface TimeSeriesItem extends CodeName {
|
|
161
|
+
kinds: TimeSeriesItemKind[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface TimeSeries {
|
|
165
|
+
timeDefines: TimeSeriesTimeDefine[];
|
|
166
|
+
items: TimeSeriesItem[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface PublicBodyVPWW54 {
|
|
170
|
+
notice?: string;
|
|
171
|
+
prefectures: Prefecture[];
|
|
172
|
+
regions: Region[];
|
|
173
|
+
areas: Area[];
|
|
174
|
+
cities: City[];
|
|
175
|
+
timeSeries?: [TimeSeries] | [TimeSeries, TimeSeries];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface PublicBodyVPOA50 {
|
|
179
|
+
notice?: string;
|
|
180
|
+
prefectures: PrefectureVPOA50[];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface PublicVPWW54 extends TelegramJSONMain {
|
|
184
|
+
_schema: Schema;
|
|
185
|
+
type: '気象警報・注意報(H27)';
|
|
186
|
+
title: string;
|
|
187
|
+
infoType: '発表' | '訂正';
|
|
188
|
+
targetDateTimeDubious: never;
|
|
189
|
+
targetDuration: never;
|
|
190
|
+
validDateTime: never;
|
|
191
|
+
eventId: null;
|
|
192
|
+
serialNo: null;
|
|
193
|
+
infoKind: '気象警報・注意報';
|
|
194
|
+
body: PublicBodyVPWW54;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface PublicVPOA50 extends TelegramJSONMain {
|
|
198
|
+
_schema: Schema;
|
|
199
|
+
type: '記録的短時間大雨情報';
|
|
200
|
+
title: string;
|
|
201
|
+
infoType: '発表' | '訂正' | '取消';
|
|
202
|
+
targetDateTimeDubious: never;
|
|
203
|
+
targetDuration: never;
|
|
204
|
+
validDateTime: never;
|
|
205
|
+
eventId: string;
|
|
206
|
+
serialNo: string;
|
|
207
|
+
infoKind: '記録的短時間大雨情報';
|
|
208
|
+
body: PublicBodyVPOA50;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type Main = PublicVPWW54 | PublicVPOA50;
|
|
212
|
+
}
|