@dmdata/telegram-json-types 1.0.8 → 1.0.9-jschema.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.
@@ -1,117 +1,122 @@
1
- import { TelegramJSONMain } from '../main';
2
- import { Coordinate } from './component/coordinate';
3
- import { UnitValue, UnitValueNotNull } from './component/unit-value';
4
-
5
- export namespace WeatherTyphoon {
6
- export interface Schema {
7
- type: 'weather-typhoon';
8
- version: '1.0.0';
9
- }
10
-
11
- export type Direction = {
12
- type: string;
13
- unit: string;
14
- value: string;
15
- azimuth: string;
16
- } | {
17
- type: string;
18
- unit: string;
19
- value: null;
20
- azimuth: null;
21
- condition: string;
22
- };
23
-
24
- export type Axis = {
25
- direction: Direction;
26
- radius: UnitValue;
27
- }
28
-
29
- export type RealStateClassification = {
30
- category: 'TD' | 'TY' | 'STS' | 'Hurricane' | 'Tropical Storm' | 'LOW' | null;
31
- name: '熱帯低気圧' | '台風' | 'ハリケーン' | '発達した熱帯低気圧' | '温帯低気圧' | null;
32
- area: '大型' | '超大型' | null;
33
- intensity: '強い' | '非常に強い' | '猛烈な' | null;
34
- };
35
- export type ForecastClassification = Omit<RealStateClassification, 'area'>;
36
-
37
- export type RealStateCenter = {
38
- coordinate: Coordinate;
39
- location: string;
40
- direction: Direction;
41
- speed: UnitValue;
42
- pressure: UnitValueNotNull;
43
- };
44
- export type ForecastCenter = {
45
- probabilityCircle: {
46
- basePoint: Coordinate;
47
- axes: Axis[];
48
- };
49
- } & Omit<RealStateCenter, 'location'>;
50
-
51
- export type RealStateWindArea = {
52
- strong: Axis[];
53
- storm: Axis[];
54
- };
55
- export type RealStateWind = {
56
- average: UnitValue;
57
- instantaneous: UnitValue;
58
- area: RealStateWindArea;
59
- };
60
- export type ForecastWindArea = {
61
- stormWarning: Axis[];
62
- };
63
- export type ForecastWind = {
64
- average: UnitValue;
65
- instantaneous: UnitValue;
66
- area: ForecastWindArea;
67
- }
68
-
69
- interface RealState {
70
- type: '実況' | '推定';
71
- elapsedTime: 'PT0H' | 'PT1H';
72
- dateTime: string;
73
- classification: RealStateClassification;
74
- center: RealStateCenter;
75
- wind?:RealStateWind;
76
- }
77
-
78
- interface Forecast {
79
- type: '予報' | '延長予報';
80
- elapsedTime: string;
81
- dateTime: string;
82
- classification: ForecastClassification;
83
- center: ForecastCenter;
84
- wind: ForecastWind;
85
- }
86
-
87
- export interface PublicBody {
88
- typhoon: {
89
- tcNumber: string;
90
- name: {
91
- text: string | null;
92
- kana: string | null;
93
- number: string | null;
94
- };
95
- remark: '台風発生' | '台風発生(域外から入る)' | '台風消滅(域外へ出る)' | '台風消滅(温帯低気圧化)' | '台風消滅(熱帯低気圧化)' |
96
- '台風発生の可能性が小さくなった' | '発表間隔変更(毎時から3時間毎)' | '発表間隔変更(3時間毎から毎時)' | '台風発生予想' | '温帯低気圧化しつつある' | null;
97
- };
98
- forecasts: [RealState] | [RealState, ...Forecast[]] | [RealState, RealState] | [RealState, RealState, ...Forecast[]];
99
- }
100
-
101
- export interface Public extends TelegramJSONMain {
102
- _schema: Schema;
103
- type: '台風解析・予報情報(5日予報)(H30)' | '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
104
- title: '台風解析・予報情報';
105
- targetDuration: string;
106
- infoKind: '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
107
- eventId: string;
108
- serialNo: string;
109
- infoType: '発表' | '訂正' | '取消';
110
- headline: null;
111
- body: PublicBody;
112
- }
113
-
114
-
115
- export type Main = Public;
116
-
117
- }
1
+ import { TelegramJSONMain } from '../main';
2
+ import { Coordinate } from './component/coordinate';
3
+ import { UnitValue, UnitValueNotNull } from './component/unit-value';
4
+
5
+ export namespace WeatherTyphoon {
6
+ export interface Schema {
7
+ type: 'weather-typhoon';
8
+ version: '1.0.0';
9
+ }
10
+
11
+ export interface Direction {
12
+ type: string;
13
+ unit: string;
14
+ value: string | null;
15
+ azimuth: string | null;
16
+ condition?: string;
17
+ }
18
+
19
+ export interface Axis {
20
+ direction: Direction;
21
+ radius: UnitValue;
22
+ }
23
+
24
+ export interface RealStateClassification {
25
+ category: 'TD' | 'TY' | 'STS' | 'Hurricane' | 'Tropical Storm' | 'LOW' | null;
26
+ name: '熱帯低気圧' | '台風' | 'ハリケーン' | '発達した熱帯低気圧' | '温帯低気圧' | null;
27
+ area: '大型' | '超大型' | null;
28
+ intensity: '強い' | '非常に強い' | '猛烈な' | null;
29
+ }
30
+
31
+ export type ForecastClassification = Omit<RealStateClassification, 'area'>;
32
+
33
+ export interface RealStateCenter {
34
+ coordinate: Coordinate;
35
+ location: string;
36
+ direction: Direction;
37
+ speed: UnitValue;
38
+ pressure: UnitValueNotNull;
39
+ }
40
+
41
+ export type ForecastCenter = {
42
+ probabilityCircle: {
43
+ basePoint: Coordinate;
44
+ axes: Axis[];
45
+ };
46
+ } & Omit<RealStateCenter, 'location'>;
47
+
48
+ export interface RealStateWindArea {
49
+ strong: Axis[];
50
+ storm: Axis[];
51
+ }
52
+
53
+ export interface RealStateWind {
54
+ average: UnitValue;
55
+ instantaneous: UnitValue;
56
+ area: RealStateWindArea;
57
+ }
58
+
59
+ export interface ForecastWindArea {
60
+ stormWarning: Axis[];
61
+ }
62
+
63
+ export interface ForecastWind {
64
+ average: UnitValue;
65
+ instantaneous: UnitValue;
66
+ area: ForecastWindArea;
67
+ }
68
+
69
+ export interface RealState {
70
+ type: '実況' | '推定';
71
+ elapsedTime: 'PT0H' | 'PT1H';
72
+ dateTime: string;
73
+ classification: RealStateClassification;
74
+ center: RealStateCenter;
75
+ wind?: RealStateWind;
76
+ }
77
+
78
+ interface Forecast {
79
+ type: '予報' | '延長予報';
80
+ elapsedTime: string;
81
+ dateTime: string;
82
+ classification: ForecastClassification;
83
+ center: ForecastCenter;
84
+ wind: ForecastWind;
85
+ }
86
+
87
+ export interface TyphoonName {
88
+ text: string | null;
89
+ kana: string | null;
90
+ number: string | null;
91
+ }
92
+
93
+ export type TyphoonRemark = '台風発生' | '台風発生(域外から入る)' | '台風消滅(域外へ出る)' | '台風消滅(温帯低気圧化)' | '台風消滅(熱帯低気圧化)' |
94
+ '台風発生の可能性が小さくなった' | '発表間隔変更(毎時から3時間毎)' | '発表間隔変更(3時間毎から毎時)' | '台風発生予想' | '温帯低気圧化しつつある' | null;
95
+
96
+ export interface Typhoon {
97
+ tcNumber: string;
98
+ name: TyphoonName;
99
+ remark: TyphoonRemark;
100
+ }
101
+
102
+ export interface PublicBody {
103
+ typhoon: Typhoon;
104
+ forecasts: [RealState] | [RealState, ...Forecast[]] | [RealState, RealState] | [RealState, RealState, ...Forecast[]];
105
+ }
106
+
107
+ export interface Public extends TelegramJSONMain {
108
+ _schema: Schema;
109
+ type: '台風解析・予報情報(5日予報)(H30)' | '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
110
+ title: '台風解析・予報情報';
111
+ targetDuration: string;
112
+ infoKind: '台風解析・予報情報(5日予報)' | '台風解析・予報情報(3日予報)';
113
+ eventId: string;
114
+ serialNo: string;
115
+ infoType: '発表' | '訂正' | '取消';
116
+ headline: null;
117
+ body: PublicBody;
118
+ }
119
+
120
+
121
+ export type Main = Public;
122
+ }