@dmdata/telegram-json-types 1.1.13 → 1.1.15

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 (65) hide show
  1. package/README.md +6 -1
  2. package/dist/build.d.ts +1 -1
  3. package/dist/build.js +72 -68
  4. package/dist/config.d.ts +3 -3
  5. package/dist/config.js +7 -7
  6. package/dist/jschema/earthquake-counts_1.0.0.json +1 -1
  7. package/dist/jschema/earthquake-explanation_1.0.0.json +1 -1
  8. package/dist/jschema/earthquake-hypocenter-update_1.0.0.json +1 -1
  9. package/dist/jschema/earthquake-information_1.0.0.json +1 -1
  10. package/dist/jschema/earthquake-information_1.1.0.json +1 -1
  11. package/dist/jschema/earthquake-nankai_1.0.0.json +1 -1
  12. package/dist/jschema/eew-information_1.0.0.json +1 -1
  13. package/dist/jschema/forecast-2week-temperature_1.0.0.json +1 -0
  14. package/dist/jschema/forecast-prefecture_1.0.0.json +1 -0
  15. package/dist/jschema/forecast-season_1.0.0.json +1 -0
  16. package/dist/jschema/forecast-warning-possibility_1.0.0.json +1 -0
  17. package/dist/jschema/forecast-weathermap_1.0.0.json +1 -0
  18. package/dist/jschema/tsunami-information_1.0.0.json +1 -1
  19. package/dist/jschema/volcano-information_1.0.0.json +1 -1
  20. package/dist/jschema/weather-early_1.0.0.json +1 -1
  21. package/dist/jschema/weather-impact-society_1.0.0.json +1 -1
  22. package/dist/jschema/weather-impact-society_1.0.1.json +1 -0
  23. package/dist/jschema/weather-information_1.0.0.json +1 -1
  24. package/dist/jschema/weather-landslide_1.0.0.json +1 -1
  25. package/dist/jschema/weather-river-flood_1.0.0.json +1 -1
  26. package/dist/jschema/weather-tornado_1.0.0.json +1 -1
  27. package/dist/jschema/weather-typhoon_1.0.0.json +1 -1
  28. package/dist/jschema/weather-warning_1.0.0.json +1 -1
  29. package/dist/jschema-load.d.ts +1 -1
  30. package/dist/jschema-load.js +48 -44
  31. package/package.json +11 -12
  32. package/test/sample-schema-check.test.ts +23 -14
  33. package/types/component/coordinate.d.ts +6 -6
  34. package/types/component/earthquake.d.ts +4 -4
  35. package/types/component/unit-value.d.ts +2 -2
  36. package/types/index.d.ts +18 -2
  37. package/types/schema/earthquake-counts/1.0.0.d.ts +6 -6
  38. package/types/schema/earthquake-explanation/1.0.0.d.ts +6 -6
  39. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +6 -6
  40. package/types/schema/earthquake-information/1.0.0.d.ts +17 -17
  41. package/types/schema/earthquake-information/1.1.0.d.ts +43 -26
  42. package/types/schema/earthquake-nankai/1.0.0.d.ts +12 -12
  43. package/types/schema/eew-information/1.0.0.d.ts +16 -16
  44. package/types/schema/forecast-2week-temperature/1.0.0.d.ts +110 -0
  45. package/types/schema/forecast-2week-temperature/index.d.ts +7 -0
  46. package/types/schema/forecast-prefecture/1.0.0.d.ts +526 -0
  47. package/types/schema/forecast-prefecture/index.d.ts +7 -0
  48. package/types/schema/forecast-season/1.0.0.d.ts +169 -0
  49. package/types/schema/forecast-season/index.d.ts +7 -0
  50. package/types/schema/forecast-warning-possibility/1.0.0.d.ts +382 -0
  51. package/types/schema/forecast-warning-possibility/index.d.ts +7 -0
  52. package/types/schema/forecast-weathermap/1.0.0.d.ts +194 -0
  53. package/types/schema/forecast-weathermap/index.d.ts +7 -0
  54. package/types/schema/tsunami-information/1.0.0.d.ts +26 -26
  55. package/types/schema/volcano-information/1.0.0.d.ts +25 -25
  56. package/types/schema/weather-early/1.0.0.d.ts +0 -25
  57. package/types/schema/weather-impact-society/1.0.0.d.ts +7 -5
  58. package/types/schema/weather-impact-society/1.0.1.d.ts +117 -0
  59. package/types/schema/weather-impact-society/index.d.ts +3 -1
  60. package/types/schema/weather-information/1.0.0.d.ts +43 -6
  61. package/types/schema/weather-landslide/1.0.0.d.ts +3 -3
  62. package/types/schema/weather-river-flood/1.0.0.d.ts +3 -3
  63. package/types/schema/weather-tornado/1.0.0.d.ts +2 -2
  64. package/types/schema/weather-typhoon/1.0.0.d.ts +3 -3
  65. package/types/schema/weather-warning/1.0.0.d.ts +11 -11
@@ -1,44 +1,48 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.getJSchema = void 0;
23
- const fs_1 = require("fs");
24
- const path_1 = require("path");
25
- const config_1 = require("./config");
26
- const schemas = new Map();
27
- const jschemaList = (0, fs_1.readdirSync)(config_1.distDir)
28
- .filter(file => /\.json$/.test(file))
29
- .sort();
30
- jschemaList.forEach(file => {
31
- const [, schemaName, schemaVersion] = file.match(/^([\w-]+)_(\w+\.\w+\.\w+)\.json$/) ?? [];
32
- const schemaVersions = schemas.get(schemaName) ?? schemas.set(schemaName, new Map()).get(schemaName);
33
- const jschemaFile = (0, path_1.resolve)(config_1.distDir, file);
34
- schemaVersions?.set(schemaVersion, jschemaFile);
35
- schemaVersions?.set('latest', jschemaFile);
36
- });
37
- async function getJSchema(name, version = 'latest') {
38
- const filePath = schemas.get(name)?.get(version);
39
- if (!filePath) {
40
- return null;
41
- }
42
- return await Promise.resolve().then(() => __importStar(require(filePath)));
43
- }
44
- exports.getJSchema = getJSchema;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.getJSchema = void 0;
27
+ const fs_1 = require("fs");
28
+ const path_1 = require("path");
29
+ const config_1 = require("./config");
30
+ const schemas = new Map();
31
+ const jschemaList = (0, fs_1.readdirSync)(config_1.distDir)
32
+ .filter(file => /\.json$/.test(file))
33
+ .sort();
34
+ jschemaList.forEach(file => {
35
+ const [, schemaName, schemaVersion] = file.match(/^([\w-]+)_(\w+\.\w+\.\w+)\.json$/) ?? [];
36
+ const schemaVersions = schemas.get(schemaName) ?? schemas.set(schemaName, new Map()).get(schemaName);
37
+ const jschemaFile = (0, path_1.resolve)(config_1.distDir, file);
38
+ schemaVersions?.set(schemaVersion, jschemaFile);
39
+ schemaVersions?.set('latest', jschemaFile);
40
+ });
41
+ async function getJSchema(name, version = 'latest') {
42
+ const filePath = schemas.get(name)?.get(version);
43
+ if (!filePath) {
44
+ return null;
45
+ }
46
+ return await Promise.resolve(`${filePath}`).then(s => __importStar(require(s)));
47
+ }
48
+ exports.getJSchema = getJSchema;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dmdata/telegram-json-types",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "scripts": {
5
5
  "build:jschema": "npx tsc --project jschema/tsconfig.json",
6
6
  "build:dist-jschema": "node ./dist/build.js",
7
7
  "prepublishOnly": "npm run build:jschema && npm run build:dist-jschema",
8
8
  "publish:npm": "npm version patch && npm publish --access=public",
9
- "test": "jest",
9
+ "test": "npx ts-node test/sample-schema-check.test.ts",
10
10
  "type-test": "npm run build:dist-jschema && npm run test"
11
11
  },
12
12
  "repository": {
@@ -19,15 +19,14 @@
19
19
  "author": "",
20
20
  "license": "MIT",
21
21
  "devDependencies": {
22
- "@types/jest": "^27.4.0",
23
- "@types/node": "^14.18.9",
24
- "@types/node-fetch": "^2.5.12",
25
- "ajv": "^8.9.0",
26
- "jest": "^27.4.7",
27
- "node-fetch": "^2.6.7",
28
- "ts-jest": "^27.1.3",
29
- "ts-node": "^10.4.0",
30
- "typescript": "^4.5.5",
31
- "typescript-json-schema": "^0.53.0"
22
+ "@types/jest": "^29.5.11",
23
+ "@types/node": "^20.11.15",
24
+ "ajv": "^8.12.0",
25
+ "ts-node": "^10.9.2",
26
+ "typescript": "^5.3.3",
27
+ "typescript-json-schema": "^0.62.0"
28
+ },
29
+ "engines": {
30
+ "node": ">=18"
32
31
  }
33
32
  }
@@ -1,5 +1,6 @@
1
+ import { test } from 'node:test';
2
+ import { deepEqual } from 'node:assert/strict';
1
3
  import Ajv from 'ajv';
2
- import fetch from 'node-fetch';
3
4
  import { getJSchema } from '../jschema/jschema-load';
4
5
 
5
6
  const checkSchemaTypes = [
@@ -9,6 +10,11 @@ const checkSchemaTypes = [
9
10
  'earthquake-counts',
10
11
  'earthquake-hypocenter-update',
11
12
  'earthquake-nankai',
13
+ 'forecast-prefecture',
14
+ 'forecast-warning-possibility',
15
+ 'forecast-season',
16
+ 'forecast-2week-temperature',
17
+ 'forecast-weathermap',
12
18
  'tsunami-information',
13
19
  'volcano-information',
14
20
  'weather-information',
@@ -25,21 +31,24 @@ const ajv = new Ajv({
25
31
  strictTuples: false
26
32
  });
27
33
 
28
- test.each(checkSchemaTypes)('CheckSchemaType: %s', async schemaType => {
29
- const sampleList = await getList(schemaType);
34
+ for (const schemaType of checkSchemaTypes) {
35
+ test(schemaType, async t => {
36
+ const sampleList = await getList(schemaType);
30
37
 
31
- for (let i = 0; i < sampleList.length; i++) {
32
- const url = sampleList[i];
33
- const json: any = await fetch(url).then(res => res.json());
34
- const schema = await getJSchema(json._schema.type, json._schema.version);
35
- const validate = ajv.compile(schema);
36
- const valid = validate(json);
38
+ for (let i = 0; i < sampleList.length; i++) {
39
+ const url = sampleList[i];
40
+ const json: any = await fetch(url).then(res => res.json());
41
+ const schema = await getJSchema(json._schema.type, json._schema.version);
42
+ const validate = ajv.compile(schema);
43
+ const valid = validate(json);
37
44
 
38
- console.group(url);
39
- expect(validate.errors ?? []).toEqual([]);
40
- console.groupEnd();
41
- }
42
- });
45
+ await t.test(url, () => {
46
+ deepEqual(validate.errors ?? [], []);
47
+ });
48
+ }
49
+ });
50
+
51
+ }
43
52
 
44
53
 
45
54
  async function getList(schemaType: string) {
@@ -11,15 +11,15 @@ interface CoordinateNormal<Geo> {
11
11
  value: string;
12
12
  };
13
13
  height?: UnitValueNotNull<'高さ', 'm'>;
14
- condition: never;
15
- geodeticSystem: Geo;
14
+ condition?: never;
15
+ geodeticSystem?: Geo;
16
16
  }
17
17
 
18
18
  interface CoordinateUnknown {
19
- latitude: never;
20
- longitude: never;
21
- height: never;
22
- geodeticSystem: never;
19
+ latitude?: never;
20
+ longitude?: never;
21
+ height?: never;
22
+ geodeticSystem?: never;
23
23
  condition: '不明';
24
24
  }
25
25
 
@@ -5,12 +5,12 @@ interface DepthBase {
5
5
  type: '深さ';
6
6
  unit: 'km';
7
7
  value: string | null;
8
- condition: string | never;
8
+ condition?: string | never;
9
9
  }
10
10
 
11
11
  interface DepthNormal extends DepthBase {
12
12
  value: string;
13
- condition: never;
13
+ condition?: never;
14
14
  }
15
15
 
16
16
  interface DepthShallow extends DepthBase {
@@ -35,12 +35,12 @@ interface MagnitudeBase {
35
35
  type: 'マグニチュード';
36
36
  unit: 'Mj' | 'M';
37
37
  value: string | null;
38
- condition: string | never;
38
+ condition?: string | never;
39
39
  }
40
40
 
41
41
  interface MagnitudeNormal extends MagnitudeBase {
42
42
  value: string;
43
- condition: never;
43
+ condition?: never;
44
44
  }
45
45
 
46
46
  interface MagnitudeUnknown extends MagnitudeBase {
@@ -2,12 +2,12 @@ export type UnitValue<Type = string, Unit = string, Condition = never> = {
2
2
  type: Type;
3
3
  unit: Unit;
4
4
  value: string | null;
5
- condition: Condition
5
+ condition?: Condition;
6
6
  };
7
7
 
8
8
  export type UnitValueNotNull<Type = string, Unit = string, Condition = never> = {
9
9
  type: Type;
10
10
  unit: Unit;
11
11
  value: string;
12
- condition: Condition
12
+ condition?: Condition;
13
13
  };
package/types/index.d.ts CHANGED
@@ -14,6 +14,12 @@ import * as WeatherTornado from './schema/weather-tornado';
14
14
  import * as WeatherTyphoon from './schema/weather-typhoon';
15
15
  import * as WeatherLandslide from './schema/weather-landslide';
16
16
  import * as WeatherRiverFlood from './schema/weather-river-flood';
17
+ import * as ForecastPrefecture from './schema/forecast-prefecture';
18
+ import * as ForecastWarningPossibility from './schema/forecast-warning-possibility';
19
+ import * as ForecastSeason from './schema/forecast-season';
20
+ import * as Forecast2weekTemperature from './schema/forecast-2week-temperature';
21
+ import * as ForecastWeathermap from './schema/forecast-weathermap';
22
+
17
23
  import { TelegramJSONMain } from './main';
18
24
  import { Components } from './component';
19
25
 
@@ -28,13 +34,18 @@ type All =
28
34
  TsunamiInformation.v1_0_0.Main |
29
35
  VolcanoInformation.v1_0_0.Main |
30
36
  WeatherInformation.v1_0_0.Main |
31
- WeatherImpactSociety.v1_0_0.Main |
37
+ WeatherImpactSociety.v1_0_1.Main |
32
38
  WeatherEarly.v1_0_0.Main |
33
39
  WeatherWarning.v1_0_0.Main |
34
40
  WeatherTornado.v1_0_0.Main |
35
41
  WeatherTyphoon.v1_0_0.Main |
36
42
  WeatherLandslide.v1_0_0.Main |
37
- WeatherRiverFlood.v1_0_0.Main;
43
+ WeatherRiverFlood.v1_0_0.Main |
44
+ ForecastPrefecture.v1_0_0.Main |
45
+ ForecastWarningPossibility.v1_0_0.Main |
46
+ ForecastSeason.v1_0_0.Main |
47
+ Forecast2weekTemperature.v1_0_0.Main |
48
+ ForecastWeathermap.v1_0_0.Main;
38
49
 
39
50
  export {
40
51
  EarthquakeInformation,
@@ -53,6 +64,11 @@ export {
53
64
  WeatherTyphoon,
54
65
  WeatherLandslide,
55
66
  WeatherRiverFlood,
67
+ ForecastPrefecture,
68
+ ForecastWarningPossibility,
69
+ ForecastSeason,
70
+ Forecast2weekTemperature,
71
+ ForecastWeathermap,
56
72
  TelegramJSONMain,
57
73
  Components,
58
74
  All
@@ -42,9 +42,9 @@ export namespace EarthquakeCounts {
42
42
  type: '地震回数に関する情報';
43
43
  title: '地震回数に関する情報';
44
44
  infoType: '発表' | '訂正';
45
- targetDateTimeDubious: never;
46
- targetDuration: never;
47
- validDateTime: never;
45
+ targetDateTimeDubious?: never;
46
+ targetDuration?: never;
47
+ validDateTime?: never;
48
48
  eventId: string;
49
49
  serialNo: string;
50
50
  infoKind: '地震回数情報';
@@ -56,9 +56,9 @@ export namespace EarthquakeCounts {
56
56
  type: '地震回数に関する情報';
57
57
  title: '地震回数に関する情報';
58
58
  infoType: '取消';
59
- targetDateTimeDubious: never;
60
- targetDuration: never;
61
- validDateTime: never;
59
+ targetDateTimeDubious?: never;
60
+ targetDuration?: never;
61
+ validDateTime?: never;
62
62
  eventId: string;
63
63
  serialNo: string;
64
64
  infoKind: '地震回数情報';
@@ -30,9 +30,9 @@ export namespace EarthquakeExplanation {
30
30
  type: '地震の活動状況等に関する情報';
31
31
  title: '地震の活動状況等に関する情報';
32
32
  infoType: '発表' | '訂正';
33
- targetDateTimeDubious: never;
34
- targetDuration: never;
35
- validDateTime: never;
33
+ targetDateTimeDubious?: never;
34
+ targetDuration?: never;
35
+ validDateTime?: never;
36
36
  eventId: string;
37
37
  serialNo: null;
38
38
  infoKind: '地震の活動状況等に関する情報';
@@ -44,9 +44,9 @@ export namespace EarthquakeExplanation {
44
44
  type: '地震の活動状況等に関する情報';
45
45
  title: '地震の活動状況等に関する情報';
46
46
  infoType: '取消';
47
- targetDateTimeDubious: never;
48
- targetDuration: never;
49
- validDateTime: never;
47
+ targetDateTimeDubious?: never;
48
+ targetDuration?: never;
49
+ validDateTime?: never;
50
50
  eventId: string;
51
51
  serialNo: null;
52
52
  infoKind: '地震の活動状況等に関する情報';
@@ -26,9 +26,9 @@ export namespace EarthquakeHypocenterUpdate {
26
26
  type: '顕著な地震の震源要素更新のお知らせ';
27
27
  title: '顕著な地震の震源要素更新のお知らせ';
28
28
  infoType: '発表' | '訂正';
29
- targetDateTimeDubious: never;
30
- targetDuration: never;
31
- validDateTime: never;
29
+ targetDateTimeDubious?: never;
30
+ targetDuration?: never;
31
+ validDateTime?: never;
32
32
  eventId: string;
33
33
  serialNo: null;
34
34
  infoKind: '震源要素更新のお知らせ';
@@ -40,9 +40,9 @@ export namespace EarthquakeHypocenterUpdate {
40
40
  type: '顕著な地震の震源要素更新のお知らせ';
41
41
  title: '顕著な地震の震源要素更新のお知らせ';
42
42
  infoType: '取消';
43
- targetDateTimeDubious: never;
44
- targetDuration: never;
45
- validDateTime: never;
43
+ targetDateTimeDubious?: never;
44
+ targetDuration?: never;
45
+ validDateTime?: never;
46
46
  eventId: string;
47
47
  serialNo: null;
48
48
  infoKind: '震源要素更新のお知らせ';
@@ -77,7 +77,7 @@ export namespace EarthquakeInformation {
77
77
  comments: Comments;
78
78
  }
79
79
 
80
- export interface PublicBodyVXZSE40 {
80
+ export interface PublicBodyVZSE40 {
81
81
  text: string;
82
82
  }
83
83
 
@@ -90,9 +90,9 @@ export namespace EarthquakeInformation {
90
90
  type: '震度速報';
91
91
  title: '震度速報';
92
92
  infoType: '発表' | '訂正';
93
- targetDateTimeDubious: never;
94
- targetDuration: never;
95
- validDateTime: never;
93
+ targetDateTimeDubious?: never;
94
+ targetDuration?: never;
95
+ validDateTime?: never;
96
96
  eventId: string;
97
97
  serialNo: null;
98
98
  infoKind: '震度速報';
@@ -104,9 +104,9 @@ export namespace EarthquakeInformation {
104
104
  type: '震源に関する情報';
105
105
  title: '震源に関する情報';
106
106
  infoType: '発表' | '訂正';
107
- targetDateTimeDubious: never;
108
- targetDuration: never;
109
- validDateTime: never;
107
+ targetDateTimeDubious?: never;
108
+ targetDuration?: never;
109
+ validDateTime?: never;
110
110
  eventId: string;
111
111
  serialNo: null;
112
112
  infoKind: '震源速報';
@@ -118,9 +118,9 @@ export namespace EarthquakeInformation {
118
118
  type: '震源・震度に関する情報';
119
119
  title: '震源・震度情報' | '遠地地震に関する情報';
120
120
  infoType: '発表' | '訂正';
121
- targetDateTimeDubious: never;
122
- targetDuration: never;
123
- validDateTime: never;
121
+ targetDateTimeDubious?: never;
122
+ targetDuration?: never;
123
+ validDateTime?: never;
124
124
  eventId: string;
125
125
  serialNo: string;
126
126
  infoKind: '地震情報';
@@ -132,13 +132,13 @@ export namespace EarthquakeInformation {
132
132
  type: '地震・津波に関するお知らせ';
133
133
  title: '地震・津波に関するお知らせ';
134
134
  infoType: '発表' | '訂正';
135
- targetDateTimeDubious: never;
136
- targetDuration: never;
137
- validDateTime: never;
135
+ targetDateTimeDubious?: never;
136
+ targetDuration?: never;
137
+ validDateTime?: never;
138
138
  eventId: string;
139
139
  serialNo: null;
140
140
  infoKind: '地震・津波に関するお知らせ';
141
- body: PublicBodyVXZSE40;
141
+ body: PublicBodyVZSE40;
142
142
  }
143
143
 
144
144
  export interface Cancel extends TelegramJSONMain {
@@ -146,9 +146,9 @@ export namespace EarthquakeInformation {
146
146
  type: '震度速報' | '震源に関する情報' | '震源・震度に関する情報' | '地震・津波に関するお知らせ';
147
147
  title: '震度速報' | '震源に関する情報' | '震源・震度情報' | '遠地地震に関する情報' | '地震・津波に関するお知らせ';
148
148
  infoType: '取消';
149
- targetDateTimeDubious: never;
150
- targetDuration: never;
151
- validDateTime: never;
149
+ targetDateTimeDubious?: never;
150
+ targetDuration?: never;
151
+ validDateTime?: never;
152
152
  eventId: string;
153
153
  infoKind: '震度速報' | '震源速報' | '地震情報' | '地震・津波に関するお知らせ';
154
154
  body: CancelBody;
@@ -35,17 +35,24 @@ export namespace EarthquakeInformation {
35
35
  export type IntensityLgMaxInt = IntensityMaxIntOnRevise & {
36
36
  maxLgInt: LgIntensityClass;
37
37
  };
38
+
39
+ export interface IntensityPeriodicBand extends Omit<Components.UnitValueNotNull<void, '秒台'>, 'type'> {
40
+ }
41
+
42
+ export interface IntensitySva extends Omit<Components.UnitValueNotNull<void, 'cm/s'>, 'type'> {
43
+ }
44
+
38
45
  export type IntensityLgStationPrePeriod = {
39
- periodicBand: Components.UnitValueNotNull<never, '秒台'>;
46
+ periodicBand: IntensityPeriodicBand;
40
47
  lgInt: LgIntensityClass;
41
- sva: Components.UnitValueNotNull<never, 'cm/s'>;
48
+ sva: IntensitySva;
42
49
  };
43
50
 
44
51
  export interface IntensityLgStation extends Components.CodeName {
45
52
  int?: IntensityClass;
46
53
  revise?: '上方修正' | '下方修正' | '追加';
47
54
  lgInt: LgIntensityClass;
48
- sva: Components.UnitValueNotNull<never, 'cm/s'>;
55
+ sva: IntensitySva;
49
56
  prePeriods: IntensityLgStationPrePeriod[];
50
57
  }
51
58
 
@@ -59,6 +66,16 @@ export namespace EarthquakeInformation {
59
66
  text: string;
60
67
  codes: string[];
61
68
  };
69
+ uri?: string;
70
+ }
71
+
72
+ export interface CommentsVXSE51Or52 extends Comments {
73
+ var?: never;
74
+ uri?: never;
75
+ }
76
+
77
+ export interface CommentsVXSE53 extends Comments {
78
+ uri?: never;
62
79
  }
63
80
 
64
81
 
@@ -89,20 +106,20 @@ export namespace EarthquakeInformation {
89
106
  export interface PublicBodyVXSE51 {
90
107
  intensity: IntensityVXSE51;
91
108
  text?: string;
92
- comments: Omit<Comments, 'var'>;
109
+ comments: CommentsVXSE51Or52;
93
110
  }
94
111
 
95
112
  export interface PublicBodyVXSE52 {
96
113
  earthquake: Components.Earthquake;
97
114
  text?: string;
98
- comments: Omit<Comments, 'var'>;
115
+ comments: CommentsVXSE51Or52;
99
116
  }
100
117
 
101
118
  export interface PublicBodyVXSE53 {
102
119
  earthquake: Components.Earthquake;
103
120
  intensity?: IntensityVXSE53;
104
121
  text?: string;
105
- comments: Comments;
122
+ comments: CommentsVXSE53;
106
123
  }
107
124
 
108
125
  export interface PublicBodyVXSE62 {
@@ -112,7 +129,7 @@ export namespace EarthquakeInformation {
112
129
  comments: Comments;
113
130
  }
114
131
 
115
- export interface PublicBodyVXZSE40 {
132
+ export interface PublicBodyVZSE40 {
116
133
  text: string;
117
134
  }
118
135
 
@@ -125,9 +142,9 @@ export namespace EarthquakeInformation {
125
142
  type: '震度速報';
126
143
  title: '震度速報';
127
144
  infoType: '発表' | '訂正';
128
- targetDateTimeDubious: never;
129
- targetDuration: never;
130
- validDateTime: never;
145
+ targetDateTimeDubious?: never;
146
+ targetDuration?: never;
147
+ validDateTime?: never;
131
148
  eventId: string;
132
149
  serialNo: null;
133
150
  infoKind: '震度速報';
@@ -139,9 +156,9 @@ export namespace EarthquakeInformation {
139
156
  type: '震源に関する情報';
140
157
  title: '震源に関する情報';
141
158
  infoType: '発表' | '訂正';
142
- targetDateTimeDubious: never;
143
- targetDuration: never;
144
- validDateTime: never;
159
+ targetDateTimeDubious?: never;
160
+ targetDuration?: never;
161
+ validDateTime?: never;
145
162
  eventId: string;
146
163
  serialNo: null;
147
164
  infoKind: '震源速報';
@@ -153,9 +170,9 @@ export namespace EarthquakeInformation {
153
170
  type: '震源・震度に関する情報';
154
171
  title: '震源・震度情報' | '遠地地震に関する情報';
155
172
  infoType: '発表' | '訂正';
156
- targetDateTimeDubious: never;
157
- targetDuration: never;
158
- validDateTime: never;
173
+ targetDateTimeDubious?: never;
174
+ targetDuration?: never;
175
+ validDateTime?: never;
159
176
  eventId: string;
160
177
  serialNo: string;
161
178
  infoKind: '地震情報';
@@ -167,9 +184,9 @@ export namespace EarthquakeInformation {
167
184
  type: '長周期地震動に関する観測情報';
168
185
  title: '長周期地震動に関する観測情報';
169
186
  infoType: '発表' | '訂正';
170
- targetDateTimeDubious: never;
171
- targetDuration: never;
172
- validDateTime: never;
187
+ targetDateTimeDubious?: never;
188
+ targetDuration?: never;
189
+ validDateTime?: never;
173
190
  eventId: string;
174
191
  serialNo: string;
175
192
  infoKind: '長周期地震動に関する観測情報';
@@ -181,13 +198,13 @@ export namespace EarthquakeInformation {
181
198
  type: '地震・津波に関するお知らせ';
182
199
  title: '地震・津波に関するお知らせ';
183
200
  infoType: '発表' | '訂正';
184
- targetDateTimeDubious: never;
185
- targetDuration: never;
186
- validDateTime: never;
201
+ targetDateTimeDubious?: never;
202
+ targetDuration?: never;
203
+ validDateTime?: never;
187
204
  eventId: string;
188
205
  serialNo: null;
189
206
  infoKind: '地震・津波に関するお知らせ';
190
- body: PublicBodyVXZSE40;
207
+ body: PublicBodyVZSE40;
191
208
  }
192
209
 
193
210
  export interface Cancel extends TelegramJSONMain {
@@ -195,9 +212,9 @@ export namespace EarthquakeInformation {
195
212
  type: '震度速報' | '震源に関する情報' | '震源・震度に関する情報' | '長周期地震動に関する観測情報' | '地震・津波に関するお知らせ';
196
213
  title: '震度速報' | '震源に関する情報' | '震源・震度情報' | '遠地地震に関する情報' | '長周期地震動に関する観測情報' | '地震・津波に関するお知らせ';
197
214
  infoType: '取消';
198
- targetDateTimeDubious: never;
199
- targetDuration: never;
200
- validDateTime: never;
215
+ targetDateTimeDubious?: never;
216
+ targetDuration?: never;
217
+ validDateTime?: never;
201
218
  eventId: string;
202
219
  infoKind: '震度速報' | '震源速報' | '地震情報' | '長周期地震動に関する観測情報' | '地震・津波に関するお知らせ';
203
220
  body: CancelBody;