@dmdata/telegram-json-types 1.2.1 → 1.2.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 (51) hide show
  1. package/.github/workflows/release.yml +33 -0
  2. package/LICENSE +21 -21
  3. package/README.md +79 -79
  4. package/dist/jschema/forecast-weathermap_1.0.0.json +1 -1
  5. package/dist/jschema/weather-warning-timeseries_1.0.0.json +1 -1
  6. package/index.d.ts +2 -2
  7. package/package.json +30 -32
  8. package/test/sample-schema-check.test.ts +68 -68
  9. package/tsconfig.json +25 -25
  10. package/types/component/coordinate.d.ts +27 -27
  11. package/types/component/earthquake.d.ts +77 -77
  12. package/types/component/index.d.ts +17 -17
  13. package/types/component/unit-value.d.ts +13 -13
  14. package/types/component/util.d.ts +20 -20
  15. package/types/index.d.ts +84 -84
  16. package/types/schema/earthquake-counts/1.0.0.d.ts +69 -69
  17. package/types/schema/earthquake-explanation/1.0.0.d.ts +57 -57
  18. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +53 -53
  19. package/types/schema/earthquake-information/1.0.0.d.ts +158 -158
  20. package/types/schema/earthquake-information/1.1.0.d.ts +224 -224
  21. package/types/schema/earthquake-information/index.d.ts +9 -9
  22. package/types/schema/earthquake-nankai/1.0.0.d.ts +101 -101
  23. package/types/schema/eew-information/1.0.0.d.ts +221 -221
  24. package/types/schema/eew-information/index.d.ts +7 -7
  25. package/types/schema/forecast-2week-temperature/1.0.0.d.ts +110 -110
  26. package/types/schema/forecast-prefecture/1.0.0.d.ts +537 -537
  27. package/types/schema/forecast-season/1.0.0.d.ts +169 -169
  28. package/types/schema/forecast-warning-possibility/1.0.0.d.ts +388 -388
  29. package/types/schema/forecast-warning-possibility/1.1.0.d.ts +129 -129
  30. package/types/schema/forecast-warning-possibility/index.d.ts +9 -9
  31. package/types/schema/forecast-weathermap/1.0.0.d.ts +206 -194
  32. package/types/schema/tsunami-information/1.0.0.d.ts +261 -261
  33. package/types/schema/tsunami-information/1.1.0.d.ts +298 -298
  34. package/types/schema/tsunami-information/index.d.ts +9 -9
  35. package/types/schema/volcano-information/1.0.0.d.ts +450 -450
  36. package/types/schema/weather-commentary/1.0.0.d.ts +984 -984
  37. package/types/schema/weather-commentary/index.d.ts +7 -7
  38. package/types/schema/weather-early/1.0.0.d.ts +111 -111
  39. package/types/schema/weather-impact-society/1.0.0.d.ts +143 -143
  40. package/types/schema/weather-impact-society/1.0.1.d.ts +118 -118
  41. package/types/schema/weather-information/1.0.0.d.ts +67 -67
  42. package/types/schema/weather-landslide/1.0.0.d.ts +51 -51
  43. package/types/schema/weather-river-flood/1.0.0.d.ts +192 -192
  44. package/types/schema/weather-tornado/1.0.0.d.ts +55 -55
  45. package/types/schema/weather-typhoon/1.0.0.d.ts +146 -146
  46. package/types/schema/weather-typhoon/index.d.ts +7 -7
  47. package/types/schema/weather-warning/1.0.0.d.ts +213 -213
  48. package/types/schema/weather-warning/1.1.0.d.ts +469 -469
  49. package/types/schema/weather-warning/index.d.ts +9 -9
  50. package/types/schema/weather-warning-timeseries/1.0.0.d.ts +357 -385
  51. package/types/schema/weather-warning-timeseries/index.d.ts +7 -7
@@ -1,146 +1,146 @@
1
- import { TelegramJSONMain } from '../../main';
2
- import { Components } from '../../component';
3
-
4
- export namespace WeatherTyphoon {
5
- export interface Schema {
6
- type: 'weather-typhoon';
7
- version: '1.0.0';
8
- }
9
-
10
- export interface Direction {
11
- type: string;
12
- unit: string;
13
- value: string | null;
14
- azimuth: string | null;
15
- condition?: string;
16
- }
17
-
18
- export interface Axis {
19
- direction: Direction;
20
- radius: Components.UnitValueNotNull;
21
- }
22
-
23
- export interface RealStateClassification {
24
- category: 'TD' | 'TY' | 'TS' | 'STS' | 'Hurricane' | 'Tropical Storm' | 'LOW' | null;
25
- name: '熱帯低気圧' | '台風' | 'ハリケーン' | '発達した熱帯低気圧' | '温帯低気圧' | null;
26
- area: '大型' | '超大型' | null;
27
- intensity: '強い' | '非常に強い' | '猛烈な' | null;
28
- }
29
-
30
- export type ForecastClassification = Omit<RealStateClassification, 'area'>;
31
-
32
- export type RealStateCenterSpeed = {
33
- type: '移動速度';
34
- unit: 'km/h';
35
- } & ({
36
- value: string;
37
- condition?: never;
38
- } | {
39
- value: null;
40
- condition: 'ゆっくり' | 'ほとんど停滞';
41
- });
42
-
43
- export interface Coordinate {
44
- latitude: {
45
- text: string;
46
- value: string;
47
- };
48
- longitude: {
49
- text: string;
50
- value: string;
51
- };
52
- condition?: '正確' | 'ほぼ正確' | '不確実';
53
- }
54
-
55
- export interface RealStateCenter {
56
- coordinate: Coordinate;
57
- location: string | null;
58
- direction: Direction;
59
- speed: RealStateCenterSpeed;
60
- pressure: Components.UnitValueNotNull<'中心気圧', 'hPa'>;
61
- }
62
-
63
- export type ForecastCenter = {
64
- probabilityCircle: {
65
- basePoint: Components.Coordinate;
66
- axes: Axis[];
67
- };
68
- } & Omit<RealStateCenter, 'coordinate'>;
69
-
70
- export interface RealStateWindArea {
71
- strong: Axis[];
72
- storm: Axis[];
73
- }
74
-
75
- export interface RealStateWind {
76
- average: Components.UnitValueNotNull<'最大風速', 'm/s', '中心付近' | '中心付近を除く' | 'なし' | never>;
77
- instantaneous: Components.UnitValueNotNull<'最大瞬間風速', 'm/s'>;
78
- area?: RealStateWindArea;
79
- }
80
-
81
- export interface ForecastWindArea {
82
- stormWarning: Axis[];
83
- }
84
-
85
- export interface ForecastWind {
86
- average: Components.UnitValueNotNull<'最大風速', 'm/s', '中心付近' | '中心付近を除く' | 'なし' | never>;
87
- instantaneous: Components.UnitValueNotNull<'最大瞬間風速', 'm/s'>;
88
- area?: ForecastWindArea;
89
- }
90
-
91
- export interface RealState {
92
- type: '実況' | '推定';
93
- elapsedTime: 'PT0H' | 'PT1H';
94
- dateTime: string;
95
- classification: RealStateClassification;
96
- center: RealStateCenter;
97
- wind?: RealStateWind;
98
- }
99
-
100
- interface Forecast {
101
- type: '予報' | '延長予報';
102
- elapsedTime: string;
103
- dateTime: string;
104
- classification: ForecastClassification;
105
- center: ForecastCenter;
106
- wind: ForecastWind;
107
- }
108
-
109
- export interface TyphoonName {
110
- text: string | null;
111
- kana: string | null;
112
- number: string | null;
113
- }
114
-
115
- export type TyphoonRemark = '台風発生' | '台風発生(域外から入る)' | '台風消滅(域外へ出る)' | '台風消滅(温帯低気圧化)' | '台風消滅(熱帯低気圧化)' |
116
- '台風発生の可能性が小さくなった' | '発表間隔変更(毎時から3時間毎)' | '発表間隔変更(3時間毎から毎時)' | '台風発生予想' | '温帯低気圧化しつつある' | null;
117
-
118
- export interface Typhoon {
119
- tcNumber: string;
120
- name: TyphoonName;
121
- remark: TyphoonRemark;
122
- }
123
-
124
- export interface PublicBody {
125
- typhoon: Typhoon;
126
- forecasts: [RealState] | [RealState, ...Forecast[]] | [RealState, RealState] | [RealState, RealState, ...Forecast[]];
127
- }
128
-
129
- export interface Public extends TelegramJSONMain {
130
- _schema: Schema;
131
- type: '台風解析・予報情報(5日予報)(H30)' | '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
132
- title: '台風解析・予報情報';
133
- targetDateTimeDubious?: never;
134
- targetDuration: string;
135
- validDateTime?: never;
136
- infoKind: '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
137
- eventId: string;
138
- serialNo: string;
139
- infoType: '発表' | '訂正' | '取消';
140
- headline: null;
141
- body: PublicBody;
142
- }
143
-
144
-
145
- export type Main = Public;
146
- }
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
+
4
+ export namespace WeatherTyphoon {
5
+ export interface Schema {
6
+ type: 'weather-typhoon';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface Direction {
11
+ type: string;
12
+ unit: string;
13
+ value: string | null;
14
+ azimuth: string | null;
15
+ condition?: string;
16
+ }
17
+
18
+ export interface Axis {
19
+ direction: Direction;
20
+ radius: Components.UnitValueNotNull;
21
+ }
22
+
23
+ export interface RealStateClassification {
24
+ category: 'TD' | 'TY' | 'TS' | 'STS' | 'Hurricane' | 'Tropical Storm' | 'LOW' | null;
25
+ name: '熱帯低気圧' | '台風' | 'ハリケーン' | '発達した熱帯低気圧' | '温帯低気圧' | null;
26
+ area: '大型' | '超大型' | null;
27
+ intensity: '強い' | '非常に強い' | '猛烈な' | null;
28
+ }
29
+
30
+ export type ForecastClassification = Omit<RealStateClassification, 'area'>;
31
+
32
+ export type RealStateCenterSpeed = {
33
+ type: '移動速度';
34
+ unit: 'km/h';
35
+ } & ({
36
+ value: string;
37
+ condition?: never;
38
+ } | {
39
+ value: null;
40
+ condition: 'ゆっくり' | 'ほとんど停滞';
41
+ });
42
+
43
+ export interface Coordinate {
44
+ latitude: {
45
+ text: string;
46
+ value: string;
47
+ };
48
+ longitude: {
49
+ text: string;
50
+ value: string;
51
+ };
52
+ condition?: '正確' | 'ほぼ正確' | '不確実';
53
+ }
54
+
55
+ export interface RealStateCenter {
56
+ coordinate: Coordinate;
57
+ location: string | null;
58
+ direction: Direction;
59
+ speed: RealStateCenterSpeed;
60
+ pressure: Components.UnitValueNotNull<'中心気圧', 'hPa'>;
61
+ }
62
+
63
+ export type ForecastCenter = {
64
+ probabilityCircle: {
65
+ basePoint: Components.Coordinate;
66
+ axes: Axis[];
67
+ };
68
+ } & Omit<RealStateCenter, 'coordinate'>;
69
+
70
+ export interface RealStateWindArea {
71
+ strong: Axis[];
72
+ storm: Axis[];
73
+ }
74
+
75
+ export interface RealStateWind {
76
+ average: Components.UnitValueNotNull<'最大風速', 'm/s', '中心付近' | '中心付近を除く' | 'なし' | never>;
77
+ instantaneous: Components.UnitValueNotNull<'最大瞬間風速', 'm/s'>;
78
+ area?: RealStateWindArea;
79
+ }
80
+
81
+ export interface ForecastWindArea {
82
+ stormWarning: Axis[];
83
+ }
84
+
85
+ export interface ForecastWind {
86
+ average: Components.UnitValueNotNull<'最大風速', 'm/s', '中心付近' | '中心付近を除く' | 'なし' | never>;
87
+ instantaneous: Components.UnitValueNotNull<'最大瞬間風速', 'm/s'>;
88
+ area?: ForecastWindArea;
89
+ }
90
+
91
+ export interface RealState {
92
+ type: '実況' | '推定';
93
+ elapsedTime: 'PT0H' | 'PT1H';
94
+ dateTime: string;
95
+ classification: RealStateClassification;
96
+ center: RealStateCenter;
97
+ wind?: RealStateWind;
98
+ }
99
+
100
+ interface Forecast {
101
+ type: '予報' | '延長予報';
102
+ elapsedTime: string;
103
+ dateTime: string;
104
+ classification: ForecastClassification;
105
+ center: ForecastCenter;
106
+ wind: ForecastWind;
107
+ }
108
+
109
+ export interface TyphoonName {
110
+ text: string | null;
111
+ kana: string | null;
112
+ number: string | null;
113
+ }
114
+
115
+ export type TyphoonRemark = '台風発生' | '台風発生(域外から入る)' | '台風消滅(域外へ出る)' | '台風消滅(温帯低気圧化)' | '台風消滅(熱帯低気圧化)' |
116
+ '台風発生の可能性が小さくなった' | '発表間隔変更(毎時から3時間毎)' | '発表間隔変更(3時間毎から毎時)' | '台風発生予想' | '温帯低気圧化しつつある' | null;
117
+
118
+ export interface Typhoon {
119
+ tcNumber: string;
120
+ name: TyphoonName;
121
+ remark: TyphoonRemark;
122
+ }
123
+
124
+ export interface PublicBody {
125
+ typhoon: Typhoon;
126
+ forecasts: [RealState] | [RealState, ...Forecast[]] | [RealState, RealState] | [RealState, RealState, ...Forecast[]];
127
+ }
128
+
129
+ export interface Public extends TelegramJSONMain {
130
+ _schema: Schema;
131
+ type: '台風解析・予報情報(5日予報)(H30)' | '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
132
+ title: '台風解析・予報情報';
133
+ targetDateTimeDubious?: never;
134
+ targetDuration: string;
135
+ validDateTime?: never;
136
+ infoKind: '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
137
+ eventId: string;
138
+ serialNo: string;
139
+ infoType: '発表' | '訂正' | '取消';
140
+ headline: null;
141
+ body: PublicBody;
142
+ }
143
+
144
+
145
+ export type Main = Public;
146
+ }
@@ -1,7 +1,7 @@
1
- import { WeatherTyphoon as v1_0_0 } from './1.0.0';
2
-
3
-
4
- export {
5
- v1_0_0 as Latest,
6
- v1_0_0
7
- };
1
+ import { WeatherTyphoon as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };