@dmdata/telegram-json-types 1.0.9-jschema.1 → 1.1.1

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 (62) hide show
  1. package/README.md +19 -5
  2. package/dist/build.js +9 -4
  3. package/dist/config.d.ts +2 -1
  4. package/dist/config.js +3 -2
  5. package/dist/jschema/earthquake-counts_1.0.0.json +1 -0
  6. package/dist/jschema/earthquake-explanation_1.0.0.json +1 -0
  7. package/dist/jschema/earthquake-hypocenter-update_1.0.0.json +1 -0
  8. package/dist/jschema/earthquake-information_1.0.0.json +1 -1
  9. package/dist/jschema/earthquake-information_1.1.0.json +1 -1
  10. package/dist/jschema/earthquake-nankai_1.0.0.json +1 -0
  11. package/dist/jschema/eew-information_1.0.0.json +1 -1
  12. package/dist/jschema/tsunami-information_1.0.0.json +1 -1
  13. package/dist/jschema/volcano-information_1.0.0.json +1 -0
  14. package/dist/jschema/weather-early_1.0.0.json +1 -0
  15. package/dist/jschema/weather-impact-society_1.0.0.json +1 -0
  16. package/dist/jschema/weather-information_1.0.0.json +1 -0
  17. package/dist/jschema/weather-landslide_1.0.0.json +1 -0
  18. package/dist/jschema/weather-river-flood_1.0.0.json +1 -0
  19. package/dist/jschema/weather-tornado_1.0.0.json +1 -0
  20. package/dist/jschema/weather-typhoon_1.0.0.json +1 -1
  21. package/dist/jschema/weather-warning_1.0.0.json +1 -0
  22. package/jest.config.ts +202 -0
  23. package/package.json +33 -21
  24. package/test/sample-schema-check.test.ts +54 -0
  25. package/tsconfig.json +28 -15
  26. package/types/component/code-name.ts +4 -0
  27. package/types/component/coordinate.d.ts +2 -2
  28. package/types/component/unit-value.d.ts +13 -13
  29. package/types/index.d.ts +48 -2
  30. package/types/schema/earthquake-counts/1.0.0.d.ts +69 -0
  31. package/types/schema/earthquake-counts/index.d.ts +7 -0
  32. package/types/schema/earthquake-explanation/1.0.0.d.ts +57 -0
  33. package/types/schema/earthquake-explanation/index.d.ts +7 -0
  34. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +53 -0
  35. package/types/schema/earthquake-hypocenter-update/index.d.ts +7 -0
  36. package/types/schema/earthquake-information/1.0.0.d.ts +59 -35
  37. package/types/schema/earthquake-information/1.1.0.d.ts +66 -39
  38. package/types/schema/earthquake-information/index.d.ts +0 -2
  39. package/types/schema/earthquake-nankai/1.0.0.d.ts +86 -0
  40. package/types/schema/earthquake-nankai/index.d.ts +7 -0
  41. package/types/schema/eew-information/1.0.0.d.ts +42 -39
  42. package/types/schema/eew-information/index.d.ts +0 -2
  43. package/types/schema/tsunami-information/1.0.0.d.ts +99 -67
  44. package/types/schema/tsunami-information/index.d.ts +0 -2
  45. package/types/schema/volcano-information/1.0.0.d.ts +450 -0
  46. package/types/schema/volcano-information/index.d.ts +7 -0
  47. package/types/schema/weather-early/1.0.0.d.ts +135 -0
  48. package/types/schema/weather-early/index.d.ts +7 -0
  49. package/types/schema/weather-impact-society/1.0.0.d.ts +140 -0
  50. package/types/schema/weather-impact-society/index.d.ts +7 -0
  51. package/types/schema/weather-information/1.0.0.d.ts +30 -0
  52. package/types/schema/weather-information/index.d.ts +7 -0
  53. package/types/schema/weather-landslide/1.0.0.d.ts +51 -0
  54. package/types/schema/weather-landslide/index.d.ts +7 -0
  55. package/types/schema/weather-river-flood/1.0.0.d.ts +188 -0
  56. package/types/schema/weather-river-flood/index.d.ts +7 -0
  57. package/types/schema/weather-tornado/1.0.0.d.ts +51 -0
  58. package/types/schema/weather-tornado/index.d.ts +7 -0
  59. package/types/schema/weather-typhoon/1.0.0.d.ts +26 -13
  60. package/types/schema/weather-typhoon/index.d.ts +0 -2
  61. package/types/schema/weather-warning/1.0.0.d.ts +212 -0
  62. package/types/schema/weather-warning/index.d.ts +7 -0
@@ -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
+ }
@@ -0,0 +1,7 @@
1
+ import { WeatherWarning as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };