@dmdata/telegram-json-types 1.1.0 → 1.1.4

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 (28) hide show
  1. package/README.md +6 -4
  2. package/dist/jschema/tsunami-information_1.0.0.json +1 -1
  3. package/dist/jschema/volcano-information_1.0.0.json +1 -1
  4. package/dist/jschema/weather-river-flood_1.0.0.json +1 -1
  5. package/dist/jschema/weather-typhoon_1.0.0.json +1 -1
  6. package/package.json +33 -29
  7. package/tsconfig.json +1 -6
  8. package/types/component/{code-name.ts → code-name.d.ts} +0 -0
  9. package/types/component/index.d.ts +14 -0
  10. package/types/index.d.ts +25 -1
  11. package/types/schema/earthquake-counts/1.0.0.d.ts +1 -1
  12. package/types/schema/earthquake-explanation/1.0.0.d.ts +1 -1
  13. package/types/schema/earthquake-hypocenter-update/1.0.0.d.ts +2 -2
  14. package/types/schema/earthquake-information/1.0.0.d.ts +8 -9
  15. package/types/schema/earthquake-information/1.1.0.d.ts +12 -14
  16. package/types/schema/earthquake-nankai/1.0.0.d.ts +3 -3
  17. package/types/schema/earthquake-nankai/index.d.ts +1 -1
  18. package/types/schema/eew-information/1.0.0.d.ts +11 -13
  19. package/types/schema/tsunami-information/1.0.0.d.ts +12 -13
  20. package/types/schema/volcano-information/1.0.0.d.ts +5 -5
  21. package/types/schema/weather-early/1.0.0.d.ts +6 -6
  22. package/types/schema/weather-impact-society/1.0.0.d.ts +7 -7
  23. package/types/schema/weather-information/1.0.0.d.ts +1 -1
  24. package/types/schema/weather-landslide/1.0.0.d.ts +5 -5
  25. package/types/schema/weather-river-flood/1.0.0.d.ts +22 -18
  26. package/types/schema/weather-tornado/1.0.0.d.ts +5 -5
  27. package/types/schema/weather-typhoon/1.0.0.d.ts +12 -13
  28. package/types/schema/weather-warning/1.0.0.d.ts +13 -13
@@ -1 +1 @@
1
- {"type":"object","properties":{"_schema":{"$ref":"#/definitions/WeatherTyphoon.Schema"},"type":{"enum":["台風解析・予報情報(3日予報)","台風解析・予報情報(5日予報)","台風解析・予報情報(5日予報)(H30)"],"type":"string"},"title":{"type":"string","enum":["台風解析・予報情報"]},"targetDuration":{"type":"string"},"infoKind":{"enum":["台風解析・予報情報(3日予報)","台風解析・予報情報(5日予報)"],"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoType":{"enum":["取消","発表","訂正"],"type":"string"},"headline":{"type":"null"},"body":{"$ref":"#/definitions/WeatherTyphoon.PublicBody"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"targetDateTime":{"type":"string"},"infoKindVersion":{"type":"string"}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","targetDuration","title","type"],"definitions":{"WeatherTyphoon.Schema":{"type":"object","properties":{"type":{"type":"string","enum":["weather-typhoon"]},"version":{"type":"string","enum":["1.0.0"]}},"required":["type","version"]},"WeatherTyphoon.PublicBody":{"type":"object","properties":{"typhoon":{"$ref":"#/definitions/WeatherTyphoon.Typhoon"},"forecasts":{"anyOf":[{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":1,"maxItems":1},{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":1,"additionalItems":{"$ref":"#/definitions/WeatherTyphoon.Forecast"}},{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"},{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":2,"maxItems":2},{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"},{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":2,"additionalItems":{"$ref":"#/definitions/WeatherTyphoon.Forecast"}}]}},"required":["forecasts","typhoon"]},"WeatherTyphoon.Typhoon":{"type":"object","properties":{"tcNumber":{"type":"string"},"name":{"$ref":"#/definitions/WeatherTyphoon.TyphoonName"},"remark":{"anyOf":[{"enum":["台風消滅(域外へ出る)","台風消滅(温帯低気圧化)","台風消滅(熱帯低気圧化)","台風発生","台風発生の可能性が小さくなった","台風発生予想","台風発生(域外から入る)","温帯低気圧化しつつある","発表間隔変更(毎時から3時間毎)","発表間隔変更(3時間毎から毎時)"],"type":"string"},{"type":"null"}]}},"required":["name","remark","tcNumber"]},"WeatherTyphoon.TyphoonName":{"type":"object","properties":{"text":{"type":["null","string"]},"kana":{"type":["null","string"]},"number":{"type":["null","string"]}},"required":["kana","number","text"]},"WeatherTyphoon.RealState":{"type":"object","properties":{"type":{"enum":["実況","推定"],"type":"string"},"elapsedTime":{"enum":["PT0H","PT1H"],"type":"string"},"dateTime":{"type":"string"},"classification":{"$ref":"#/definitions/WeatherTyphoon.RealStateClassification"},"center":{"$ref":"#/definitions/WeatherTyphoon.RealStateCenter"},"wind":{"$ref":"#/definitions/WeatherTyphoon.RealStateWind"}},"required":["center","classification","dateTime","elapsedTime","type"]},"WeatherTyphoon.RealStateClassification":{"type":"object","properties":{"category":{"anyOf":[{"enum":["Hurricane","LOW","STS","TD","TS","TY","Tropical Storm"],"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"enum":["ハリケーン","台風","温帯低気圧","熱帯低気圧","発達した熱帯低気圧"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"enum":["大型","超大型"],"type":"string"},{"type":"null"}]},"intensity":{"anyOf":[{"enum":["強い","猛烈な","非常に強い"],"type":"string"},{"type":"null"}]}},"required":["area","category","intensity","name"]},"WeatherTyphoon.RealStateCenter":{"type":"object","properties":{"coordinate":{"anyOf":[{"type":"object","properties":{"condition":{"type":"string","enum":["不明"]}},"required":["condition"]},{"type":"object","properties":{"latitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"longitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"height":{"type":"object","properties":{"type":{"type":"string","enum":["高さ"]},"unit":{"type":"string","enum":["m"]},"value":{"type":["null","string"]}},"required":["type","unit","value"]}},"required":["latitude","longitude"]}]},"location":{"type":["null","string"]},"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"speed":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"enum":["ほとんど停滞","ゆっくり"],"type":"string"}},"required":["condition","value"]}]}]},"pressure":{"type":"object","properties":{"type":{"type":"string","enum":["中心気圧"]},"unit":{"type":"string","enum":["hPa"]},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["coordinate","direction","location","pressure","speed"]},"WeatherTyphoon.Direction":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","string"]},"azimuth":{"type":["null","string"]},"condition":{"type":"string"}},"required":["azimuth","type","unit","value"]},"WeatherTyphoon.RealStateWind":{"type":"object","properties":{"average":{"type":"object","properties":{"type":{"type":"string","enum":["最大風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"},"condition":{"$ref":"#/definitions/Condition"}},"required":["condition","type","unit","value"]},"instantaneous":{"type":"object","properties":{"type":{"type":"string","enum":["最大瞬間風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"}},"required":["type","unit","value"]},"area":{"$ref":"#/definitions/WeatherTyphoon.RealStateWindArea"}},"required":["area","average","instantaneous"]},"Condition":{"enum":["なし","中心付近","中心付近を除く"],"type":"string"},"WeatherTyphoon.RealStateWindArea":{"type":"object","properties":{"strong":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}},"storm":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}}},"required":["storm","strong"]},"WeatherTyphoon.Axis":{"type":"object","properties":{"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"radius":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["direction","radius"]},"WeatherTyphoon.Forecast":{"type":"object","properties":{"type":{"enum":["予報","延長予報"],"type":"string"},"elapsedTime":{"type":"string"},"dateTime":{"type":"string"},"classification":{"$ref":"#/definitions/WeatherTyphoon.ForecastClassification"},"center":{"allOf":[{"type":"object","properties":{"probabilityCircle":{"type":"object","properties":{"basePoint":{"anyOf":[{"type":"object","properties":{"condition":{"type":"string","enum":["不明"]}},"required":["condition"]},{"type":"object","properties":{"latitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"longitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"height":{"type":"object","properties":{"type":{"type":"string","enum":["高さ"]},"unit":{"type":"string","enum":["m"]},"value":{"type":["null","string"]}},"required":["type","unit","value"]}},"required":["latitude","longitude"]}]},"axes":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}}},"required":["axes","basePoint"]}},"required":["probabilityCircle"]},{"$ref":"#/definitions/Omit<WeatherTyphoon.RealStateCenter,\"coordinate\">"}]},"wind":{"$ref":"#/definitions/WeatherTyphoon.ForecastWind"}},"required":["center","classification","dateTime","elapsedTime","type","wind"]},"WeatherTyphoon.ForecastClassification":{"type":"object","properties":{"name":{"anyOf":[{"enum":["ハリケーン","台風","温帯低気圧","熱帯低気圧","発達した熱帯低気圧"],"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"enum":["Hurricane","LOW","STS","TD","TS","TY","Tropical Storm"],"type":"string"},{"type":"null"}]},"intensity":{"anyOf":[{"enum":["強い","猛烈な","非常に強い"],"type":"string"},{"type":"null"}]}},"required":["category","intensity","name"]},"Omit<WeatherTyphoon.RealStateCenter,\"coordinate\">":{"type":"object","properties":{"location":{"type":["null","string"]},"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"speed":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"enum":["ほとんど停滞","ゆっくり"],"type":"string"}},"required":["condition","value"]}]}]},"pressure":{"type":"object","properties":{"type":{"type":"string","enum":["中心気圧"]},"unit":{"type":"string","enum":["hPa"]},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["direction","location","pressure","speed"]},"WeatherTyphoon.ForecastWind":{"type":"object","properties":{"average":{"type":"object","properties":{"type":{"type":"string","enum":["最大風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"},"condition":{"$ref":"#/definitions/Condition"}},"required":["condition","type","unit","value"]},"instantaneous":{"type":"object","properties":{"type":{"type":"string","enum":["最大瞬間風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"}},"required":["type","unit","value"]},"area":{"$ref":"#/definitions/WeatherTyphoon.ForecastWindArea"}},"required":["area","average","instantaneous"]},"WeatherTyphoon.ForecastWindArea":{"type":"object","properties":{"stormWarning":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}}},"required":["stormWarning"]}},"$schema":"http://json-schema.org/draft-07/schema#"}
1
+ {"type":"object","properties":{"_schema":{"$ref":"#/definitions/WeatherTyphoon.Schema"},"type":{"enum":["台風解析・予報情報(3日予報)","台風解析・予報情報(5日予報)","台風解析・予報情報(5日予報)(H30)"],"type":"string"},"title":{"type":"string","enum":["台風解析・予報情報"]},"targetDuration":{"type":"string"},"infoKind":{"enum":["台風解析・予報情報(3日予報)","台風解析・予報情報(5日予報)"],"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoType":{"enum":["取消","発表","訂正"],"type":"string"},"headline":{"type":"null"},"body":{"$ref":"#/definitions/WeatherTyphoon.PublicBody"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"targetDateTime":{"type":"string"},"infoKindVersion":{"type":"string"}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","targetDuration","title","type"],"definitions":{"WeatherTyphoon.Schema":{"type":"object","properties":{"type":{"type":"string","enum":["weather-typhoon"]},"version":{"type":"string","enum":["1.0.0"]}},"required":["type","version"]},"WeatherTyphoon.PublicBody":{"type":"object","properties":{"typhoon":{"$ref":"#/definitions/WeatherTyphoon.Typhoon"},"forecasts":{"anyOf":[{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":1,"maxItems":1},{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":1,"additionalItems":{"$ref":"#/definitions/WeatherTyphoon.Forecast"}},{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"},{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":2,"maxItems":2},{"type":"array","items":[{"$ref":"#/definitions/WeatherTyphoon.RealState"},{"$ref":"#/definitions/WeatherTyphoon.RealState"}],"minItems":2,"additionalItems":{"$ref":"#/definitions/WeatherTyphoon.Forecast"}}]}},"required":["forecasts","typhoon"]},"WeatherTyphoon.Typhoon":{"type":"object","properties":{"tcNumber":{"type":"string"},"name":{"$ref":"#/definitions/WeatherTyphoon.TyphoonName"},"remark":{"anyOf":[{"enum":["台風消滅(域外へ出る)","台風消滅(温帯低気圧化)","台風消滅(熱帯低気圧化)","台風発生","台風発生の可能性が小さくなった","台風発生予想","台風発生(域外から入る)","温帯低気圧化しつつある","発表間隔変更(毎時から3時間毎)","発表間隔変更(3時間毎から毎時)"],"type":"string"},{"type":"null"}]}},"required":["name","remark","tcNumber"]},"WeatherTyphoon.TyphoonName":{"type":"object","properties":{"text":{"type":["null","string"]},"kana":{"type":["null","string"]},"number":{"type":["null","string"]}},"required":["kana","number","text"]},"WeatherTyphoon.RealState":{"type":"object","properties":{"type":{"enum":["実況","推定"],"type":"string"},"elapsedTime":{"enum":["PT0H","PT1H"],"type":"string"},"dateTime":{"type":"string"},"classification":{"$ref":"#/definitions/WeatherTyphoon.RealStateClassification"},"center":{"$ref":"#/definitions/WeatherTyphoon.RealStateCenter"},"wind":{"$ref":"#/definitions/WeatherTyphoon.RealStateWind"}},"required":["center","classification","dateTime","elapsedTime","type"]},"WeatherTyphoon.RealStateClassification":{"type":"object","properties":{"category":{"anyOf":[{"enum":["Hurricane","LOW","STS","TD","TS","TY","Tropical Storm"],"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"enum":["ハリケーン","台風","温帯低気圧","熱帯低気圧","発達した熱帯低気圧"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"enum":["大型","超大型"],"type":"string"},{"type":"null"}]},"intensity":{"anyOf":[{"enum":["強い","猛烈な","非常に強い"],"type":"string"},{"type":"null"}]}},"required":["area","category","intensity","name"]},"WeatherTyphoon.RealStateCenter":{"type":"object","properties":{"coordinate":{"anyOf":[{"type":"object","properties":{"condition":{"type":"string","enum":["不明"]}},"required":["condition"]},{"type":"object","properties":{"latitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"longitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"height":{"type":"object","properties":{"type":{"type":"string","enum":["高さ"]},"unit":{"type":"string","enum":["m"]},"value":{"type":["null","string"]}},"required":["type","unit","value"]}},"required":["latitude","longitude"]}]},"location":{"type":["null","string"]},"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"speed":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"enum":["ほとんど停滞","ゆっくり"],"type":"string"}},"required":["condition","value"]}]}]},"pressure":{"type":"object","properties":{"type":{"type":"string","enum":["中心気圧"]},"unit":{"type":"string","enum":["hPa"]},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["coordinate","direction","location","pressure","speed"]},"WeatherTyphoon.Direction":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","string"]},"azimuth":{"type":["null","string"]},"condition":{"type":"string"}},"required":["azimuth","type","unit","value"]},"WeatherTyphoon.RealStateWind":{"type":"object","properties":{"average":{"type":"object","properties":{"type":{"type":"string","enum":["最大風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"},"condition":{"$ref":"#/definitions/Condition"}},"required":["condition","type","unit","value"]},"instantaneous":{"type":"object","properties":{"type":{"type":"string","enum":["最大瞬間風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"}},"required":["type","unit","value"]},"area":{"$ref":"#/definitions/WeatherTyphoon.RealStateWindArea"}},"required":["average","instantaneous"]},"Condition":{"enum":["なし","中心付近","中心付近を除く"],"type":"string"},"WeatherTyphoon.RealStateWindArea":{"type":"object","properties":{"strong":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}},"storm":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}}},"required":["storm","strong"]},"WeatherTyphoon.Axis":{"type":"object","properties":{"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"radius":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["direction","radius"]},"WeatherTyphoon.Forecast":{"type":"object","properties":{"type":{"enum":["予報","延長予報"],"type":"string"},"elapsedTime":{"type":"string"},"dateTime":{"type":"string"},"classification":{"$ref":"#/definitions/WeatherTyphoon.ForecastClassification"},"center":{"allOf":[{"type":"object","properties":{"probabilityCircle":{"type":"object","properties":{"basePoint":{"anyOf":[{"type":"object","properties":{"condition":{"type":"string","enum":["不明"]}},"required":["condition"]},{"type":"object","properties":{"latitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"longitude":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"string"}},"required":["text","value"]},"height":{"type":"object","properties":{"type":{"type":"string","enum":["高さ"]},"unit":{"type":"string","enum":["m"]},"value":{"type":["null","string"]}},"required":["type","unit","value"]}},"required":["latitude","longitude"]}]},"axes":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}}},"required":["axes","basePoint"]}},"required":["probabilityCircle"]},{"$ref":"#/definitions/Omit<WeatherTyphoon.RealStateCenter,\"coordinate\">"}]},"wind":{"$ref":"#/definitions/WeatherTyphoon.ForecastWind"}},"required":["center","classification","dateTime","elapsedTime","type","wind"]},"WeatherTyphoon.ForecastClassification":{"type":"object","properties":{"name":{"anyOf":[{"enum":["ハリケーン","台風","温帯低気圧","熱帯低気圧","発達した熱帯低気圧"],"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"enum":["Hurricane","LOW","STS","TD","TS","TY","Tropical Storm"],"type":"string"},{"type":"null"}]},"intensity":{"anyOf":[{"enum":["強い","猛烈な","非常に強い"],"type":"string"},{"type":"null"}]}},"required":["category","intensity","name"]},"Omit<WeatherTyphoon.RealStateCenter,\"coordinate\">":{"type":"object","properties":{"location":{"type":["null","string"]},"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"speed":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["移動速度"]},"unit":{"type":"string","enum":["km/h"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"enum":["ほとんど停滞","ゆっくり"],"type":"string"}},"required":["condition","value"]}]}]},"pressure":{"type":"object","properties":{"type":{"type":"string","enum":["中心気圧"]},"unit":{"type":"string","enum":["hPa"]},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["direction","location","pressure","speed"]},"WeatherTyphoon.ForecastWind":{"type":"object","properties":{"average":{"type":"object","properties":{"type":{"type":"string","enum":["最大風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"},"condition":{"$ref":"#/definitions/Condition"}},"required":["condition","type","unit","value"]},"instantaneous":{"type":"object","properties":{"type":{"type":"string","enum":["最大瞬間風速"]},"unit":{"type":"string","enum":["m/s"]},"value":{"type":"string"}},"required":["type","unit","value"]},"area":{"$ref":"#/definitions/WeatherTyphoon.ForecastWindArea"}},"required":["average","instantaneous"]},"WeatherTyphoon.ForecastWindArea":{"type":"object","properties":{"stormWarning":{"type":"array","items":{"$ref":"#/definitions/WeatherTyphoon.Axis"}}},"required":["stormWarning"]}},"$schema":"http://json-schema.org/draft-07/schema#"}
package/package.json CHANGED
@@ -1,29 +1,33 @@
1
- {
2
- "name": "@dmdata/telegram-json-types",
3
- "version": "1.1.0",
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
- "types": "index.d.ts",
13
- "main": "./dist/jschema-load.js",
14
- "keywords": [],
15
- "author": "",
16
- "license": "MIT",
17
- "devDependencies": {
18
- "@types/jest": "^27.4.0",
19
- "@types/node": "^14.18.9",
20
- "@types/node-fetch": "^2.5.12",
21
- "ajv": "^8.9.0",
22
- "jest": "^27.4.7",
23
- "node-fetch": "^2.6.7",
24
- "ts-jest": "^27.1.3",
25
- "ts-node": "^10.4.0",
26
- "typescript": "^4.5.5",
27
- "typescript-json-schema": "^0.53.0"
28
- }
29
- }
1
+ {
2
+ "name": "@dmdata/telegram-json-types",
3
+ "version": "1.1.4",
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
+ }
package/tsconfig.json CHANGED
@@ -10,12 +10,7 @@
10
10
  "forceConsistentCasingInFileNames": true,
11
11
  "strict": true,
12
12
  "esModuleInterop": true,
13
- "baseUrl": "./",
14
- "paths": {
15
- "@t/*": [
16
- "./types/*"
17
- ]
18
- }
13
+ "baseUrl": "./"
19
14
  },
20
15
  "include": [
21
16
  "types/**/*",
File without changes
@@ -0,0 +1,14 @@
1
+ import { CodeName } from './code-name';
2
+ import { Coordinate } from './coordinate';
3
+ import { Earthquake } from './earthquake';
4
+ import { UnitValue, UnitValueNotNull } from './unit-value';
5
+
6
+ export namespace Components {
7
+ export {
8
+ CodeName,
9
+ Coordinate,
10
+ Earthquake,
11
+ UnitValue,
12
+ UnitValueNotNull
13
+ };
14
+ }
package/types/index.d.ts CHANGED
@@ -14,6 +14,27 @@ 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 { TelegramJSONMain } from './main';
18
+ import { Components } from './component';
19
+
20
+ type All =
21
+ EarthquakeInformation.v1_0_0.Main |
22
+ EarthquakeInformation.v1_1_0.Main |
23
+ EarthquakeExplanation.v1_0_0.Main |
24
+ EarthquakeCounts.v1_0_0.Main |
25
+ EarthquakeHypocenterUpdate.v1_0_0.Main |
26
+ EarthquakeNankai.v1_0_0.Main |
27
+ EewInformation.v1_0_0.Main |
28
+ TsunamiInformation.v1_0_0.Main |
29
+ VolcanoInformation.v1_0_0.Main |
30
+ WeatherInformation.v1_0_0.Main |
31
+ WeatherImpactSociety.v1_0_0.Main |
32
+ WeatherEarly.v1_0_0.Main |
33
+ WeatherWarning.v1_0_0.Main |
34
+ WeatherTornado.v1_0_0.Main |
35
+ WeatherTyphoon.v1_0_0.Main |
36
+ WeatherLandslide.v1_0_0.Main |
37
+ WeatherRiverFlood.v1_0_0.Main;
17
38
 
18
39
  export {
19
40
  EarthquakeInformation,
@@ -31,5 +52,8 @@ export {
31
52
  WeatherTornado,
32
53
  WeatherTyphoon,
33
54
  WeatherLandslide,
34
- WeatherRiverFlood
55
+ WeatherRiverFlood,
56
+ TelegramJSONMain,
57
+ Components,
58
+ All
35
59
  };
@@ -1,4 +1,4 @@
1
- import { TelegramJSONMain } from '@t/main';
1
+ import { TelegramJSONMain } from '../../main';
2
2
 
3
3
  export namespace EarthquakeCounts {
4
4
  export interface Schema {
@@ -1,4 +1,4 @@
1
- import { TelegramJSONMain } from '@t/main';
1
+ import { TelegramJSONMain } from '../../main';
2
2
 
3
3
  export namespace EarthquakeExplanation {
4
4
  export interface Schema {
@@ -1,5 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { Earthquake } from '@t/component/earthquake';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Earthquake } from '../../component/earthquake';
3
3
 
4
4
  export namespace EarthquakeHypocenterUpdate {
5
5
  export interface Schema {
@@ -1,6 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { CodeName } from '@t/component/code-name';
3
- import { Earthquake } from '@t/component/earthquake';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component/';
4
3
 
5
4
  export namespace EarthquakeInformation {
6
5
  export interface Schema {
@@ -10,22 +9,22 @@ export namespace EarthquakeInformation {
10
9
 
11
10
  export type IntensityClass = '1' | '2' | '3' | '4' | '5-' | '5+' | '6-' | '6+' | '7';
12
11
 
13
- export interface IntensityMaxInt extends CodeName {
12
+ export interface IntensityMaxInt extends Components.CodeName {
14
13
  maxInt: IntensityClass;
15
14
  }
16
15
 
17
- export interface IntensityMaxIntOnRevise extends CodeName {
16
+ export interface IntensityMaxIntOnRevise extends Components.CodeName {
18
17
  maxInt?: IntensityClass;
19
18
  revise?: '上方修正' | '追加';
20
19
  }
21
20
 
22
- export interface IntensityCity extends CodeName {
21
+ export interface IntensityCity extends Components.CodeName {
23
22
  maxInt?: IntensityClass;
24
23
  revise?: '上方修正' | '追加';
25
24
  condition?: '震度5弱以上未入電';
26
25
  }
27
26
 
28
- export interface IntensityStation extends CodeName {
27
+ export interface IntensityStation extends Components.CodeName {
29
28
  int: IntensityClass | '!5-';
30
29
  revise?: '上方修正' | '追加';
31
30
  condition?: '震度5弱以上未入電';
@@ -66,13 +65,13 @@ export namespace EarthquakeInformation {
66
65
  }
67
66
 
68
67
  export interface PublicBodyVXSE52 {
69
- earthquake: Earthquake;
68
+ earthquake: Components.Earthquake;
70
69
  text?: string;
71
70
  comments: Omit<Comment, 'var'>;
72
71
  }
73
72
 
74
73
  export interface PublicBodyVXSE53 {
75
- earthquake: Earthquake;
74
+ earthquake: Components.Earthquake;
76
75
  intensity?: IntensityVXSE53;
77
76
  text?: string;
78
77
  comments: Comment;
@@ -1,7 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { CodeName } from '@t/component/code-name';
3
- import { Earthquake } from '@t/component/earthquake';
4
- import { UnitValueNotNull } from '@t/component/unit-value';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component/';
5
3
 
6
4
  export namespace EarthquakeInformation {
7
5
  export interface Schema {
@@ -13,22 +11,22 @@ export namespace EarthquakeInformation {
13
11
  export type LpgmIntensityClass = '0' | '1' | '2' | '3' | '4';
14
12
  export type LpgmCategory = '1' | '2' | '3' | '4';
15
13
 
16
- export interface IntensityMaxInt extends CodeName {
14
+ export interface IntensityMaxInt extends Components.CodeName {
17
15
  maxInt: IntensityClass;
18
16
  }
19
17
 
20
- export interface IntensityMaxIntOnRevise extends CodeName {
18
+ export interface IntensityMaxIntOnRevise extends Components.CodeName {
21
19
  maxInt?: IntensityClass;
22
20
  revise?: '上方修正' | '追加';
23
21
  }
24
22
 
25
- export interface IntensityCity extends CodeName {
23
+ export interface IntensityCity extends Components.CodeName {
26
24
  maxInt?: IntensityClass;
27
25
  revise?: '上方修正' | '追加';
28
26
  condition?: '震度5弱以上未入電';
29
27
  }
30
28
 
31
- export interface IntensityStation extends CodeName {
29
+ export interface IntensityStation extends Components.CodeName {
32
30
  int: IntensityClass | '!5-';
33
31
  revise?: '上方修正' | '追加';
34
32
  condition?: '震度5弱以上未入電';
@@ -38,13 +36,13 @@ export namespace EarthquakeInformation {
38
36
  maxLpgmInt: LpgmIntensityClass;
39
37
  };
40
38
  export type IntensityLpgmStationPrePeriod = {
41
- periodicBand: UnitValueNotNull<never, '秒台'>;
39
+ periodicBand: Components.UnitValueNotNull<never, '秒台'>;
42
40
  lpgmInt: LpgmIntensityClass;
43
- sva: UnitValueNotNull<never, 'cm/s'>;
41
+ sva: Components.UnitValueNotNull<never, 'cm/s'>;
44
42
  };
45
43
  export type IntensityLpgmStation = IntensityStation & {
46
44
  lpgmInt: LpgmIntensityClass;
47
- sva: UnitValueNotNull<never, 'cm/s'>;
45
+ sva: Components.UnitValueNotNull<never, 'cm/s'>;
48
46
  prePeriods: IntensityLpgmStationPrePeriod[];
49
47
  }
50
48
 
@@ -92,20 +90,20 @@ export namespace EarthquakeInformation {
92
90
  }
93
91
 
94
92
  export interface PublicBodyVXSE52 {
95
- earthquake: Earthquake;
93
+ earthquake: Components.Earthquake;
96
94
  text?: string;
97
95
  comments: Omit<Comment, 'var'>;
98
96
  }
99
97
 
100
98
  export interface PublicBodyVXSE53 {
101
- earthquake: Earthquake;
99
+ earthquake: Components.Earthquake;
102
100
  intensity?: IntensityVXSE53;
103
101
  text?: string;
104
102
  comments: Comment;
105
103
  }
106
104
 
107
105
  export interface PublicBodyVXSE62 {
108
- earthquake: Earthquake;
106
+ earthquake: Components.Earthquake;
109
107
  intensity?: IntensityVXSE62;
110
108
  text?: string;
111
109
  comments: Comment;
@@ -1,5 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { CodeName } from '@t/component/code-name';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
3
 
4
4
  export namespace EarthquakeNankai {
5
5
  export interface Schema {
@@ -7,7 +7,7 @@ export namespace EarthquakeNankai {
7
7
  version: '1.0.0';
8
8
  }
9
9
 
10
- export interface EarthquakeInfoKind extends CodeName{
10
+ export interface EarthquakeInfoKind extends Components.CodeName {
11
11
  }
12
12
 
13
13
  export interface EarthquakeInfo {
@@ -1,4 +1,4 @@
1
- import { EarthquakeExplanation as v1_0_0 } from './1.0.0';
1
+ import { EarthquakeNankai as v1_0_0 } from './1.0.0';
2
2
 
3
3
 
4
4
  export {
@@ -1,7 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { CodeName } from '@t/component/code-name';
3
- import { Coordinate } from '@t/component/coordinate';
4
- import { UnitValueNotNull } from '@t/component/unit-value';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
5
3
 
6
4
 
7
5
  export namespace EewInformation {
@@ -13,18 +11,18 @@ export namespace EewInformation {
13
11
  export type IntensityClass = '0' | '1' | '2' | '3' | '4' | '5-' | '5+' | '6-' | '6+' | '7';
14
12
  export type LpgmIntensityClass = '0' | '1' | '2' | '3' | '4';
15
13
 
16
- export interface WarningAreaKindLastKind extends CodeName {
14
+ export interface WarningAreaKindLastKind extends Components.CodeName {
17
15
  }
18
16
 
19
- export interface WarningAreaKind extends CodeName {
17
+ export interface WarningAreaKind extends Components.CodeName {
20
18
  lastKind: WarningAreaKindLastKind;
21
19
  }
22
20
 
23
- export interface WarningArea extends CodeName {
21
+ export interface WarningArea extends Components.CodeName {
24
22
  kind: WarningAreaKind;
25
23
  }
26
24
 
27
- export interface EarthquakeHypocenterReduce extends CodeName {
25
+ export interface EarthquakeHypocenterReduce extends Components.CodeName {
28
26
  }
29
27
 
30
28
  export interface EarthquakeHypocenterAccuracy {
@@ -37,9 +35,9 @@ export namespace EewInformation {
37
35
  numberOfMagnitudeCalculation: '0' | '1' | '2' | '3' | '4' | '5';
38
36
  }
39
37
 
40
- export interface EarthquakeHypocenter extends CodeName {
41
- coordinate: Coordinate<'日本測地系'>;
42
- depth: UnitValueNotNull<'深さ', 'km'>;
38
+ export interface EarthquakeHypocenter extends Components.CodeName {
39
+ coordinate: Components.Coordinate<'日本測地系'>;
40
+ depth: Components.UnitValueNotNull<'深さ', 'km'>;
43
41
  reduce: EarthquakeHypocenterReduce;
44
42
  landOrSea?: '内陸' | '海域';
45
43
  accuracy: EarthquakeHypocenterAccuracy;
@@ -76,10 +74,10 @@ export namespace EewInformation {
76
74
  maxIntChangeReason: '0' | '1' | '2' | '3' | '4' | '9';
77
75
  }
78
76
 
79
- export interface IntensityRegionKind extends CodeName {
77
+ export interface IntensityRegionKind extends Components.CodeName {
80
78
  }
81
79
 
82
- export interface IntensityRegion extends CodeName {
80
+ export interface IntensityRegion extends Components.CodeName {
83
81
  forecastMaxInt: IntensityForecastMaxInt;
84
82
  forecastLpgmMaxInt?: IntensityForecastLpgmMaxInt;
85
83
  kind: IntensityRegionKind;
@@ -1,6 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { CodeName } from '@t/component/code-name';
3
- import { Earthquake } from '@t/component/earthquake';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
4
3
 
5
4
 
6
5
  export namespace TsunamiInformation {
@@ -9,10 +8,10 @@ export namespace TsunamiInformation {
9
8
  version: '1.0.0';
10
9
  }
11
10
 
12
- export interface TsunamiForecastKindLastKind extends CodeName {
11
+ export interface TsunamiForecastKindLastKind extends Components.CodeName {
13
12
  }
14
13
 
15
- export interface TsunamiForecastKind extends CodeName {
14
+ export interface TsunamiForecastKind extends Components.CodeName {
16
15
  lastKind: TsunamiForecastKindLastKind;
17
16
  }
18
17
 
@@ -46,12 +45,12 @@ export namespace TsunamiInformation {
46
45
  revise?: '追加' | '更新';
47
46
  }
48
47
 
49
- export interface TsunamiForecastStation extends CodeName {
48
+ export interface TsunamiForecastStation extends Components.CodeName {
50
49
  highTideDateTime: string;
51
50
  firstHeight: TsunamiForecastFirstHeight;
52
51
  }
53
52
 
54
- export interface TsunamiForecast extends CodeName {
53
+ export interface TsunamiForecast extends Components.CodeName {
55
54
  kind: TsunamiForecastKind;
56
55
  firstHeight?: TsunamiForecastFirstHeight;
57
56
  maxHeight?: TsunamiForecastMaxHeight;
@@ -68,7 +67,7 @@ export namespace TsunamiInformation {
68
67
 
69
68
  export type TsunamiObservationStationFirstHeight = ({
70
69
  arrivalTime: string;
71
- initial: '押し' | '引き';
70
+ initial?: '押し' | '引き';
72
71
  condition: never;
73
72
  } | {
74
73
  arrivalTime: never;
@@ -104,7 +103,7 @@ export namespace TsunamiInformation {
104
103
  revise?: '追加' | '更新';
105
104
  }
106
105
 
107
- export interface TsunamiObservationStation extends CodeName {
106
+ export interface TsunamiObservationStation extends Components.CodeName {
108
107
  sensor?: string;
109
108
  firstHeight: TsunamiObservationStationFirstHeight;
110
109
  maxHeight: TsunamiObservationStationMaxHeight;
@@ -148,7 +147,7 @@ export namespace TsunamiInformation {
148
147
  revise?: '追加' | '更新';
149
148
  };
150
149
 
151
- export interface TsunamiEstimation extends CodeName {
150
+ export interface TsunamiEstimation extends Components.CodeName {
152
151
  firstHeight: TsunamiEstimationFirstHeight;
153
152
  maxHeight: TsunamiEstimationMaxHeight;
154
153
  }
@@ -181,21 +180,21 @@ export namespace TsunamiInformation {
181
180
 
182
181
  export interface PublicBodyVTSE41 {
183
182
  tsunami: PublicBodyVTSE41Tsunami;
184
- earthquakes: Earthquake[];
183
+ earthquakes: Components.Earthquake[];
185
184
  text?: string;
186
185
  comments?: Comment;
187
186
  }
188
187
 
189
188
  export interface PublicBodyVTSE51 {
190
189
  tsunami: PublicBodyVTSE51Tsunami;
191
- earthquakes: Earthquake[];
190
+ earthquakes: Components.Earthquake[];
192
191
  text?: string;
193
192
  comments?: Comment;
194
193
  }
195
194
 
196
195
  export interface PublicBodyVTSE52 {
197
196
  tsunami: PublicBodyVTSE52Tsunami;
198
- earthquakes: Earthquake[];
197
+ earthquakes: Components.Earthquake[];
199
198
  text?: string;
200
199
  comments?: Comment;
201
200
  }
@@ -1,5 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { Coordinate } from '@t/component/coordinate';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
3
 
4
4
  export namespace VolcanoInformation {
5
5
  export interface Schema {
@@ -7,7 +7,7 @@ export namespace VolcanoInformation {
7
7
  version: '1.0.0';
8
8
  }
9
9
 
10
- export type VolcanoCoordinate = Required<Coordinate>;
10
+ export type VolcanoCoordinate = Required<Components.Coordinate>;
11
11
  export type Direction8 = '北' | '北東' | '東' | '南東' | '南' | '南西' | '西' | '北西';
12
12
 
13
13
  export interface TargetCrater {
@@ -129,7 +129,7 @@ export namespace VolcanoInformation {
129
129
  unit: 'm';
130
130
  } & ({
131
131
  value: string;
132
- condition?: '以上';
132
+ condition?: string;
133
133
  } | {
134
134
  value: null;
135
135
  condition?: '噴煙なし' | '不明';
@@ -140,7 +140,7 @@ export namespace VolcanoInformation {
140
140
  unit: 'ft';
141
141
  } & ({
142
142
  value: string;
143
- condition?: '以上';
143
+ condition?: string;
144
144
  } | {
145
145
  value: null;
146
146
  condition?: '噴煙なし' | '不明';
@@ -1,5 +1,5 @@
1
- import { TelegramJSONMain } from '@t/main';
2
- import { CodeName } from '@t/component/code-name';
1
+ import { TelegramJSONMain } from '../../main';
2
+ import { Components } from '../../component';
3
3
 
4
4
  export namespace WeatherEarly {
5
5
  export interface Schema {
@@ -7,7 +7,7 @@ export namespace WeatherEarly {
7
7
  version: '1.0.0';
8
8
  }
9
9
 
10
- export interface Target extends CodeName {
10
+ export interface Target extends Components.CodeName {
11
11
  }
12
12
 
13
13
  export interface TargetTimeDateTime {
@@ -20,7 +20,7 @@ export namespace WeatherEarly {
20
20
  duration?: string;
21
21
  }
22
22
 
23
- export interface MainTextZone extends CodeName {
23
+ export interface MainTextZone extends Components.CodeName {
24
24
  }
25
25
 
26
26
 
@@ -47,13 +47,13 @@ export namespace WeatherEarly {
47
47
  condition?: string;
48
48
  }
49
49
 
50
- export interface StatisticStation extends CodeName {
50
+ export interface StatisticStation extends Components.CodeName {
51
51
  type: '天候の状況(速報値)';
52
52
  observedValues: StatisticStationObservedValue[];
53
53
  }
54
54
 
55
55
 
56
- export interface EarlyBaseZone extends CodeName {
56
+ export interface EarlyBaseZone extends Components.CodeName {
57
57
  }
58
58
 
59
59
  export interface EarlyBase {