@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
package/jest.config.ts ADDED
@@ -0,0 +1,202 @@
1
+ /*
2
+ * For a detailed explanation regarding each configuration property and type check, visit:
3
+ * https://jestjs.io/docs/configuration
4
+ */
5
+
6
+ export default {
7
+ // All imported modules in your tests should be mocked automatically
8
+ // automock: false,
9
+
10
+ // Stop running tests after `n` failures
11
+ // bail: 0,
12
+
13
+ // The directory where Jest should store its cached dependency information
14
+ // cacheDirectory: "C:\\Users\\soshi\\AppData\\Local\\Temp\\jest",
15
+
16
+ // Automatically clear mock calls, instances and results before every test
17
+ // clearMocks: true,
18
+
19
+ // Indicates whether the coverage information should be collected while executing the test
20
+ // collectCoverage: false,
21
+
22
+ // An array of glob patterns indicating a set of files for which coverage information should be collected
23
+ // collectCoverageFrom: undefined,
24
+
25
+ // The directory where Jest should output its coverage files
26
+ // coverageDirectory: undefined,
27
+
28
+ // An array of regexp pattern strings used to skip coverage collection
29
+ // coveragePathIgnorePatterns: [
30
+ // "\\\\node_modules\\\\"
31
+ // ],
32
+
33
+ // Indicates which provider should be used to instrument code for coverage
34
+ coverageProvider: "v8",
35
+
36
+ // A list of reporter names that Jest uses when writing coverage reports
37
+ // coverageReporters: [
38
+ // "json",
39
+ // "text",
40
+ // "lcov",
41
+ // "clover"
42
+ // ],
43
+
44
+ // An object that configures minimum threshold enforcement for coverage results
45
+ // coverageThreshold: undefined,
46
+
47
+ // A path to a custom dependency extractor
48
+ // dependencyExtractor: undefined,
49
+
50
+ // Make calling deprecated APIs throw helpful error messages
51
+ // errorOnDeprecated: false,
52
+
53
+ // Force coverage collection from ignored files using an array of glob patterns
54
+ // forceCoverageMatch: [],
55
+
56
+ // A path to a module which exports an async function that is triggered once before all test suites
57
+ // globalSetup: undefined,
58
+
59
+ // A path to a module which exports an async function that is triggered once after all test suites
60
+ // globalTeardown: undefined,
61
+
62
+ // A set of global variables that need to be available in all test environments
63
+ // globals: {},
64
+
65
+ // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
66
+ // maxWorkers: "50%",
67
+
68
+ // An array of directory names to be searched recursively up from the requiring module's location
69
+ // moduleDirectories: [
70
+ // "node_modules"
71
+ // ],
72
+
73
+ // An array of file extensions your modules use
74
+ // moduleFileExtensions: [
75
+ // "js",
76
+ // "jsx",
77
+ // "ts",
78
+ // "tsx",
79
+ // "json",
80
+ // "node"
81
+ // ],
82
+
83
+ // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
84
+ // moduleNameMapper: {},
85
+
86
+ // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
87
+ // modulePathIgnorePatterns: [],
88
+
89
+ // Activates notifications for test results
90
+ // notify: false,
91
+
92
+ // An enum that specifies notification mode. Requires { notify: true }
93
+ // notifyMode: "failure-change",
94
+
95
+ // A preset that is used as a base for Jest's configuration
96
+ // preset: undefined,
97
+
98
+ // Run tests from one or more projects
99
+ // projects: undefined,
100
+
101
+ // Use this configuration option to add custom reporters to Jest
102
+ // reporters: undefined,
103
+
104
+ // Automatically reset mock state before every test
105
+ // resetMocks: false,
106
+
107
+ // Reset the module registry before running each individual test
108
+ // resetModules: false,
109
+
110
+ // A path to a custom resolver
111
+ // resolver: undefined,
112
+
113
+ // Automatically restore mock state and implementation before every test
114
+ // restoreMocks: false,
115
+
116
+ // The root directory that Jest should scan for tests and modules within
117
+ // rootDir: undefined,
118
+
119
+ // A list of paths to directories that Jest should use to search for files in
120
+ // roots: [
121
+ // "<rootDir>"
122
+ // ],
123
+
124
+ // Allows you to use a custom runner instead of Jest's default test runner
125
+ // runner: "jest-runner",
126
+
127
+ // The paths to modules that run some code to configure or set up the testing environment before each test
128
+ // setupFiles: [],
129
+
130
+ // A list of paths to modules that run some code to configure or set up the testing framework before each test
131
+ // setupFilesAfterEnv: [],
132
+
133
+ // The number of seconds after which a test is considered as slow and reported as such in the results.
134
+ // slowTestThreshold: 5,
135
+
136
+ // A list of paths to snapshot serializer modules Jest should use for snapshot testing
137
+ // snapshotSerializers: [],
138
+
139
+ // The test environment that will be used for testing
140
+ // testEnvironment: "jest-environment-node",
141
+
142
+ // Options that will be passed to the testEnvironment
143
+ // testEnvironmentOptions: {},
144
+
145
+ // Adds a location field to test results
146
+ // testLocationInResults: false,
147
+
148
+ // The glob patterns Jest uses to detect test files
149
+ // testMatch: [
150
+ // "**/__tests__/**/*.[jt]s?(x)",
151
+ // "**/?(*.)+(spec|test).[tj]s?(x)"
152
+ // ],
153
+
154
+ // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
155
+ // testPathIgnorePatterns: [
156
+ // "\\\\node_modules\\\\"
157
+ // ],
158
+
159
+ // The regexp pattern or array of patterns that Jest uses to detect test files
160
+ // testRegex: [],
161
+
162
+ // This option allows the use of a custom results processor
163
+ // testResultsProcessor: undefined,
164
+
165
+ // This option allows use of a custom test runner
166
+ // testRunner: "jest-circus/runner",
167
+
168
+ // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
169
+ // testURL: "http://localhost",
170
+
171
+ // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
172
+ // timers: "real",
173
+
174
+ // A map from regular expressions to paths to transformers
175
+ // transform: undefined,
176
+
177
+ // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
178
+ // transformIgnorePatterns: [
179
+ // "\\\\node_modules\\\\",
180
+ // "\\.pnp\\.[^\\\\]+$"
181
+ // ],
182
+
183
+ // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
184
+ // unmockedModulePathPatterns: undefined,
185
+
186
+ // Indicates whether each individual test should be reported during the run
187
+ // verbose: undefined,
188
+
189
+ // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
190
+ // watchPathIgnorePatterns: [],
191
+
192
+ // Whether to use watchman for file crawling
193
+ // watchman: true,
194
+
195
+ roots: [
196
+ "<rootDir>/test"
197
+ ],
198
+
199
+ transform: {
200
+ "^.+\\.ts$": "ts-jest"
201
+ },
202
+ };
package/package.json CHANGED
@@ -1,21 +1,33 @@
1
- {
2
- "name": "@dmdata/telegram-json-types",
3
- "version": "1.0.9-jschema.1",
4
- "scripts": {
5
- "build:jschema": "npx tsc --project tsconfig.jschema.json",
6
- "build:dist-jschema": "node ./dist/build.js",
7
- "prepublishOnly": "npm run build:jschema && npm run build:dist-jschema",
8
- "publish:npm": "npm version patch && npm publish --access=public"
9
- },
10
- "types": "index.d.ts",
11
- "main": "./dist/jschema-load.js",
12
- "keywords": [],
13
- "author": "",
14
- "license": "MIT",
15
- "devDependencies": {
16
- "@types/node": "^14.18.9",
17
- "typescript": "^4.5.5",
18
- "ts-node": "^10.4.0",
19
- "typescript-json-schema": "^0.53.0"
20
- }
21
- }
1
+ {
2
+ "name": "@dmdata/telegram-json-types",
3
+ "version": "1.1.1",
4
+ "scripts": {
5
+ "build:jschema": "npx tsc --project jschema/tsconfig.json",
6
+ "build:dist-jschema": "node ./dist/build.js",
7
+ "prepublishOnly": "npm run build:jschema && npm run build:dist-jschema",
8
+ "publish:npm": "npm version patch && npm publish --access=public",
9
+ "test": "jest",
10
+ "type-test": "npm run build:dist-jschema && npm run test"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/pdmdss/telegram-json-types"
15
+ },
16
+ "types": "index.d.ts",
17
+ "main": "./dist/jschema-load.js",
18
+ "keywords": [],
19
+ "author": "",
20
+ "license": "MIT",
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"
32
+ }
33
+ }
@@ -0,0 +1,54 @@
1
+ import Ajv from 'ajv';
2
+ import fetch from 'node-fetch';
3
+ import { getJSchema } from '../jschema/jschema-load';
4
+
5
+ const checkSchemaTypes = [
6
+ 'eew-information',
7
+ 'earthquake-information',
8
+ 'earthquake-explanation',
9
+ 'earthquake-counts',
10
+ 'earthquake-hypocenter-update',
11
+ 'earthquake-nankai',
12
+ 'tsunami-information',
13
+ 'volcano-information',
14
+ 'weather-information',
15
+ 'weather-impact-society',
16
+ 'weather-early',
17
+ 'weather-warning',
18
+ 'weather-tornado',
19
+ 'weather-typhoon',
20
+ 'weather-landslide',
21
+ 'weather-river-flood'
22
+ ];
23
+
24
+ const ajv = new Ajv({
25
+ strictTuples: false
26
+ });
27
+
28
+ test.each(checkSchemaTypes)('CheckSchemaType: %s', async schemaType => {
29
+ const sampleList = await getList(schemaType);
30
+
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);
37
+
38
+ console.group(url);
39
+ expect(validate.errors ?? []).toEqual([]);
40
+ console.groupEnd();
41
+ }
42
+ });
43
+
44
+
45
+ async function getList(schemaType: string) {
46
+ const url = `https://sample.dmdata.jp/conversion/json/schema/${schemaType}/`;
47
+ return await fetch(url).then(res => res.text())
48
+ .then(html => html
49
+ .replace(/^.+?<pre>.+?<hr>(.+?)<\/pre>.+?$/s, '$1')
50
+ .match(/<a\shref="(.+?)">/g)
51
+ ?.map(a => url + a.replace(/^<a\shref="(.+?)">$/, '$1'))
52
+ .filter(href => /\.json$/.test(href)) ?? []
53
+ );
54
+ }
package/tsconfig.json CHANGED
@@ -1,15 +1,28 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "target": "es2020",
5
- "sourceMap": false,
6
- "alwaysStrict": true,
7
- "noImplicitThis": true,
8
- "noImplicitReturns": true,
9
- "noFallthroughCasesInSwitch": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "strict": true,
12
- "esModuleInterop": true,
13
- "baseUrl": "./",
14
- },
15
- }
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "target": "es2020",
5
+ "sourceMap": false,
6
+ "alwaysStrict": true,
7
+ "noImplicitThis": true,
8
+ "noImplicitReturns": true,
9
+ "noFallthroughCasesInSwitch": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "baseUrl": "./",
14
+ "paths": {
15
+ "@t/*": [
16
+ "./types/*"
17
+ ]
18
+ }
19
+ },
20
+ "include": [
21
+ "types/**/*",
22
+ "test/**/*"
23
+ ],
24
+ "exclude": [
25
+ "jschema",
26
+ "node_modules"
27
+ ]
28
+ }
@@ -0,0 +1,4 @@
1
+ export interface CodeName {
2
+ code: string;
3
+ name: string;
4
+ }
@@ -3,8 +3,8 @@ import { UnitValue } from './unit-value';
3
3
  export type Coordinate<Geo = never> = {
4
4
  latitude: { text: string, value: string };
5
5
  longitude: { text: string, value: string };
6
- height?: UnitValue<'深さ', 'km'>;
7
- condition: undefined;
6
+ height?: UnitValue<'高さ', 'm'>;
7
+ condition: never;
8
8
  geodeticSystem: Geo;
9
9
  } | {
10
10
  latitude: never;
@@ -1,13 +1,13 @@
1
- export type UnitValue<Type = string, Unit = string, Condition = never> = {
2
- type: Type;
3
- unit: Unit;
4
- value: string | null;
5
- condition: Condition
6
- };
7
-
8
- export type UnitValueNotNull<Type = string, Unit = string, Condition = never> = {
9
- type: Type;
10
- unit: Unit;
11
- value: string;
12
- condition: Condition
13
- };
1
+ export type UnitValue<Type = string, Unit = string, Condition = never> = {
2
+ type: Type;
3
+ unit: Unit;
4
+ value: string | null;
5
+ condition: Condition
6
+ };
7
+
8
+ export type UnitValueNotNull<Type = string, Unit = string, Condition = never> = {
9
+ type: Type;
10
+ unit: Unit;
11
+ value: string;
12
+ condition: Condition
13
+ };
package/types/index.d.ts CHANGED
@@ -1,11 +1,57 @@
1
1
  import * as EarthquakeInformation from './schema/earthquake-information';
2
+ import * as EarthquakeExplanation from './schema/earthquake-explanation';
3
+ import * as EarthquakeCounts from './schema/earthquake-counts';
4
+ import * as EarthquakeHypocenterUpdate from './schema/earthquake-hypocenter-update';
5
+ import * as EarthquakeNankai from './schema/earthquake-nankai';
2
6
  import * as EewInformation from './schema/eew-information';
3
- import * as WeatherTyphoon from './schema/eew-information';
4
7
  import * as TsunamiInformation from './schema/tsunami-information';
8
+ import * as VolcanoInformation from './schema/volcano-information';
9
+ import * as WeatherInformation from './schema/weather-information';
10
+ import * as WeatherImpactSociety from './schema/weather-impact-society';
11
+ import * as WeatherEarly from './schema/weather-early';
12
+ import * as WeatherWarning from './schema/weather-warning';
13
+ import * as WeatherTornado from './schema/weather-tornado';
14
+ import * as WeatherTyphoon from './schema/weather-typhoon';
15
+ import * as WeatherLandslide from './schema/weather-landslide';
16
+ import * as WeatherRiverFlood from './schema/weather-river-flood';
17
+ import { TelegramJSONMain } from './main';
18
+
19
+ type All =
20
+ EarthquakeInformation.v1_0_0.Main |
21
+ EarthquakeInformation.v1_1_0.Main |
22
+ EarthquakeExplanation.v1_0_0.Main |
23
+ EarthquakeCounts.v1_0_0.Main |
24
+ EarthquakeHypocenterUpdate.v1_0_0.Main |
25
+ EarthquakeNankai.v1_0_0.Main |
26
+ EewInformation.v1_0_0.Main |
27
+ TsunamiInformation.v1_0_0.Main |
28
+ VolcanoInformation.v1_0_0.Main |
29
+ WeatherInformation.v1_0_0.Main |
30
+ WeatherImpactSociety.v1_0_0.Main |
31
+ WeatherEarly.v1_0_0.Main |
32
+ WeatherWarning.v1_0_0.Main |
33
+ WeatherTornado.v1_0_0.Main |
34
+ WeatherTyphoon.v1_0_0.Main |
35
+ WeatherLandslide.v1_0_0.Main |
36
+ WeatherRiverFlood.v1_0_0.Main;
5
37
 
6
38
  export {
7
39
  EarthquakeInformation,
40
+ EarthquakeExplanation,
41
+ EarthquakeCounts,
42
+ EarthquakeHypocenterUpdate,
43
+ EarthquakeNankai,
8
44
  EewInformation,
9
45
  TsunamiInformation,
10
- WeatherTyphoon
46
+ VolcanoInformation,
47
+ WeatherInformation,
48
+ WeatherImpactSociety,
49
+ WeatherEarly,
50
+ WeatherWarning,
51
+ WeatherTornado,
52
+ WeatherTyphoon,
53
+ WeatherLandslide,
54
+ WeatherRiverFlood,
55
+ TelegramJSONMain,
56
+ All
11
57
  };
@@ -0,0 +1,69 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+
3
+ export namespace EarthquakeCounts {
4
+ export interface Schema {
5
+ type: 'earthquake-counts';
6
+ version: '1.0.0';
7
+ }
8
+
9
+ export interface EarthquakeCountTargetTime {
10
+ start: string;
11
+ end: string;
12
+ }
13
+
14
+ export interface EarthquakeCountValues {
15
+ all: string | null;
16
+ felt: string | null;
17
+ }
18
+
19
+ export interface EarthquakeCount {
20
+ type: '1時間地震回数' | '累積地震回数' | '地震回数';
21
+ targetTime: EarthquakeCountTargetTime;
22
+ values: EarthquakeCountValues;
23
+ }
24
+
25
+ export interface Comments {
26
+ free: string;
27
+ }
28
+
29
+ export interface PublicBody {
30
+ earthquakeCounts?: EarthquakeCount[];
31
+ nextAdvisory?: string;
32
+ text?: string;
33
+ comments?: Comments;
34
+ }
35
+
36
+ export interface CancelBody {
37
+ text: string;
38
+ }
39
+
40
+ export interface Public extends TelegramJSONMain {
41
+ _schema: Schema;
42
+ type: '地震回数に関する情報';
43
+ title: '地震回数に関する情報';
44
+ infoType: '発表' | '訂正';
45
+ targetDateTimeDubious: never;
46
+ targetDuration: never;
47
+ validDateTime: never;
48
+ eventId: string;
49
+ serialNo: string;
50
+ infoKind: '地震回数情報';
51
+ body: PublicBody;
52
+ }
53
+
54
+ export interface Cancel extends TelegramJSONMain {
55
+ _schema: Schema;
56
+ type: '地震回数に関する情報';
57
+ title: '地震回数に関する情報';
58
+ infoType: '取消';
59
+ targetDateTimeDubious: never;
60
+ targetDuration: never;
61
+ validDateTime: never;
62
+ eventId: string;
63
+ serialNo: string;
64
+ infoKind: '地震回数情報';
65
+ body: CancelBody;
66
+ }
67
+
68
+ export type Main = Public | Cancel;
69
+ }
@@ -0,0 +1,7 @@
1
+ import { EarthquakeCounts 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,57 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+
3
+ export namespace EarthquakeExplanation {
4
+ export interface Schema {
5
+ type: 'earthquake-explanation';
6
+ version: '1.0.0';
7
+ }
8
+
9
+ export interface Naming {
10
+ text: string;
11
+ en?: string;
12
+ }
13
+
14
+ export interface Comments {
15
+ free: string;
16
+ }
17
+
18
+ export interface PublicBody {
19
+ naming?: Naming;
20
+ text: string;
21
+ comments?: Comments;
22
+ }
23
+
24
+ export interface CancelBody {
25
+ text: string;
26
+ }
27
+
28
+ export interface Public extends TelegramJSONMain {
29
+ _schema: Schema;
30
+ type: '地震の活動状況等に関する情報';
31
+ title: '地震の活動状況等に関する情報';
32
+ infoType: '発表' | '訂正';
33
+ targetDateTimeDubious: never;
34
+ targetDuration: never;
35
+ validDateTime: never;
36
+ eventId: string;
37
+ serialNo: null;
38
+ infoKind: '地震の活動状況等に関する情報';
39
+ body: PublicBody;
40
+ }
41
+
42
+ export interface Cancel extends TelegramJSONMain {
43
+ _schema: Schema;
44
+ type: '地震の活動状況等に関する情報';
45
+ title: '地震の活動状況等に関する情報';
46
+ infoType: '取消';
47
+ targetDateTimeDubious: never;
48
+ targetDuration: never;
49
+ validDateTime: never;
50
+ eventId: string;
51
+ serialNo: null;
52
+ infoKind: '地震の活動状況等に関する情報';
53
+ body: CancelBody;
54
+ }
55
+
56
+ export type Main = Public | Cancel;
57
+ }
@@ -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,53 @@
1
+ import { TelegramJSONMain } from '@t/main';
2
+ import { Earthquake } from '@t/component/earthquake';
3
+
4
+ export namespace EarthquakeHypocenterUpdate {
5
+ export interface Schema {
6
+ type: 'earthquake-hypocenter-update';
7
+ version: '1.0.0';
8
+ }
9
+
10
+ export interface Comments {
11
+ free: string;
12
+ }
13
+
14
+ export interface PublicBody {
15
+ earthquake: Earthquake;
16
+ text?: string;
17
+ comments?: Comments;
18
+ }
19
+
20
+ export interface CancelBody {
21
+ text: string;
22
+ }
23
+
24
+ export interface Public extends TelegramJSONMain {
25
+ _schema: Schema;
26
+ type: '顕著な地震の震源要素更新のお知らせ';
27
+ title: '顕著な地震の震源要素更新のお知らせ';
28
+ infoType: '発表' | '訂正';
29
+ targetDateTimeDubious: never;
30
+ targetDuration: never;
31
+ validDateTime: never;
32
+ eventId: string;
33
+ serialNo: null;
34
+ infoKind: '震源要素更新のお知らせ';
35
+ body: PublicBody;
36
+ }
37
+
38
+ export interface Cancel extends TelegramJSONMain {
39
+ _schema: Schema;
40
+ type: '顕著な地震の震源要素更新のお知らせ';
41
+ title: '顕著な地震の震源要素更新のお知らせ';
42
+ infoType: '取消';
43
+ targetDateTimeDubious: never;
44
+ targetDuration: never;
45
+ validDateTime: never;
46
+ eventId: string;
47
+ serialNo: null;
48
+ infoKind: '震源要素更新のお知らせ';
49
+ body: CancelBody;
50
+ }
51
+
52
+ export type Main = Public | Cancel;
53
+ }
@@ -0,0 +1,7 @@
1
+ import { EarthquakeHypocenterUpdate as v1_0_0 } from './1.0.0';
2
+
3
+
4
+ export {
5
+ v1_0_0 as Latest,
6
+ v1_0_0
7
+ };