@dmdata/telegram-json-types 1.1.17 → 1.2.0
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 +26 -21
- package/dist/build.js +1 -0
- package/dist/jschema/earthquake-counts_1.0.0.json +1 -1
- package/dist/jschema/earthquake-explanation_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/earthquake-nankai_1.0.0.json +1 -1
- package/dist/jschema/eew-information_1.0.0.json +1 -1
- package/dist/jschema/forecast-2week-temperature_1.0.0.json +1 -1
- package/dist/jschema/forecast-prefecture_1.0.0.json +1 -1
- package/dist/jschema/forecast-season_1.0.0.json +1 -1
- package/dist/jschema/forecast-warning-possibility_1.0.0.json +1 -1
- package/dist/jschema/forecast-warning-possibility_1.1.0.json +1 -0
- package/dist/jschema/forecast-weathermap_1.0.0.json +1 -1
- package/dist/jschema/tsunami-information_1.0.0.json +1 -1
- package/dist/jschema/tsunami-information_1.1.0.json +1 -1
- package/dist/jschema/volcano-information_1.0.0.json +1 -1
- package/dist/jschema/weather-commentary_1.0.0.json +1 -0
- package/dist/jschema/weather-early_1.0.0.json +1 -1
- package/dist/jschema/weather-impact-society_1.0.0.json +1 -1
- package/dist/jschema/weather-impact-society_1.0.1.json +1 -1
- package/dist/jschema/weather-information_1.0.0.json +1 -1
- package/dist/jschema/weather-landslide_1.0.0.json +1 -1
- package/dist/jschema/weather-river-flood_1.0.0.json +1 -1
- package/dist/jschema/weather-tornado_1.0.0.json +1 -1
- package/dist/jschema/weather-typhoon_1.0.0.json +1 -1
- package/dist/jschema/weather-warning-timeseries_1.0.0.json +1 -0
- package/dist/jschema/weather-warning_1.0.0.json +1 -1
- package/dist/jschema/weather-warning_1.1.0.json +1 -0
- package/dist/jschema-load.js +5 -4
- package/package.json +5 -5
- package/test/sample-schema-check.test.ts +12 -7
- package/tsconfig.json +3 -1
- package/types/component/index.d.ts +17 -14
- package/types/component/util.d.ts +20 -0
- package/types/index.d.ts +8 -0
- package/types/schema/earthquake-information/1.1.0.d.ts +4 -4
- package/types/schema/forecast-prefecture/1.0.0.d.ts +12 -1
- package/types/schema/forecast-warning-possibility/1.0.0.d.ts +14 -8
- package/types/schema/forecast-warning-possibility/1.1.0.d.ts +129 -0
- package/types/schema/forecast-warning-possibility/index.d.ts +9 -7
- package/types/schema/tsunami-information/1.1.0.d.ts +2 -2
- package/types/schema/weather-commentary/1.0.0.d.ts +984 -0
- package/types/schema/weather-commentary/index.d.ts +7 -0
- package/types/schema/weather-early/1.0.0.d.ts +1 -0
- package/types/schema/weather-impact-society/1.0.0.d.ts +1 -0
- package/types/schema/weather-impact-society/1.0.1.d.ts +1 -0
- package/types/schema/weather-tornado/1.0.0.d.ts +4 -0
- package/types/schema/weather-typhoon/1.0.0.d.ts +14 -2
- package/types/schema/weather-warning/1.0.0.d.ts +1 -0
- package/types/schema/weather-warning/1.1.0.d.ts +469 -0
- package/types/schema/weather-warning/index.d.ts +9 -7
- package/types/schema/weather-warning-timeseries/1.0.0.d.ts +385 -0
- package/types/schema/weather-warning-timeseries/index.d.ts +7 -0
|
@@ -10,8 +10,8 @@ export namespace ForecastWarningPossibility {
|
|
|
10
10
|
export interface WindSpeed {
|
|
11
11
|
type: '最大風速';
|
|
12
12
|
unit: 'm/s';
|
|
13
|
-
value: string;
|
|
14
|
-
condition?: '以下' | '以上';
|
|
13
|
+
value: string | null;
|
|
14
|
+
condition?: '以下' | '以上' | '値なし';
|
|
15
15
|
range?: never;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -39,7 +39,7 @@ export namespace ForecastWarningPossibility {
|
|
|
39
39
|
type: '波高';
|
|
40
40
|
unit: 'm';
|
|
41
41
|
value: null;
|
|
42
|
-
condition: '流氷に覆われている' | string;
|
|
42
|
+
condition: '流氷に覆われている' | '値なし' | string;
|
|
43
43
|
range?: never;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -58,8 +58,8 @@ export namespace ForecastWarningPossibility {
|
|
|
58
58
|
export interface Precipitation<Type extends '1時間最大雨量' | '3時間最大雨量' | '24時間最大雨量'> {
|
|
59
59
|
type: Type;
|
|
60
60
|
unit: 'mm';
|
|
61
|
-
value: string;
|
|
62
|
-
condition?: '以下' | '以上';
|
|
61
|
+
value: string | null;
|
|
62
|
+
condition?: '以下' | '以上' | '値なし';
|
|
63
63
|
range?: never;
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -78,8 +78,8 @@ export namespace ForecastWarningPossibility {
|
|
|
78
78
|
export interface SnowfallDepth<Type extends '6時間最大降雪量' | '24時間最大降雪量'> {
|
|
79
79
|
type: Type;
|
|
80
80
|
unit: 'cm';
|
|
81
|
-
value: string;
|
|
82
|
-
condition?: '以上';
|
|
81
|
+
value: string | null;
|
|
82
|
+
condition?: '以上' | '値なし';
|
|
83
83
|
range?: never;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -119,6 +119,7 @@ export namespace ForecastWarningPossibility {
|
|
|
119
119
|
};
|
|
120
120
|
subArea?: {
|
|
121
121
|
name: string;
|
|
122
|
+
text?: string;
|
|
122
123
|
base: {
|
|
123
124
|
precipitation: Precipitation<Type>;
|
|
124
125
|
};
|
|
@@ -147,6 +148,7 @@ export namespace ForecastWarningPossibility {
|
|
|
147
148
|
};
|
|
148
149
|
subArea?: {
|
|
149
150
|
name: string;
|
|
151
|
+
text?: string;
|
|
150
152
|
base: {
|
|
151
153
|
depth: SnowfallDepth<'6時間最大降雪量'>;
|
|
152
154
|
};
|
|
@@ -174,7 +176,8 @@ export namespace ForecastWarningPossibility {
|
|
|
174
176
|
}[]
|
|
175
177
|
};
|
|
176
178
|
subArea?: {
|
|
177
|
-
name: string
|
|
179
|
+
name: string
|
|
180
|
+
text?: string;
|
|
178
181
|
base: {
|
|
179
182
|
speed: WindSpeed | WindSpeedRange;
|
|
180
183
|
};
|
|
@@ -203,6 +206,7 @@ export namespace ForecastWarningPossibility {
|
|
|
203
206
|
};
|
|
204
207
|
subArea?: {
|
|
205
208
|
name: string;
|
|
209
|
+
text?: string;
|
|
206
210
|
base: {
|
|
207
211
|
height: WaveHeight | WaveHeightRange | WaveHeightNoValue;
|
|
208
212
|
};
|
|
@@ -252,6 +256,7 @@ export namespace ForecastWarningPossibility {
|
|
|
252
256
|
};
|
|
253
257
|
subArea?: {
|
|
254
258
|
name: string;
|
|
259
|
+
text?: string;
|
|
255
260
|
base: {
|
|
256
261
|
precipitation: Precipitation<'24時間最大雨量'> | PrecipitationRange<'24時間最大雨量'>;
|
|
257
262
|
};
|
|
@@ -280,6 +285,7 @@ export namespace ForecastWarningPossibility {
|
|
|
280
285
|
};
|
|
281
286
|
subArea?: {
|
|
282
287
|
name: string;
|
|
288
|
+
text?: string;
|
|
283
289
|
base: {
|
|
284
290
|
depth: SnowfallDepth<'24時間最大降雪量'> | SnowfallDepthRange<'24時間最大降雪量'>;
|
|
285
291
|
};
|
|
@@ -0,0 +1,129 @@
|
|
|
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.1.0';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface TimeSeriesTimeDefine {
|
|
11
|
+
timeId: string;
|
|
12
|
+
dateTime: string;
|
|
13
|
+
duration: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type PossibilityRankType = `${'大雨' | '土砂災害' | '雪' | '風(風雪)' | '波' | '潮位'}の警報級の可能性`;
|
|
18
|
+
|
|
19
|
+
export type PossibilityRankOfWarning<Type extends PossibilityRankType> = {
|
|
20
|
+
refId: string;
|
|
21
|
+
type: Type;
|
|
22
|
+
value: '中' | '高' | 'なし';
|
|
23
|
+
condition?: never;
|
|
24
|
+
} | {
|
|
25
|
+
refId: string;
|
|
26
|
+
type: Type;
|
|
27
|
+
value: null;
|
|
28
|
+
condition: '値なし';
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface Text {
|
|
32
|
+
text: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface TimeSeriesPropertyPossibilityRankOfWarning<Type extends PossibilityRankType> {
|
|
36
|
+
type: Type;
|
|
37
|
+
possibilityRankOfWarnings: PossibilityRankOfWarning<Type>[];
|
|
38
|
+
texts?: [Text];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type TimeSeriesPropertyRain = TimeSeriesPropertyPossibilityRankOfWarning<'大雨の警報級の可能性'>;
|
|
42
|
+
export type TimeSeriesPropertyLandslide = TimeSeriesPropertyPossibilityRankOfWarning<'土砂災害の警報級の可能性'>;
|
|
43
|
+
export type TimeSeriesPropertySnow = TimeSeriesPropertyPossibilityRankOfWarning<'雪の警報級の可能性'>;
|
|
44
|
+
export type TimeSeriesPropertyWind = TimeSeriesPropertyPossibilityRankOfWarning<'風(風雪)の警報級の可能性'>;
|
|
45
|
+
export type TimeSeriesPropertyWave = TimeSeriesPropertyPossibilityRankOfWarning<'波の警報級の可能性'>;
|
|
46
|
+
export type TimeSeriesPropertyTide = TimeSeriesPropertyPossibilityRankOfWarning<'潮位の警報級の可能性'>;
|
|
47
|
+
|
|
48
|
+
export type TimeSeriesProperty =
|
|
49
|
+
TimeSeriesPropertyRain |
|
|
50
|
+
TimeSeriesPropertyLandslide |
|
|
51
|
+
TimeSeriesPropertySnow |
|
|
52
|
+
TimeSeriesPropertyWind |
|
|
53
|
+
TimeSeriesPropertyWave |
|
|
54
|
+
TimeSeriesPropertyTide;
|
|
55
|
+
|
|
56
|
+
export type TimeSeriesPropertiesRain = [TimeSeriesPropertyRain];
|
|
57
|
+
export type TimeSeriesPropertiesLandslide = [TimeSeriesPropertyLandslide];
|
|
58
|
+
export type TimeSeriesPropertiesSnow = [TimeSeriesPropertySnow];
|
|
59
|
+
export type TimeSeriesPropertiesWind = [TimeSeriesPropertyWind];
|
|
60
|
+
export type TimeSeriesPropertiesWave = [TimeSeriesPropertyWave];
|
|
61
|
+
export type TimeSeriesPropertiesTide = [TimeSeriesPropertyTide];
|
|
62
|
+
|
|
63
|
+
export type TimeSeriesKindProperties =
|
|
64
|
+
TimeSeriesPropertiesRain |
|
|
65
|
+
TimeSeriesPropertiesLandslide |
|
|
66
|
+
TimeSeriesPropertiesSnow |
|
|
67
|
+
TimeSeriesPropertiesWind |
|
|
68
|
+
TimeSeriesPropertiesWave |
|
|
69
|
+
TimeSeriesPropertiesTide;
|
|
70
|
+
|
|
71
|
+
export interface TimeSeriesKind<P extends [TimeSeriesProperty]> {
|
|
72
|
+
properties: P;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type TimeSeriesKinds = [
|
|
76
|
+
TimeSeriesKind<TimeSeriesPropertiesRain>,
|
|
77
|
+
TimeSeriesKind<TimeSeriesPropertiesLandslide>,
|
|
78
|
+
TimeSeriesKind<TimeSeriesPropertiesSnow>,
|
|
79
|
+
TimeSeriesKind<TimeSeriesPropertiesWind>,
|
|
80
|
+
TimeSeriesKind<TimeSeriesPropertiesWave>,
|
|
81
|
+
TimeSeriesKind<TimeSeriesPropertiesTide>
|
|
82
|
+
] | [
|
|
83
|
+
TimeSeriesKind<TimeSeriesPropertiesRain>,
|
|
84
|
+
TimeSeriesKind<TimeSeriesPropertiesLandslide>,
|
|
85
|
+
TimeSeriesKind<TimeSeriesPropertiesSnow>,
|
|
86
|
+
TimeSeriesKind<TimeSeriesPropertiesWind>,
|
|
87
|
+
TimeSeriesKind<TimeSeriesPropertiesWave> |
|
|
88
|
+
TimeSeriesKind<TimeSeriesPropertiesTide>
|
|
89
|
+
] | [
|
|
90
|
+
TimeSeriesKind<TimeSeriesPropertiesRain>,
|
|
91
|
+
TimeSeriesKind<TimeSeriesPropertiesLandslide>,
|
|
92
|
+
TimeSeriesKind<TimeSeriesPropertiesSnow>,
|
|
93
|
+
TimeSeriesKind<TimeSeriesPropertiesWind>
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
export interface TimeSeriesItem extends Components.CodeName {
|
|
97
|
+
kinds: TimeSeriesKinds;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface TimeSeries {
|
|
101
|
+
timeDefines: TimeSeriesTimeDefine[];
|
|
102
|
+
items: TimeSeriesItem[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface Region {
|
|
106
|
+
type: '区域予報';
|
|
107
|
+
timeSeries: [TimeSeries];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface PublicBody {
|
|
111
|
+
region: Region;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface Public extends TelegramJSONMain {
|
|
115
|
+
_schema: Schema;
|
|
116
|
+
type: '早期注意情報(明後日まで)' | string;
|
|
117
|
+
title: string;
|
|
118
|
+
infoType: '発表' | '訂正' | '遅延';
|
|
119
|
+
targetDateTimeDubious: never;
|
|
120
|
+
targetDuration: string;
|
|
121
|
+
validDateTime: never;
|
|
122
|
+
eventId: null;
|
|
123
|
+
serialNo: null;
|
|
124
|
+
infoKind: string;
|
|
125
|
+
body: PublicBody;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type Main = Public;
|
|
129
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ForecastWarningPossibility as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ForecastWarningPossibility as v1_1_0 } from './1.1.0';
|
|
2
|
+
import { ForecastWarningPossibility as v1_0_0 } from './1.0.0';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
v1_1_0 as Latest,
|
|
7
|
+
v1_1_0,
|
|
8
|
+
v1_0_0
|
|
9
|
+
};
|
|
@@ -164,8 +164,8 @@ export namespace TsunamiInformation {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
export interface TsunamiEstimationFirstHeight {
|
|
167
|
-
arrivalTime
|
|
168
|
-
condition
|
|
167
|
+
arrivalTime?: string;
|
|
168
|
+
condition: '早いところでは既に津波到達と推定';
|
|
169
169
|
revise?: '追加' | '更新';
|
|
170
170
|
}
|
|
171
171
|
|