@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,298 @@
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
+
4
+
5
+ export namespace TsunamiInformation {
6
+ export interface Schema {
7
+ type: 'tsunami-information';
8
+ version: '1.1.0';
9
+ }
10
+
11
+ export interface TsunamiForecastKindLastKind extends Components.CodeName {
12
+ }
13
+
14
+ export interface TsunamiForecastKind extends Components.CodeName {
15
+ lastKind: TsunamiForecastKindLastKind;
16
+ }
17
+
18
+ export type TsunamiForecastFirstHeight = ({
19
+ arrivalTime: string;
20
+ condition?: 'ただちに津波来襲と予測';
21
+ } | {
22
+ arrivalTime?: never;
23
+ condition: '津波到達中と推測' | '第1波の到達を確認';
24
+ }) &
25
+ {
26
+ revise?: '追加' | '更新';
27
+ };
28
+
29
+ export type TsunamiForecastMaxHeightValue = {
30
+ type: '津波の高さ';
31
+ unit: 'm';
32
+ } & ({
33
+ value: string;
34
+ over?: true;
35
+ condition?: never;
36
+ } | {
37
+ value: null;
38
+ over?: never;
39
+ condition?: '巨大' | '高い';
40
+ });
41
+
42
+ export interface TsunamiForecastMaxHeight {
43
+ height: TsunamiForecastMaxHeightValue;
44
+ condition?: '重要';
45
+ revise?: '追加' | '更新';
46
+ }
47
+
48
+ export interface TsunamiForecastStation extends Components.CodeName {
49
+ highTideDateTime: string;
50
+ firstHeight: TsunamiForecastFirstHeight;
51
+ }
52
+
53
+ export interface TsunamiForecast extends Components.CodeName {
54
+ kind: TsunamiForecastKind;
55
+ firstHeight?: TsunamiForecastFirstHeight;
56
+ maxHeight?: TsunamiForecastMaxHeight;
57
+ stations?: TsunamiForecastStation[] | never;
58
+ }
59
+
60
+ export interface TsunamiForecastVXSE41 extends TsunamiForecast {
61
+ stations?: never;
62
+ }
63
+
64
+ export interface TsunamiForecastVXSE51 extends TsunamiForecast {
65
+ stations?: TsunamiForecastStation[];
66
+ }
67
+
68
+ export interface TsunamiObservationStationFirstHeightArrived {
69
+ arrivalTime: string;
70
+ initial?: '押し' | '引き';
71
+ condition?: never;
72
+ revise?: '追加' | '更新';
73
+ status?: never;
74
+ }
75
+
76
+ export interface TsunamiObservationStationFirstHeightUnidentifiable {
77
+ arrivalTime?: never;
78
+ initial?: never;
79
+ condition: '第1波識別不能';
80
+ revise?: '追加' | '更新';
81
+ status?: never;
82
+ }
83
+
84
+ export interface TsunamiObservationStationFirstHeightDataMissing {
85
+ arrivalTime?: never;
86
+ initial?: never;
87
+ condition?: never;
88
+ revise?: never;
89
+ status: '欠測';
90
+ }
91
+
92
+
93
+ export type TsunamiObservationStationFirstHeight =
94
+ TsunamiObservationStationFirstHeightArrived
95
+ | TsunamiObservationStationFirstHeightUnidentifiable
96
+ | TsunamiObservationStationFirstHeightDataMissing;
97
+
98
+ export interface TsunamiObservationStationMaxHeightValue {
99
+ type: 'これまでの最大波の高さ';
100
+ unit: 'm';
101
+ value: string;
102
+ over?: true;
103
+ condition?: '上昇中';
104
+ }
105
+
106
+ export interface TsunamiObservationStationMaxHeightCommon {
107
+ dateTime: string;
108
+ height: TsunamiObservationStationMaxHeightValue;
109
+ condition?: '重要';
110
+ revise?: '追加' | '更新';
111
+ status?: '欠測';
112
+ }
113
+
114
+ export interface TsunamiObservationStationMaxHeightWeak {
115
+ dateTime: string;
116
+ height?: never;
117
+ condition: '微弱';
118
+ revise?: '追加' | '更新';
119
+ status?: '欠測';
120
+ }
121
+
122
+ export interface TsunamiObservationStationMaxHeightInProcess {
123
+ dateTime?: never;
124
+ height?: never;
125
+ condition: '観測中';
126
+ revise?: '追加' | '更新';
127
+ status?: '欠測';
128
+ }
129
+
130
+ export interface TsunamiObservationStationMaxHeightDataMissing {
131
+ dateTime?: never;
132
+ height?: never;
133
+ condition?: never;
134
+ revise?: never;
135
+ status: '欠測';
136
+ }
137
+
138
+ export type TsunamiObservationStationMaxHeight =
139
+ TsunamiObservationStationMaxHeightCommon
140
+ | TsunamiObservationStationMaxHeightWeak
141
+ | TsunamiObservationStationMaxHeightInProcess
142
+ | TsunamiObservationStationMaxHeightDataMissing;
143
+
144
+ export interface TsunamiObservationStation extends Components.CodeName {
145
+ sensor?: string;
146
+ firstHeight: TsunamiObservationStationFirstHeight;
147
+ maxHeight?: TsunamiObservationStationMaxHeight;
148
+ }
149
+
150
+ export interface TsunamiObservation {
151
+ code: string | null;
152
+ name: string | null;
153
+ stations: TsunamiObservationStation[];
154
+ }
155
+
156
+ export interface TsunamiObservationVXSE51 extends TsunamiObservation {
157
+ code: string;
158
+ name: string;
159
+ }
160
+
161
+ export interface TsunamiObservationVXSE52 extends TsunamiObservation {
162
+ code: null;
163
+ name: null;
164
+ }
165
+
166
+ export interface TsunamiEstimationFirstHeight {
167
+ arrivalTime: string;
168
+ condition?: '早いところでは既に津波到達と推定';
169
+ revise?: '追加' | '更新';
170
+ }
171
+
172
+ export type TsunamiEstimationMaxHeightValue = TsunamiForecastMaxHeightValue;
173
+
174
+ export type TsunamiEstimationMaxHeight =
175
+ ({
176
+ dateTime: string;
177
+ height: TsunamiEstimationMaxHeightValue;
178
+ condition?: '重要';
179
+ } | {
180
+ dateTime?: never;
181
+ height?: never;
182
+ condition: '推定中';
183
+ }) &
184
+ {
185
+ revise?: '追加' | '更新';
186
+ };
187
+
188
+ export interface TsunamiEstimation extends Components.CodeName {
189
+ firstHeight: TsunamiEstimationFirstHeight;
190
+ maxHeight: TsunamiEstimationMaxHeight;
191
+ }
192
+
193
+ export interface PublicBodyVTSE41Tsunami {
194
+ forecasts: TsunamiForecastVXSE41[];
195
+ }
196
+
197
+ export interface PublicBodyVTSE51Tsunami {
198
+ forecasts: TsunamiForecastVXSE51[];
199
+ observations?: TsunamiObservationVXSE51[];
200
+ }
201
+
202
+ export interface PublicBodyVTSE52Tsunami {
203
+ observations: TsunamiObservationVXSE52[];
204
+ estimations: TsunamiEstimation[];
205
+ }
206
+
207
+ export type Comment = {
208
+ free?: string;
209
+ warning?: {
210
+ text: string;
211
+ codes: string[];
212
+ };
213
+ };
214
+
215
+ export interface CancelBody {
216
+ text: string;
217
+ }
218
+
219
+ export interface PublicBodyVTSE41 {
220
+ tsunami: PublicBodyVTSE41Tsunami;
221
+ earthquakes: Components.Earthquake[];
222
+ text?: string;
223
+ comments?: Comment;
224
+ }
225
+
226
+ export interface PublicBodyVTSE51 {
227
+ tsunami: PublicBodyVTSE51Tsunami;
228
+ earthquakes: Components.Earthquake[];
229
+ text?: string;
230
+ comments?: Comment;
231
+ }
232
+
233
+ export interface PublicBodyVTSE52 {
234
+ tsunami: PublicBodyVTSE52Tsunami;
235
+ earthquakes: Components.Earthquake[];
236
+ text?: string;
237
+ comments?: Comment;
238
+ }
239
+
240
+
241
+ export interface PublicVTSE41 extends TelegramJSONMain {
242
+ _schema: Schema;
243
+ type: '津波警報・注意報・予報a';
244
+ title: string;
245
+ infoType: '発表' | '訂正';
246
+ targetDateTimeDubious?: never;
247
+ targetDuration?: never;
248
+ validDateTime?: string;
249
+ eventId: string;
250
+ serialNo: null;
251
+ infoKind: '津波警報・注意報・予報';
252
+ body: PublicBodyVTSE41;
253
+ }
254
+
255
+ export interface PublicVTSE51 extends TelegramJSONMain {
256
+ _schema: Schema;
257
+ type: '津波情報a';
258
+ title: '各地の満潮時刻・津波到達予想時刻に関する情報' | '津波観測に関する情報';
259
+ infoType: '発表' | '訂正';
260
+ targetDateTimeDubious?: never;
261
+ targetDuration?: never;
262
+ validDateTime?: never;
263
+ eventId: string;
264
+ serialNo: string;
265
+ infoKind: '津波情報';
266
+ body: PublicBodyVTSE51;
267
+ }
268
+
269
+
270
+ export interface PublicVTSE52 extends TelegramJSONMain {
271
+ _schema: Schema;
272
+ type: '沖合の津波観測に関する情報';
273
+ title: '沖合の津波観測に関する情報';
274
+ infoType: '発表' | '訂正';
275
+ targetDateTimeDubious?: never;
276
+ targetDuration?: never;
277
+ validDateTime?: never;
278
+ eventId: string;
279
+ serialNo: string;
280
+ infoKind: '津波情報';
281
+ body: PublicBodyVTSE52;
282
+ }
283
+
284
+
285
+ export interface Cancel extends TelegramJSONMain {
286
+ type: '津波警報・注意報・予報a' | '津波情報a' | '各地の満潮時刻・津波到達予想時刻に関する情報' | '津波観測に関する情報';
287
+ infoType: '取消';
288
+ targetDateTimeDubious?: never;
289
+ targetDuration?: never;
290
+ validDateTime?: never;
291
+ eventId: string;
292
+ infoKind: '津波警報・注意報・予報' | '津波情報';
293
+ body: CancelBody;
294
+ }
295
+
296
+ export type Main = (PublicVTSE41 | PublicVTSE51 | PublicVTSE52) | Cancel;
297
+
298
+ }
@@ -1,7 +1,9 @@
1
+ import { TsunamiInformation as v1_1_0 } from './1.1.0';
1
2
  import { TsunamiInformation as v1_0_0 } from './1.0.0';
2
3
 
3
4
 
4
5
  export {
5
- v1_0_0 as Latest,
6
+ v1_1_0 as Latest,
7
+ v1_1_0,
6
8
  v1_0_0
7
9
  };
@@ -0,0 +1,117 @@
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
+
4
+ export namespace WeatherImpactSociety {
5
+ export interface Schema {
6
+ type: 'weather-impact-society';
7
+ version: '1.0.1';
8
+ }
9
+
10
+ export interface Target extends Components.CodeName {
11
+ }
12
+
13
+ export interface TargetTimeDateTime {
14
+ value: string;
15
+ validFormat: string;
16
+ }
17
+
18
+ export interface TargetTime {
19
+ dateTime: TargetTimeDateTime;
20
+ duration?: string;
21
+ }
22
+
23
+ export interface MainTextZone extends Components.CodeName {
24
+ }
25
+
26
+ export interface MainText {
27
+ text: string;
28
+ zones: MainTextZone[];
29
+ }
30
+
31
+ export interface StatisticPeriodDateTime {
32
+ value: string;
33
+ validFormat?: string;
34
+ }
35
+
36
+ export interface StatisticPeriod {
37
+ dateTime: StatisticPeriodDateTime;
38
+ duration: string;
39
+ name: string;
40
+ }
41
+
42
+ export interface StatisticStationObservedValue {
43
+ type: string;
44
+ unit: string;
45
+ value: string | null;
46
+ condition?: string;
47
+ }
48
+
49
+ export interface StatisticStation extends Components.CodeName {
50
+ type: '天候の状況(速報値)';
51
+ observedValues: StatisticStationObservedValue[];
52
+ }
53
+
54
+ export interface Statistic {
55
+ type: '気象官署及び特別地域気象観測所' | 'アメダス';
56
+ period: StatisticPeriod;
57
+ text?: string;
58
+ stations: StatisticStation[];
59
+ }
60
+
61
+ export interface SeasonZoneEventDataDate {
62
+ value: string;
63
+ dubious: '頃';
64
+ }
65
+
66
+ export interface SeasonZoneEventData {
67
+ date?: SeasonZoneEventDataDate;
68
+ normal: SeasonZoneEventDataDate;
69
+ lastYear?: SeasonZoneEventDataDate;
70
+ remark?: string;
71
+ }
72
+
73
+ export interface SeasonZone extends Components.CodeName {
74
+ type: '梅雨入り' | '梅雨明け';
75
+ eventData: SeasonZoneEventData;
76
+ }
77
+
78
+ export interface Season {
79
+ type: '梅雨';
80
+ zones: SeasonZone[];
81
+ }
82
+
83
+ export interface PublicBody {
84
+ notice?: string;
85
+ target: Target;
86
+ targetTime: TargetTime;
87
+ mainTexts: MainText [];
88
+ statistics?: Statistic[];
89
+ comment?: string;
90
+ }
91
+
92
+ export interface PublicBodySeason extends PublicBody {
93
+ season: Season;
94
+ }
95
+
96
+ export interface Public extends TelegramJSONMain {
97
+ _schema: Schema;
98
+ type: '全般天候情報' | '地方天候情報';
99
+ title: string;
100
+ infoType: '発表' | '訂正' | '取消';
101
+ targetDateTimeDubious?: never;
102
+ targetDuration?: never;
103
+ validDateTime?: string;
104
+ eventId: string;
105
+ serialNo: string;
106
+ infoKind: '天候情報';
107
+ body: PublicBody;
108
+ }
109
+
110
+ export interface PublicZoneSeason extends Public {
111
+ type: '地方天候情報';
112
+ validDateTime?: never;
113
+ body: PublicBodySeason;
114
+ }
115
+
116
+ export type Main = Public | PublicZoneSeason;
117
+ }
@@ -1,7 +1,9 @@
1
+ import { WeatherImpactSociety as v1_0_1 } from './1.0.1';
1
2
  import { WeatherImpactSociety as v1_0_0 } from './1.0.0';
2
3
 
3
4
 
4
5
  export {
5
- v1_0_0 as Latest,
6
+ v1_0_1 as Latest,
7
+ v1_0_1,
6
8
  v1_0_0
7
9
  };
@@ -12,7 +12,16 @@ export namespace WeatherInformation {
12
12
  comment: string;
13
13
  }
14
14
 
15
- export interface PublicEvent extends TelegramJSONMain {
15
+ export interface PublicBodyVPFG50 {
16
+ target: {
17
+ name: string;
18
+ code: string
19
+ };
20
+ notice: string | null;
21
+ comment: string;
22
+ }
23
+
24
+ export interface Public extends TelegramJSONMain {
16
25
  _schema: Schema;
17
26
  type: '全般台風情報' | '全般台風情報(定型)' | '全般台風情報(詳細)' | '全般スモッグ気象情報' | 'スモッグ気象情報' | '地方高温注意情報' | '府県高温注意情報' | '熱中症警戒アラート' | '全般潮位情報' | '地方潮位情報' | '府県潮位情報' | '全般気象情報' | '地方気象情報' | '府県気象情報';
18
27
  title: string;
@@ -26,5 +35,33 @@ export namespace WeatherInformation {
26
35
  body: PublicBody;
27
36
  }
28
37
 
29
- export type Main = PublicEvent;
38
+ export interface PublicVPZK70 extends TelegramJSONMain {
39
+ _schema: Schema;
40
+ type: '全般季節予報(2週間気温予報)';
41
+ title: string;
42
+ infoType: '発表' | '訂正' | '取消';
43
+ targetDateTimeDubious?: never;
44
+ targetDuration?: never;
45
+ validDateTime?: never;
46
+ eventId: null;
47
+ serialNo: null;
48
+ infoKind: '平文情報';
49
+ body: PublicBody;
50
+ }
51
+
52
+ export interface PublicVPFG50 extends TelegramJSONMain {
53
+ _schema: Schema;
54
+ type: '府県天気概況';
55
+ title: string;
56
+ infoType: '発表' | '訂正' | '取消';
57
+ targetDateTimeDubious?: never;
58
+ targetDuration?: never;
59
+ validDateTime?: never;
60
+ eventId: null;
61
+ serialNo: null;
62
+ infoKind: '平文情報';
63
+ body: PublicBodyVPFG50;
64
+ }
65
+
66
+ export type Main = Public | PublicVPZK70 | PublicVPFG50;
30
67
  }