@dmdata/telegram-json-types 1.0.8 → 1.0.9-jschema.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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/dist/build.d.ts +1 -0
  4. package/dist/build.js +68 -0
  5. package/dist/config.d.ts +3 -0
  6. package/dist/config.js +7 -0
  7. package/dist/jschema/earthquake-counts_1.0.0.json +1 -0
  8. package/dist/jschema/earthquake-explanation_1.0.0.json +1 -0
  9. package/dist/jschema/earthquake-hypocenter-update_1.0.0.json +1 -0
  10. package/dist/jschema/earthquake-information_1.0.0.json +1 -0
  11. package/dist/jschema/earthquake-information_1.1.0.json +1 -0
  12. package/dist/jschema/earthquake-nankai_1.0.0.json +1 -0
  13. package/dist/jschema/eew-information_1.0.0.json +1 -0
  14. package/dist/jschema/tsunami-information_1.0.0.json +1 -0
  15. package/dist/jschema/volcano-information_1.0.0.json +1 -0
  16. package/dist/jschema/weather-typhoon_1.0.0.json +1 -0
  17. package/dist/jschema-load.d.ts +1 -0
  18. package/dist/jschema-load.js +44 -0
  19. package/index.d.ts +2 -1
  20. package/package.json +21 -11
  21. package/tsconfig.json +27 -15
  22. package/types/{schema/component → component}/coordinate.d.ts +15 -15
  23. package/types/{schema/component → component}/earthquake.d.ts +56 -56
  24. package/types/{schema/component → component}/unit-value.d.ts +13 -13
  25. package/types/index.d.ts +21 -3
  26. package/types/schema/earthquake-counts/1.0.0.d.ts +69 -0
  27. package/types/schema/earthquake-counts/index.d.ts +7 -0
  28. package/types/schema/earthquake-explanation/1.0.0.d.ts +57 -0
  29. package/types/schema/earthquake-explanation/index.d.ts +7 -0
  30. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +53 -0
  31. package/types/schema/earthquake-hypocenter-update/index.d.ts +7 -0
  32. package/types/schema/earthquake-information/1.0.0.d.ts +165 -0
  33. package/types/schema/{earthquake-information.d.ts → earthquake-information/1.1.0.d.ts} +212 -177
  34. package/types/schema/earthquake-information/index.d.ts +9 -0
  35. package/types/schema/earthquake-nankai/1.0.0.d.ts +87 -0
  36. package/types/schema/earthquake-nankai/index.d.ts +7 -0
  37. package/types/schema/eew-information/1.0.0.d.ts +176 -0
  38. package/types/schema/eew-information/index.d.ts +7 -0
  39. package/types/schema/{tsunami-information.d.ts → tsunami-information/1.0.0.d.ts} +243 -229
  40. package/types/schema/tsunami-information/index.d.ts +7 -0
  41. package/types/schema/volcano-information/1.0.0.d.ts +449 -0
  42. package/types/schema/volcano-information/index.d.ts +7 -0
  43. package/types/schema/{weather-typhoon.d.ts → weather-typhoon/1.0.0.d.ts} +124 -117
  44. package/types/schema/weather-typhoon/index.d.ts +7 -0
@@ -0,0 +1,87 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+
3
+ export namespace EarthquakeNankai {
4
+ export interface Schema {
5
+ type: 'earthquake-nankai';
6
+ version: '1.0.0';
7
+ }
8
+
9
+ export interface EarthquakeInfoKind {
10
+ code: string;
11
+ name: string;
12
+ }
13
+
14
+ export interface EarthquakeInfo {
15
+ kind?: EarthquakeInfoKind;
16
+ text: string;
17
+ appendix?: string;
18
+ }
19
+
20
+
21
+ export interface PublicBody {
22
+ earthquakeInfo?: EarthquakeInfo;
23
+ nextAdvisory?: string;
24
+ text?: string;
25
+ }
26
+
27
+ export interface CancelBody {
28
+ text: string;
29
+ }
30
+
31
+ export interface PublicVYSE50 extends TelegramJSONMain {
32
+ _schema: Schema;
33
+ type: '南海トラフ地震臨時情報';
34
+ title: string;
35
+ infoType: '発表' | '訂正';
36
+ targetDateTimeDubious: never;
37
+ targetDuration: never;
38
+ validDateTime: never;
39
+ eventId: string;
40
+ serialNo: null;
41
+ infoKind: '南海トラフ地震に関連する情報';
42
+ body: PublicBody;
43
+ }
44
+
45
+ export interface PublicVYSE51 extends TelegramJSONMain {
46
+ _schema: Schema;
47
+ type: '南海トラフ地震関連解説情報';
48
+ title: string;
49
+ infoType: '発表' | '訂正';
50
+ targetDateTimeDubious: never;
51
+ targetDuration: never;
52
+ validDateTime: never;
53
+ eventId: string;
54
+ serialNo: string;
55
+ infoKind: '南海トラフ地震に関連する情報';
56
+ body: PublicBody;
57
+ }
58
+
59
+ export interface PublicVYSE52 extends TelegramJSONMain {
60
+ _schema: Schema;
61
+ type: '南海トラフ地震関連解説情報';
62
+ title: string;
63
+ infoType: '発表' | '訂正';
64
+ targetDateTimeDubious: never;
65
+ targetDuration: never;
66
+ validDateTime: never;
67
+ eventId: string;
68
+ serialNo: null;
69
+ infoKind: '南海トラフ地震に関連する情報';
70
+ body: PublicBody;
71
+ }
72
+
73
+ export interface Cancel extends TelegramJSONMain {
74
+ _schema: Schema;
75
+ type: '南海トラフ地震臨時情報' | '南海トラフ地震関連解説情報';
76
+ title: string;
77
+ infoType: '取消';
78
+ targetDateTimeDubious: never;
79
+ targetDuration: never;
80
+ validDateTime: never;
81
+ eventId: string;
82
+ infoKind: '南海トラフ地震に関連する情報';
83
+ body: CancelBody;
84
+ }
85
+
86
+ export type Main = PublicVYSE50 | PublicVYSE51 | PublicVYSE52 | Cancel;
87
+ }
@@ -0,0 +1,7 @@
1
+ import { EarthquakeExplanation 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,176 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { Coordinate } from '@t/component/coordinate';
3
+ import { UnitValueNotNull } from '@t/component/unit-value';
4
+
5
+
6
+ export namespace EewInformation {
7
+ export interface Schema {
8
+ type: 'eew-information';
9
+ version: '1.0.0';
10
+ }
11
+
12
+ export type IntensityClass = '0' | '1' | '2' | '3' | '4' | '5-' | '5+' | '6-' | '6+' | '7';
13
+ export type LpgmIntensityClass = '0' | '1' | '2' | '3' | '4';
14
+
15
+ export interface WarningAreaKind {
16
+ code: string;
17
+ name: string;
18
+ lastKind: {
19
+ code: string;
20
+ name: string;
21
+ };
22
+ }
23
+
24
+ export interface WarningArea {
25
+ code: string;
26
+ name: string;
27
+ kind: WarningAreaKind;
28
+ }
29
+
30
+ export interface EarthquakeHypocenterReduce {
31
+ code: string;
32
+ name: string;
33
+ }
34
+
35
+ export interface EarthquakeHypocenterAccuracy {
36
+ epicenters: [
37
+ '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8',
38
+ '0' | '1' | '2' | '3' | '4' | '9'
39
+ ];
40
+ depth: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
41
+ magnitudeCalculation: '0' | '2' | '3' | '4' | '5' | '6' | '8';
42
+ numberOfMagnitudeCalculation: '0' | '1' | '2' | '3' | '4' | '5';
43
+ }
44
+
45
+ export interface EarthquakeHypocenter {
46
+ code: string;
47
+ name: string;
48
+ coordinate: Coordinate<'日本測地系'>;
49
+ depth: UnitValueNotNull<'深さ', 'km'>;
50
+ reduce: EarthquakeHypocenterReduce;
51
+ landOrSea?: '内陸' | '海域';
52
+ accuracy: EarthquakeHypocenterAccuracy;
53
+ }
54
+
55
+ export interface EarthquakeMagnitude {
56
+ type: 'マグニチュード';
57
+ unit: 'Mj' | 'M';
58
+ value: string | null;
59
+ condition?: 'M不明';
60
+ }
61
+
62
+ export interface Earthquake {
63
+ originTime?: string;
64
+ arrivalTime: string;
65
+ condition?: '仮定震源要素';
66
+ hypocenter: EarthquakeHypocenter;
67
+ magnitude: EarthquakeMagnitude;
68
+ }
69
+
70
+ export interface IntensityForecastMaxInt {
71
+ from: IntensityClass | '不明';
72
+ to: IntensityClass | 'over' | '不明';
73
+ }
74
+
75
+ export interface IntensityForecastLpgmMaxInt {
76
+ from: LpgmIntensityClass | '不明';
77
+ to: LpgmIntensityClass | 'over' | '不明';
78
+ }
79
+
80
+ export interface IntensityAppendix {
81
+ maxIntChange: '0' | '1' | '2';
82
+ maxLpgmIntChange?: '0' | '1' | '2';
83
+ maxIntChangeReason: '0' | '1' | '2' | '3' | '4' | '9';
84
+ }
85
+
86
+ export interface IntensityRegion {
87
+ code: string;
88
+ name: string;
89
+ forecastMaxInt: IntensityForecastMaxInt;
90
+ forecastLpgmMaxInt?: IntensityForecastLpgmMaxInt;
91
+ kind: WarningAreaKind;
92
+ }
93
+
94
+
95
+ export interface Intensity {
96
+ forecastMaxInt: IntensityForecastMaxInt;
97
+ forecastLpgmMaxInt?: IntensityForecastLpgmMaxInt;
98
+ appendix?: IntensityAppendix;
99
+ regions: IntensityRegion[];
100
+ }
101
+
102
+
103
+ export type Comment = {
104
+ free?: string;
105
+ warning?: {
106
+ text: string;
107
+ codes: string[];
108
+ };
109
+ };
110
+
111
+ export interface PublicCommonBody {
112
+ isLastInfo: boolean;
113
+ zones?: WarningArea[];
114
+ prefectures?: WarningArea[];
115
+ regions?: WarningArea[];
116
+ earthquake: Earthquake;
117
+ intensity?: Intensity;
118
+ text?: string;
119
+ comments: Comment;
120
+ }
121
+
122
+ export interface PublicTesting {
123
+ isLastInfo: false;
124
+ text: string;
125
+ }
126
+
127
+ export interface CancelBody {
128
+ isLastInfo: true;
129
+ text: string;
130
+ }
131
+
132
+ export interface PublicCommon extends TelegramJSONMain {
133
+ _schema: Schema;
134
+ type: '緊急地震速報(予報)' | '緊急地震速報(地震動予報)' | '緊急地震速報(警報)';
135
+ title: '緊急地震速報(予報)' | '緊急地震速報(地震動予報)' | '緊急地震速報(警報)';
136
+ infoType: '発表' | '訂正';
137
+ targetDateTimeDubious: never;
138
+ targetDuration: never;
139
+ validDateTime: never;
140
+ eventId: string;
141
+ serialNo: string;
142
+ infoKind: '緊急地震速報';
143
+ body: PublicCommonBody;
144
+ }
145
+
146
+ export interface PublicTesting extends TelegramJSONMain {
147
+ _schema: Schema;
148
+ type: '緊急地震速報テスト';
149
+ title: '緊急地震速報テスト';
150
+ infoType: '発表' | '訂正';
151
+ targetDateTimeDubious: never;
152
+ targetDuration: never;
153
+ validDateTime: never;
154
+ eventId: string;
155
+ serialNo: string;
156
+ infoKind: '緊急地震速報';
157
+ body: PublicTesting;
158
+ }
159
+
160
+ export interface Cancel extends TelegramJSONMain {
161
+ _schema: Schema;
162
+ type: '緊急地震速報(予報)' | '緊急地震速報(地震動予報)' | '緊急地震速報(警報)' | '緊急地震速報テスト';
163
+ title: '緊急地震速報(予報)' | '緊急地震速報(地震動予報)' | '緊急地震速報(警報)' | '緊急地震速報テスト';
164
+ infoType: '取消';
165
+ targetDateTimeDubious: never;
166
+ targetDuration: never;
167
+ validDateTime: never;
168
+ eventId: string;
169
+ serialNo: string;
170
+ infoKind: '緊急地震速報';
171
+ body: CancelBody;
172
+ }
173
+
174
+ export type Main = PublicCommon | PublicTesting | Cancel;
175
+
176
+ }
@@ -0,0 +1,7 @@
1
+ import { EewInformation as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };