@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.
Files changed (46) hide show
  1. package/README.md +13 -4
  2. package/dist/jschema/earthquake-counts_1.0.0.json +1 -1
  3. package/dist/jschema/earthquake-hypocenter-update_1.0.0.json +1 -1
  4. package/dist/jschema/earthquake-information_1.0.0.json +1 -1
  5. package/dist/jschema/earthquake-information_1.1.0.json +1 -1
  6. package/dist/jschema/eew-information_1.0.0.json +1 -1
  7. package/dist/jschema/tsunami-information_1.0.0.json +1 -1
  8. package/dist/jschema/volcano-information_1.0.0.json +1 -1
  9. package/dist/jschema/weather-early_1.0.0.json +1 -0
  10. package/dist/jschema/weather-impact-society_1.0.0.json +1 -0
  11. package/dist/jschema/weather-information_1.0.0.json +1 -0
  12. package/dist/jschema/weather-landslide_1.0.0.json +1 -0
  13. package/dist/jschema/weather-river-flood_1.0.0.json +1 -0
  14. package/dist/jschema/weather-tornado_1.0.0.json +1 -0
  15. package/dist/jschema/weather-typhoon_1.0.0.json +1 -1
  16. package/dist/jschema/weather-warning_1.0.0.json +1 -0
  17. package/jest.config.ts +202 -0
  18. package/package.json +15 -3
  19. package/test/sample-schema-check.test.ts +54 -0
  20. package/tsconfig.json +2 -1
  21. package/types/component/code-name.ts +4 -0
  22. package/types/index.d.ts +37 -1
  23. package/types/schema/earthquake-counts/1.0.0.d.ts +2 -2
  24. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +1 -1
  25. package/types/schema/earthquake-information/1.0.0.d.ts +14 -20
  26. package/types/schema/earthquake-information/1.1.0.d.ts +15 -21
  27. package/types/schema/earthquake-nankai/1.0.0.d.ts +2 -3
  28. package/types/schema/earthquake-nankai/index.d.ts +1 -1
  29. package/types/schema/eew-information/1.0.0.d.ts +20 -26
  30. package/types/schema/tsunami-information/1.0.0.d.ts +74 -55
  31. package/types/schema/volcano-information/1.0.0.d.ts +21 -20
  32. package/types/schema/weather-early/1.0.0.d.ts +135 -0
  33. package/types/schema/weather-early/index.d.ts +7 -0
  34. package/types/schema/weather-impact-society/1.0.0.d.ts +140 -0
  35. package/types/schema/weather-impact-society/index.d.ts +7 -0
  36. package/types/schema/weather-information/1.0.0.d.ts +30 -0
  37. package/types/schema/weather-information/index.d.ts +7 -0
  38. package/types/schema/weather-landslide/1.0.0.d.ts +51 -0
  39. package/types/schema/weather-landslide/index.d.ts +7 -0
  40. package/types/schema/weather-river-flood/1.0.0.d.ts +192 -0
  41. package/types/schema/weather-river-flood/index.d.ts +7 -0
  42. package/types/schema/weather-tornado/1.0.0.d.ts +51 -0
  43. package/types/schema/weather-tornado/index.d.ts +7 -0
  44. package/types/schema/weather-typhoon/1.0.0.d.ts +24 -13
  45. package/types/schema/weather-warning/1.0.0.d.ts +212 -0
  46. package/types/schema/weather-warning/index.d.ts +7 -0
@@ -0,0 +1,135 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { CodeName } from '@t/component/code-name';
3
+
4
+ export namespace WeatherEarly {
5
+ export interface Schema {
6
+ type: 'weather-early';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface Target extends 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 CodeName {
24
+ }
25
+
26
+
27
+ export interface MainText {
28
+ text: string;
29
+ zones: MainTextZone[];
30
+ }
31
+
32
+ export interface StatisticPeriodDateTime {
33
+ value: string;
34
+ validFormat?: string;
35
+ }
36
+
37
+ export interface StatisticPeriod {
38
+ dateTime: StatisticPeriodDateTime;
39
+ duration: string;
40
+ name: string;
41
+ }
42
+
43
+ export interface StatisticStationObservedValue {
44
+ type: string;
45
+ unit: string;
46
+ value: string | null;
47
+ condition?: string;
48
+ }
49
+
50
+ export interface StatisticStation extends CodeName {
51
+ type: '天候の状況(速報値)';
52
+ observedValues: StatisticStationObservedValue[];
53
+ }
54
+
55
+
56
+ export interface EarlyBaseZone extends CodeName {
57
+ }
58
+
59
+ export interface EarlyBase {
60
+ type: string;
61
+ forecasts: Object;
62
+ zones: EarlyBaseZone[];
63
+ }
64
+
65
+ export interface EarlyHighForecastProbabilityAboveNormal {
66
+ unit: '%';
67
+ value: string;
68
+ bound: '以上';
69
+ }
70
+
71
+ export interface EarlyHighForecastThresholdAboveNormal {
72
+ unit: '%' | '℃';
73
+ value: string;
74
+ bound: '以上';
75
+ }
76
+
77
+ export interface EarlyLowForecastProbabilityBelowNormal {
78
+ unit: '%';
79
+ value: string;
80
+ bound: '以上';
81
+ }
82
+
83
+ export interface EarlyLowForecastThresholdBelowNormal {
84
+ unit: '℃';
85
+ value: string;
86
+ bound: '以下';
87
+ }
88
+
89
+ export interface EarlyHighForecast {
90
+ probabilityAboveNormal: EarlyHighForecastProbabilityAboveNormal;
91
+ thresholdAboveNormal: EarlyHighForecastThresholdAboveNormal;
92
+ }
93
+
94
+ export interface EarlyLowForecast {
95
+ probabilityBelowNormal: EarlyLowForecastProbabilityBelowNormal;
96
+ thresholdBelowNormal: EarlyLowForecastThresholdBelowNormal;
97
+ }
98
+
99
+ export interface EarlyHigh extends EarlyBase {
100
+ type: 'かなりの高温' | '大雪';
101
+ forecasts: EarlyHighForecast;
102
+ }
103
+
104
+ export interface EarlyLow extends EarlyBase {
105
+ type: 'かなりの低温';
106
+ forecasts: EarlyLowForecast;
107
+ }
108
+
109
+ export type Early = EarlyHigh | EarlyLow;
110
+
111
+ export interface PublicBody {
112
+ notice?: string;
113
+ target: Target;
114
+ targetTime: TargetTime;
115
+ mainTexts: [MainText];
116
+ early: Early[];
117
+ }
118
+
119
+
120
+ export interface Public extends TelegramJSONMain {
121
+ _schema: Schema;
122
+ type: '早期天候情報';
123
+ title: string;
124
+ infoType: '発表' | '訂正';
125
+ targetDateTimeDubious: '頃';
126
+ targetDuration: string;
127
+ validDateTime: string;
128
+ eventId: null;
129
+ serialNo: null;
130
+ infoKind: '早期天候情報';
131
+ body: PublicBody;
132
+ }
133
+
134
+ export type Main = Public;
135
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherEarly 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,140 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { CodeName } from '@t/component/code-name';
3
+
4
+ export namespace WeatherImpactSociety {
5
+ export interface Schema {
6
+ type: 'weather-impact-society';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface Target extends 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 CodeName {
24
+ }
25
+
26
+ export interface MainTextPrefecture extends CodeName {
27
+ }
28
+
29
+ export interface MainText {
30
+ text: string;
31
+ zones?: MainTextZone[];
32
+ prefectures?: MainTextPrefecture[];
33
+ }
34
+
35
+ export interface StatisticPeriodDateTime {
36
+ value: string;
37
+ validFormat?: string;
38
+ }
39
+
40
+ export interface StatisticPeriod {
41
+ dateTime: StatisticPeriodDateTime;
42
+ duration: string;
43
+ name: string;
44
+ }
45
+
46
+ export interface StatisticStationObservedValue {
47
+ type: string;
48
+ unit: string;
49
+ value: string | null;
50
+ condition?: string;
51
+ }
52
+
53
+ export interface StatisticStation extends CodeName {
54
+ type: '天候の状況(速報値)';
55
+ observedValues: StatisticStationObservedValue[];
56
+ }
57
+
58
+ export interface Statistic {
59
+ type: '気象官署及び特別地域気象観測所' | 'アメダス';
60
+ period: StatisticPeriod;
61
+ text?: string;
62
+ stations: StatisticStation[];
63
+ }
64
+
65
+ export interface SeasonZoneEventDataDate {
66
+ value: string;
67
+ dubious: '頃';
68
+ }
69
+
70
+ export interface SeasonZoneEventData {
71
+ date?: SeasonZoneEventDataDate;
72
+ normal: SeasonZoneEventDataDate;
73
+ lastYear?: SeasonZoneEventDataDate;
74
+ remark?: string;
75
+ }
76
+
77
+ export interface SeasonZone extends CodeName {
78
+ type: '梅雨入り' | '梅雨明け';
79
+ eventData: SeasonZoneEventData;
80
+ }
81
+
82
+ export interface Season {
83
+ type: '梅雨';
84
+ zones: SeasonZone[];
85
+ }
86
+
87
+ export interface PublicBody {
88
+ notice?: string;
89
+ target: Target;
90
+ targetTime: TargetTime;
91
+ mainTexts: MainText [];
92
+ statistics?: Statistic[];
93
+ comment?: string;
94
+ }
95
+
96
+ export interface PublicBodyZone extends PublicBody {
97
+ mainTexts: Required<Omit<MainText, 'prefectures'>>[];
98
+ }
99
+
100
+ export interface PublicBodyPrefecture extends PublicBody {
101
+ mainTexts: Required<Omit<MainText, 'zones'>>[];
102
+ }
103
+
104
+ export interface PublicBodyZoneSeason extends PublicBodyZone {
105
+ season: Season;
106
+ }
107
+
108
+
109
+ export interface Public extends TelegramJSONMain {
110
+ _schema: Schema;
111
+ type: '全般天候情報' | '地方天候情報' | '府県天候情報';
112
+ title: string;
113
+ infoType: '発表' | '訂正' | '取消';
114
+ targetDateTimeDubious: never;
115
+ targetDuration: never;
116
+ validDateTime: string;
117
+ eventId: string;
118
+ serialNo: string;
119
+ infoKind: '天候情報';
120
+ body: PublicBody;
121
+ }
122
+
123
+ export interface PublicZone extends Public {
124
+ type: '全般天候情報' | '地方天候情報';
125
+ body: PublicBodyZone;
126
+ }
127
+
128
+ export interface PublicPrefecture extends Public {
129
+ type: '府県天候情報';
130
+ body: PublicBodyPrefecture;
131
+ }
132
+
133
+ export interface PublicZoneSeason extends PublicZone {
134
+ type: '地方天候情報';
135
+ validDateTime: never;
136
+ body: PublicBodyZoneSeason;
137
+ }
138
+
139
+ export type Main = PublicZone | PublicPrefecture | PublicZoneSeason;
140
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherImpactSociety 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,30 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+
3
+ export namespace WeatherInformation {
4
+ export interface Schema {
5
+ type: 'weather-information';
6
+ version: '1.0.0';
7
+ }
8
+
9
+ export interface PublicBody {
10
+ target: never;
11
+ notice: string | null;
12
+ comment: string;
13
+ }
14
+
15
+ export interface PublicEvent extends TelegramJSONMain {
16
+ _schema: Schema;
17
+ type: '全般台風情報' | '全般台風情報(定型)' | '全般台風情報(詳細)' | '全般スモッグ気象情報' | 'スモッグ気象情報' | '地方高温注意情報' | '府県高温注意情報' | '熱中症警戒アラート' | '全般潮位情報' | '地方潮位情報' | '府県潮位情報' | '全般気象情報' | '地方気象情報' | '府県気象情報';
18
+ title: string;
19
+ infoType: '発表' | '訂正' | '取消';
20
+ targetDateTimeDubious: never;
21
+ targetDuration: never;
22
+ validDateTime: never;
23
+ eventId: string;
24
+ serialNo: string | null;
25
+ infoKind: '同一現象用平文情報';
26
+ body: PublicBody;
27
+ }
28
+
29
+ export type Main = PublicEvent;
30
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherInformation 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,51 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { CodeName } from '@t/component/code-name';
3
+
4
+ export namespace WeatherLandslide {
5
+ export interface Schema {
6
+ type: 'weather-landslide';
7
+ version: '1.0.0';
8
+ }
9
+
10
+
11
+ export interface Target extends CodeName {
12
+ }
13
+
14
+ export interface CityKind extends CodeName {
15
+ code: '3' | '1' | '0';
16
+ name: '警戒' | '解除' | 'なし';
17
+ status: '発表' | '継続' | '解除' | 'なし';
18
+ }
19
+
20
+ export interface City extends CodeName {
21
+ kinds: [CityKind];
22
+ }
23
+
24
+ export interface Office {
25
+ type: '都道府県' | '気象庁';
26
+ name: string;
27
+ contact: string;
28
+ }
29
+
30
+ export interface PublicBody {
31
+ target: Target;
32
+ cities: City[];
33
+ offices: Office[];
34
+ }
35
+
36
+ export interface PublicEvent extends TelegramJSONMain {
37
+ _schema: Schema;
38
+ type: '土砂災害警戒情報';
39
+ title: string;
40
+ infoType: '発表';
41
+ targetDateTimeDubious: never;
42
+ targetDuration: never;
43
+ validDateTime: never;
44
+ eventId: string;
45
+ serialNo: string;
46
+ infoKind: '土砂災害警戒情報';
47
+ body: PublicBody;
48
+ }
49
+
50
+ export type Main = PublicEvent;
51
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherLandslide 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,192 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { CodeName } from '@t/component/code-name';
3
+
4
+ export namespace WeatherRiverFlood {
5
+ export interface Schema {
6
+ type: 'weather-river-flood';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface TargetKind extends CodeName {
11
+ condition: string;
12
+ }
13
+
14
+ export interface Target extends CodeName {
15
+ kind: TargetKind;
16
+ }
17
+
18
+ export interface MainTextRiver extends CodeName {
19
+ }
20
+
21
+ export interface MainTextStation extends CodeName {
22
+ location: string;
23
+ }
24
+
25
+ export interface MainText {
26
+ text: string | null;
27
+ rivers: MainTextRiver[];
28
+ stations: MainTextStation[];
29
+ }
30
+
31
+ export interface SuppositionKind extends CodeName {
32
+ }
33
+
34
+ export interface SuppositionDistrictPrefecture {
35
+ code: string | null;
36
+ name: string | null;
37
+ }
38
+
39
+ export interface SuppositionDistrictCity {
40
+ code: string | null;
41
+ name: string | null;
42
+ }
43
+
44
+ export interface SuppositionDistrict {
45
+ code?: string;
46
+ name: string;
47
+ prefecture: SuppositionDistrictPrefecture;
48
+ city: SuppositionDistrictCity;
49
+ district: string | null;
50
+ }
51
+
52
+ export interface Supposition {
53
+ type: '浸水想定地区' | '浸水想定地区(氾濫発生情報)';
54
+ description: string;
55
+ kind: SuppositionKind;
56
+ districts: SuppositionDistrict[];
57
+ }
58
+
59
+ export interface RainfallTimeSeriesTimeDefine {
60
+ timeId: string;
61
+ dateTime: string;
62
+ duration: string;
63
+ name: string;
64
+ }
65
+
66
+ export interface RainfallTimeSeriesItemForecast {
67
+ refId: string;
68
+ unit: string;
69
+ value: string | null;
70
+ }
71
+
72
+ export interface RainfallTimeSeriesItem {
73
+ name: string;
74
+ forecasts: RainfallTimeSeriesItemForecast [];
75
+ }
76
+
77
+ export interface RainfallTimeSeries {
78
+ timeDefines: RainfallTimeSeriesTimeDefine[];
79
+ items: RainfallTimeSeriesItem[];
80
+ }
81
+
82
+ export interface Rainfall {
83
+ dateTime: string;
84
+ text: string;
85
+ timeSeries: RainfallTimeSeries[];
86
+ }
87
+
88
+ export interface WaterLevelTimeSeriesTimeDefine {
89
+ timeId: string;
90
+ dateTime: string;
91
+ name: string;
92
+ }
93
+
94
+ export interface WaterLevelTimeSeriesItemForecast {
95
+ refId: string;
96
+ unit: string;
97
+ value: string | null;
98
+ level: string | null;
99
+ condition?: string;
100
+ }
101
+
102
+ export interface WaterLevelTimeSeriesItem extends CodeName {
103
+ location: string;
104
+ type: '水位' | '流量';
105
+ forecasts: WaterLevelTimeSeriesItemForecast [];
106
+ }
107
+
108
+ export interface WaterLevelTimeSeries {
109
+ timeDefines: WaterLevelTimeSeriesTimeDefine[];
110
+ items: WaterLevelTimeSeriesItem[];
111
+ }
112
+
113
+ export interface WaterLevel {
114
+ timeSeries: WaterLevelTimeSeries[];
115
+ }
116
+
117
+ export interface FloodedWaterAssumptionsAttainmentTime {
118
+ value: string;
119
+ dubious: '頃';
120
+ }
121
+
122
+ export interface FloodedWaterAssumptionsAttainmentDeepestTime {
123
+ value: string;
124
+ dubious: '頃';
125
+ }
126
+
127
+ export interface FloodedWaterAssumptionsFloodDepth {
128
+ from: string | null;
129
+ to: string | null;
130
+ }
131
+
132
+ export interface FloodedWaterAssumptions {
133
+ district: string | null;
134
+ attainmentTime: FloodedWaterAssumptionsAttainmentTime;
135
+ attainmentDeepestTime: FloodedWaterAssumptionsAttainmentDeepestTime;
136
+ floodDepth: FloodedWaterAssumptionsFloodDepth;
137
+ }
138
+
139
+ export interface FloodedWater extends CodeName {
140
+ dateTime: string;
141
+ text: string;
142
+ assumptions: FloodedWaterAssumptions[];
143
+ }
144
+
145
+ export interface Office extends CodeName {
146
+ type: '水位関係' | '気象関係';
147
+ contact: string;
148
+ url: string;
149
+ }
150
+
151
+ export interface ReferenceCriterion {
152
+ type: string;
153
+ unit: string;
154
+ value: string | null;
155
+ condition: '有効' | '無効';
156
+ }
157
+
158
+ export interface Reference extends CodeName {
159
+ location: string;
160
+ district: string | null;
161
+ sections: string[];
162
+ criteria: ReferenceCriterion[];
163
+ }
164
+
165
+ export interface PublicBody {
166
+ notice?: string;
167
+ target: Target;
168
+ mainTexts?: MainText[];
169
+ supposition?: Supposition;
170
+ rainfall?: Rainfall;
171
+ waterLevel?: WaterLevel;
172
+ floodedWaters?: FloodedWater[];
173
+ offices?: Office[];
174
+ reference?: Reference[];
175
+ }
176
+
177
+ export interface Public extends TelegramJSONMain {
178
+ _schema: Schema;
179
+ type: '指定河川洪水予報';
180
+ title: string;
181
+ infoType: '発表' | '訂正' | '取消';
182
+ targetDateTimeDubious: never;
183
+ targetDuration: never;
184
+ validDateTime: never;
185
+ eventId: string;
186
+ serialNo: string;
187
+ infoKind: '指定河川洪水予報';
188
+ body: PublicBody;
189
+ }
190
+
191
+ export type Main = Public;
192
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherRiverFlood 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,51 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { CodeName } from '@t/component/code-name';
3
+
4
+ export namespace WeatherTornado {
5
+ export interface Schema {
6
+ type: 'weather-tornado';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface Witness extends CodeName {
11
+ }
12
+
13
+ export interface TargetKind extends CodeName {
14
+ code: '1' | '0';
15
+ name: '竜巻注意情報' | 'なし';
16
+ status: '発表' | 'なし';
17
+ }
18
+
19
+ export interface Target extends CodeName {
20
+ kinds: [TargetKind];
21
+ }
22
+
23
+ export interface Region extends Target {
24
+ }
25
+
26
+ export interface City extends Target {
27
+ }
28
+
29
+ export interface PublicBody {
30
+ witnesses?: Witness[];
31
+ targets: Target[];
32
+ regions: Region[];
33
+ cities: City[];
34
+ }
35
+
36
+ export interface PublicEvent extends TelegramJSONMain {
37
+ _schema: Schema;
38
+ type: '竜巻注意情報(目撃情報付き)';
39
+ title: string;
40
+ infoType: '発表' | '訂正';
41
+ targetDateTimeDubious: never;
42
+ targetDuration: never;
43
+ validDateTime: string;
44
+ eventId: null;
45
+ serialNo: string;
46
+ infoKind: '竜巻注意情報';
47
+ body: PublicBody;
48
+ }
49
+
50
+ export type Main = PublicEvent;
51
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherTornado as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };