@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 @@
1
+ {"anyOf":[{"$ref":"#/definitions/VolcanoInformation.PublicVFVO50"},{"$ref":"#/definitions/VolcanoInformation.PublicVFVO51"},{"$ref":"#/definitions/VolcanoInformation.PublicVFVO52"},{"$ref":"#/definitions/VolcanoInformation.PublicVFVO53"},{"$ref":"#/definitions/VolcanoInformation.PublicVFVO54"},{"$ref":"#/definitions/VolcanoInformation.PublicVFVO55"},{"$ref":"#/definitions/VolcanoInformation.PublicVFVO56"},{"$ref":"#/definitions/VolcanoInformation.PublicVFSVii"},{"$ref":"#/definitions/VolcanoInformation.PublicVZVO40"},{"$ref":"#/definitions/VolcanoInformation.Cancel"}],"definitions":{"VolcanoInformation.PublicVFVO50":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["噴火警報・予報"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"null"},"infoKind":{"type":"string","enum":["噴火警報・予報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO50"},"_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"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type"]},"VolcanoInformation.Schema":{"type":"object","properties":{"type":{"type":"string","enum":["volcano-information"]},"version":{"type":"string","enum":["1.0.0"]}},"required":["type","version"]},"VolcanoInformation.PublicBodyVFVO50":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.TargetEWF"},"cities":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.CityVFVO50"}},"disasterPreventions":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.DisasterPrevention"}},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"text":{"type":"string"}},"required":["cities","comment","disasterPreventions","target"]},"VolcanoInformation.TargetEWF":{"type":"object","properties":{"kind":{"$ref":"#/definitions/VolcanoInformation.TargetKindEWF"},"code":{"type":"string"},"name":{"type":"string"},"coordinate":{"anyOf":[{"$ref":"#/definitions/Required<{latitude:never;longitude:never;height:never;geodeticSystem:never;condition:\"不明\";}>"},{"$ref":"#/definitions/Required<{latitude:{text:string;value:string;};longitude:{text:string;value:string;};height?:UnitValue<\"高さ\",\"m\",never>|undefined;condition:never;geodeticSystem:never;}>"}]},"areaFromMark":{"type":"string"}},"required":["code","coordinate","kind","name"]},"VolcanoInformation.TargetKindEWF":{"type":"object","properties":{"formalName":{"type":"string"},"condition":{"type":"string"},"lastKind":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"code":{"type":"string"},"name":{"type":"string"}},"required":["code","condition","lastKind","name"]},"Required<{latitude:never;longitude:never;height:never;geodeticSystem:never;condition:\"不明\";}>":{"type":"object","properties":{"condition":{"type":"string","enum":["不明"]}},"required":["condition"]},"Required<{latitude:{text:string;value:string;};longitude:{text:string;value:string;};height?:UnitValue<\"高さ\",\"m\",never>|undefined;condition:never;geodeticSystem:never;}>":{"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":["height","latitude","longitude"]},"VolcanoInformation.CityVFVO50":{"type":"object","properties":{"kinds":{"type":"array","items":[{"$ref":"#/definitions/VolcanoInformation.CityKindVFVO50"}],"minItems":1,"maxItems":1},"code":{"type":"string"},"name":{"type":"string"}},"required":["code","kinds","name"]},"VolcanoInformation.CityKindVFVO50":{"type":"object","properties":{"condition":{"type":"string"},"lastKind":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}},"required":["code","name"]},"code":{"type":"string"},"name":{"type":"string"}},"required":["code","condition","lastKind","name"]},"VolcanoInformation.DisasterPrevention":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"kinds":{"type":"array","items":[{"$ref":"#/definitions/VolcanoInformation.DisasterPreventionKind"}],"minItems":1,"maxItems":1}},"required":["code","kinds","name"]},"VolcanoInformation.DisasterPreventionKind":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"condition":{"type":"string"},"lastKind":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}},"required":["code","name"]}},"required":["code","condition","lastKind","name"]},"VolcanoInformation.Comments":{"type":"object","properties":{"headline":{"type":"string"},"activity":{"type":"string"},"prevention":{"type":"string"},"nextAdvisor":{"type":"string"},"otherInfo":{"type":"string"},"appendix":{"type":"string"},"text":{"type":"string"}}},"VolcanoInformation.PublicVFVO51":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["火山の状況に関する解説情報"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoKind":{"type":"string","enum":["火山の状況に関する解説情報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO51"},"_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"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type"]},"VolcanoInformation.PublicBodyVFVO51":{"type":"object","properties":{"notice":{"type":"string"},"targets":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.TargetEWF"}},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"text":{"type":"string"}},"required":["comment","targets"]},"VolcanoInformation.PublicVFVO52":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["噴火に関する火山観測報"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"targetDateTime":{"type":["null","string"]},"targetDateTimeDubious":{"enum":["分頃","年頃","日頃","時頃","月頃","秒頃","頃"],"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoKind":{"type":"string","enum":["噴火に関する火山観測報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO52"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type"]},"VolcanoInformation.PublicBodyVFVO52":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.Target"},"eruption":{"$ref":"#/definitions/VolcanoInformation.Eruption"},"text":{"type":"string"}},"required":["eruption","target"]},"VolcanoInformation.Target":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"coordinate":{"anyOf":[{"$ref":"#/definitions/Required<{latitude:never;longitude:never;height:never;geodeticSystem:never;condition:\"不明\";}>"},{"$ref":"#/definitions/Required<{latitude:{text:string;value:string;};longitude:{text:string;value:string;};height?:UnitValue<\"高さ\",\"m\",never>|undefined;condition:never;geodeticSystem:never;}>"}]},"areaFromMark":{"type":"string"},"crater":{"$ref":"#/definitions/VolcanoInformation.TargetCrater"},"kind":{"$ref":"#/definitions/VolcanoInformation.TargetKind"}},"required":["code","coordinate","kind","name"]},"VolcanoInformation.TargetCrater":{"type":"object","properties":{"name":{"type":["null","string"]},"coordinate":{"anyOf":[{"$ref":"#/definitions/Required<{latitude:never;longitude:never;height:never;geodeticSystem:never;condition:\"不明\";}>"},{"$ref":"#/definitions/Required<{latitude:{text:string;value:string;};longitude:{text:string;value:string;};height?:UnitValue<\"高さ\",\"m\",never>|undefined;condition:never;geodeticSystem:never;}>"}]}},"required":["coordinate","name"]},"VolcanoInformation.TargetKind":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"VolcanoInformation.Eruption":{"type":"object","properties":{"eventDateTime":{"$ref":"#/definitions/VolcanoInformation.EruptionEventDateTime"},"colorPlume":{"$ref":"#/definitions/VolcanoInformation.EruptionPlume"},"whitePlume":{"$ref":"#/definitions/VolcanoInformation.EruptionPlume"},"appendix":{"type":"string"},"otherObservation":{"type":"string"}}},"VolcanoInformation.EruptionEventDateTime":{"type":"object","properties":{"value":{"type":"string"},"validFormat":{"type":"string"},"dubious":{"enum":["頃"],"type":"string"}},"required":["validFormat","value"]},"VolcanoInformation.EruptionPlume":{"type":"object","properties":{"heightAboveCrater":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"enum":["海面上噴煙高度","火口上噴煙高度"],"type":"string"},"unit":{"type":"string","enum":["m"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"string"},"condition":{"enum":["以上"],"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"enum":["海面上噴煙高度","火口上噴煙高度"],"type":"string"},"unit":{"type":"string","enum":["m"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"enum":["不明","噴煙なし"],"type":"string"}},"required":["value"]}]}]},"heightSeaLevel":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["海抜噴煙高度"]},"unit":{"type":"string","enum":["ft"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"string"},"condition":{"enum":["以上"],"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["海抜噴煙高度"]},"unit":{"type":"string","enum":["ft"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"enum":["不明","噴煙なし"],"type":"string"}},"required":["value"]}]}]},"direction":{"anyOf":[{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["噴煙の流向"]},"unit":{"type":"string","enum":["漢字"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"enum":["北","北東","北西","南","南東","南西","東","流行不明","直上","西"],"type":"string"}},"required":["value"]}]},{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["噴煙の流向"]},"unit":{"type":"string","enum":["漢字"]}},"required":["type","unit"]},{"type":"object","properties":{"value":{"type":"null"},"condition":{"type":"string","enum":["噴煙なし"]}},"required":["condition","value"]}]}]},"comment":{"type":"string"}}},"VolcanoInformation.PublicVFVO53":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["降灰予報(定時)"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"targetDateTime":{"type":"string"},"validDateTime":{"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoKind":{"type":"string","enum":["降灰予報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO53"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type","validDateTime"]},"VolcanoInformation.PublicBodyVFVO53":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.Target"},"cities":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.City"}},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"ash":{"$ref":"#/definitions/VolcanoInformation.Ash"},"text":{"type":"string"}},"required":["ash","cities","comment","target"]},"VolcanoInformation.City":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"kinds":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.CityKind"}}},"required":["code","kinds","name"]},"VolcanoInformation.CityKind":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"VolcanoInformation.Ash":{"type":"object","properties":{"forecasts":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.AshForecast"}}},"required":["forecasts"]},"VolcanoInformation.AshForecast":{"type":"object","properties":{"type":{"type":"string","enum":["予報"]},"elapsedTime":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"items":{"$ref":"#/definitions/VolcanoInformation.AshForecastItem"}},"required":["elapsedTime","endTime","items","startTime","type"]},"VolcanoInformation.AshForecastItem":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"polygons":{"type":"array","items":{"type":"array","items":{"type":"array","items":[{"type":"number"},{"type":"number"}],"minItems":2,"maxItems":2}}},"size":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["降灰量"]},"unit":{"type":"string","enum":["g/m2"]},"value":{"type":"string"}},"required":["type","unit","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["降灰の厚さ"]},"unit":{"type":"string","enum":["mm"]},"value":{"type":"string"}},"required":["type","unit","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["小さな噴石の大きさ"]},"unit":{"type":"string","enum":["cm"]},"value":{"type":"string"}},"required":["type","unit","value"]}]},"direction":{"$ref":"#/definitions/VolcanoInformation.AshForecastItemDirection"},"distance":{"$ref":"#/definitions/VolcanoInformation.AshForecastItemDistance"},"remake":{"type":"string"},"cities":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.AshForecastItemCity"}}},"required":["cities","code","direction","distance","name","polygons","size"]},"VolcanoInformation.AshForecastItemDirection":{"type":"object","properties":{"type":{"enum":["小さな噴石の落下方向","降灰の方向"],"type":"string"},"unit":{"type":"string","enum":["漢字"]},"value":{"enum":["北","北東","北西","南","南東","南西","方向不定","東","火口近傍","西"],"type":"string"}},"required":["type","unit","value"]},"VolcanoInformation.AshForecastItemDistance":{"type":"object","properties":{"type":{"enum":["小さな噴石の到達距離","降灰の到達距離"],"type":"string"},"unit":{"type":"string","enum":["km"]},"value":{"type":"string"}},"required":["type","unit","value"]},"VolcanoInformation.AshForecastItemCity":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"VolcanoInformation.PublicVFVO54":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["降灰予報(速報)"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"targetDateTime":{"type":"string"},"validDateTime":{"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoKind":{"type":"string","enum":["降灰予報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO54"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type","validDateTime"]},"VolcanoInformation.PublicBodyVFVO54":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.Target"},"cities":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.City"}},"eruption":{"$ref":"#/definitions/VolcanoInformation.Eruption"},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"ash":{"$ref":"#/definitions/VolcanoInformation.Ash"},"text":{"type":"string"}},"required":["ash","cities","comment","eruption","target"]},"VolcanoInformation.PublicVFVO55":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["降灰予報(詳細)"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"targetDateTime":{"type":"string"},"validDateTime":{"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"string"},"infoKind":{"type":"string","enum":["降灰予報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO55"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type","validDateTime"]},"VolcanoInformation.PublicBodyVFVO55":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.Target"},"cities":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.City"}},"eruption":{"$ref":"#/definitions/VolcanoInformation.Eruption"},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"ash":{"$ref":"#/definitions/VolcanoInformation.Ash"},"text":{"type":"string"}},"required":["ash","cities","comment","eruption","target"]},"VolcanoInformation.PublicVFVO56":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["噴火速報"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"targetDateTime":{"type":"string"},"targetDateTimeDubious":{"enum":["分頃","年頃","日頃","時頃","月頃","秒頃","頃"],"type":"string"},"validDateTime":{"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"null"},"infoKind":{"type":"string","enum":["噴火速報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFVO56"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type","validDateTime"]},"VolcanoInformation.PublicBodyVFVO56":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.Target"},"cities":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.CityVFVO56"}},"eruption":{"$ref":"#/definitions/Pick<VolcanoInformation.Eruption,\"eventDateTime\">"},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"text":{"type":"string"}},"required":["cities","comment","eruption","target"]},"VolcanoInformation.CityVFVO56":{"type":"object","properties":{"kinds":{"type":"array","items":[{"$ref":"#/definitions/VolcanoInformation.CityKind"}],"minItems":1,"maxItems":1},"code":{"type":"string"},"name":{"type":"string"}},"required":["code","kinds","name"]},"Pick<VolcanoInformation.Eruption,\"eventDateTime\">":{"type":"object","properties":{"eventDateTime":{"$ref":"#/definitions/VolcanoInformation.EruptionEventDateTime"}}},"VolcanoInformation.PublicVFSVii":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["火山現象に関する海上警報・海上予報"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"null"},"infoKind":{"type":"string","enum":["火山現象に関する海上警報・海上予報"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVFSVii"},"_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"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type"]},"VolcanoInformation.PublicBodyVFSVii":{"type":"object","properties":{"notice":{"type":"string"},"target":{"$ref":"#/definitions/VolcanoInformation.TargetEWF"},"oceanZones":{"type":"array","items":{"$ref":"#/definitions/VolcanoInformation.OceanZone"}},"comment":{"$ref":"#/definitions/VolcanoInformation.Comments"},"text":{"type":"string"}},"required":["comment","oceanZones","target"]},"VolcanoInformation.OceanZone":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"kinds":{"type":"array","items":[{"$ref":"#/definitions/VolcanoInformation.OceanZoneKind"}],"minItems":1,"maxItems":1}},"required":["code","kinds","name"]},"VolcanoInformation.OceanZoneKind":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"condition":{"type":"string"},"lastKind":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}},"required":["code","name"]}},"required":["code","condition","lastKind","name"]},"VolcanoInformation.PublicVZVO40":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"type":"string","enum":["火山に関するお知らせ"]},"title":{"type":"string"},"infoType":{"enum":["発表","訂正"],"type":"string"},"targetDateTime":{"type":"string"},"validDateTime":{"type":"string"},"eventId":{"type":"string"},"serialNo":{"type":"null"},"infoKind":{"type":"string","enum":["火山に関するお知らせ"]},"body":{"$ref":"#/definitions/VolcanoInformation.PublicBodyVZVO40"},"_originalId":{"type":"string"},"status":{"enum":["訓練","試験","通常"],"type":"string"},"editorialOffice":{"type":"string"},"publishingOffice":{"type":"array","items":{"type":"string"}},"pressDateTime":{"type":"string"},"reportDateTime":{"type":"string"},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type","validDateTime"]},"VolcanoInformation.PublicBodyVZVO40":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]},"VolcanoInformation.Cancel":{"type":"object","properties":{"_schema":{"$ref":"#/definitions/VolcanoInformation.Schema"},"type":{"enum":["噴火に関する火山観測報","噴火警報・予報","噴火速報","火山に関するお知らせ","火山の状況に関する解説情報","火山現象に関する海上警報・海上予報","降灰予報(定時)","降灰予報(詳細)","降灰予報(速報)"],"type":"string"},"title":{"type":"string"},"infoType":{"type":"string","enum":["取消"]},"targetDateTimeDubious":{"enum":["分頃","年頃","日頃","時頃","月頃","秒頃","頃"],"type":"string"},"validDateTime":{"type":"string"},"eventId":{"type":"string"},"infoKind":{"enum":["噴火に関する火山観測報","噴火警報・予報","噴火速報","火山に関するお知らせ","火山の状況に関する解説情報","火山現象に関する海上警報・海上予報","降灰予報"],"type":"string"},"body":{"$ref":"#/definitions/VolcanoInformation.CancelBody"},"_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"},"serialNo":{"type":["null","string"]},"infoKindVersion":{"type":"string"},"headline":{"type":["null","string"]}},"required":["_originalId","_schema","body","editorialOffice","eventId","headline","infoKind","infoKindVersion","infoType","pressDateTime","publishingOffice","reportDateTime","serialNo","status","targetDateTime","title","type"]},"VolcanoInformation.CancelBody":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}},"$schema":"http://json-schema.org/draft-07/schema#"}
@@ -0,0 +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","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":"string"},"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"speed":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","string"]}},"required":["type","unit","value"]},"pressure":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"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"},"unit":{"type":"string"},"value":{"type":["null","string"]}},"required":["type","unit","value"]},"instantaneous":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","string"]}},"required":["type","unit","value"]},"area":{"$ref":"#/definitions/WeatherTyphoon.RealStateWindArea"}},"required":["area","average","instantaneous"]},"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":["null","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,\"location\">"}]},"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","TY","Tropical Storm"],"type":"string"},{"type":"null"}]},"intensity":{"anyOf":[{"enum":["強い","猛烈な","非常に強い"],"type":"string"},{"type":"null"}]}},"required":["category","intensity","name"]},"Omit<WeatherTyphoon.RealStateCenter,\"location\">":{"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"]}]},"direction":{"$ref":"#/definitions/WeatherTyphoon.Direction"},"speed":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","string"]}},"required":["type","unit","value"]},"pressure":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":"string"}},"required":["type","unit","value"]}},"required":["coordinate","direction","pressure","speed"]},"WeatherTyphoon.ForecastWind":{"type":"object","properties":{"average":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","string"]}},"required":["type","unit","value"]},"instantaneous":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"value":{"type":["null","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#"}
@@ -0,0 +1 @@
1
+ export declare function getJSchema(name: string, version?: string): Promise<any>;
@@ -0,0 +1,44 @@
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;
package/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export * from './types';
1
+ export * from './types';
2
+ export * from './dist/jschema-load'
package/package.json CHANGED
@@ -1,11 +1,21 @@
1
- {
2
- "name": "@dmdata/telegram-json-types",
3
- "version": "1.0.8",
4
- "scripts": {
5
- "publish:npm": "npm version patch && npm publish --access=public"
6
- },
7
- "types": "index.d.ts",
8
- "keywords": [],
9
- "author": "",
10
- "license": "ISC"
11
- }
1
+ {
2
+ "name": "@dmdata/telegram-json-types",
3
+ "version": "1.0.9-jschema.3",
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
+ },
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
+ }
package/tsconfig.json CHANGED
@@ -1,15 +1,27 @@
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
+ ],
23
+ "exclude": [
24
+ "jschema",
25
+ "node_modules"
26
+ ]
27
+ }
@@ -1,15 +1,15 @@
1
- import { UnitValue } from './unit-value';
2
-
3
- export type Coordinate<Geo = never> = {
4
- latitude: { text: string, value: string };
5
- longitude: { text: string, value: string };
6
- height?: UnitValue<'深さ', 'km'>;
7
- condition: undefined;
8
- geodeticSystem: Geo;
9
- } | {
10
- latitude: undefined;
11
- longitude: undefined;
12
- height: undefined;
13
- geodeticSystem: never;
14
- condition: '不明';
15
- }
1
+ import { UnitValue } from './unit-value';
2
+
3
+ export type Coordinate<Geo = never> = {
4
+ latitude: { text: string, value: string };
5
+ longitude: { text: string, value: string };
6
+ height?: UnitValue<'高さ', 'm'>;
7
+ condition: never;
8
+ geodeticSystem: Geo;
9
+ } | {
10
+ latitude: never;
11
+ longitude: never;
12
+ height: never;
13
+ geodeticSystem: never;
14
+ condition: '不明';
15
+ }
@@ -1,56 +1,56 @@
1
- import { Coordinate } from './coordinate';
2
- import { UnitValueNotNull } from './unit-value';
3
-
4
- type Depth = {
5
- type: '深さ';
6
- unit: 'km';
7
- } & ({
8
- value: null;
9
- condition: '不明';
10
- } | {
11
- value: '0';
12
- condition: 'ごく浅い';
13
- } | {
14
- value: '700';
15
- condition: '700km以上';
16
- } | {
17
- value: string;
18
- condition: undefined;
19
- });
20
- type Magnitude = {
21
- type: 'マグニチュード';
22
- unit: 'Mj' | 'M';
23
- } & ({
24
- value: null;
25
- condition: 'M不明' | 'M8を超える巨大地震';
26
- } | {
27
- value: string;
28
- condition: undefined;
29
- });
30
-
31
- export interface Earthquake {
32
- originTime: string;
33
- arrivalTime: string;
34
- hypocenter: {
35
- name: string;
36
- code: string;
37
- coordinate: Coordinate<'日本測地系' | undefined>;
38
- depth: Depth;
39
- detailed?: {
40
- code: string;
41
- name: string;
42
- };
43
- auxiliary?: {
44
- text: string;
45
- code: string;
46
- name: string;
47
- direction: string;
48
- distance: Omit<UnitValueNotNull<never, 'km'>, 'type' | 'condition'>;
49
- };
50
- source?: 'PTWC' | 'USGS' | 'WCATWC';
51
- };
52
- magnitude: Magnitude;
53
- }
54
-
55
-
56
-
1
+ import { Coordinate } from './coordinate';
2
+ import { UnitValueNotNull } from './unit-value';
3
+
4
+ type Depth = {
5
+ type: '深さ';
6
+ unit: 'km';
7
+ } & ({
8
+ value: null;
9
+ condition: '不明';
10
+ } | {
11
+ value: '0';
12
+ condition: 'ごく浅い';
13
+ } | {
14
+ value: '700';
15
+ condition: '700km以上';
16
+ } | {
17
+ value: string;
18
+ condition: never;
19
+ });
20
+ type Magnitude = {
21
+ type: 'マグニチュード';
22
+ unit: 'Mj' | 'M';
23
+ } & ({
24
+ value: null;
25
+ condition: 'M不明' | 'M8を超える巨大地震';
26
+ } | {
27
+ value: string;
28
+ condition: never;
29
+ });
30
+
31
+ export interface Earthquake {
32
+ originTime: string;
33
+ arrivalTime: string;
34
+ hypocenter: {
35
+ name: string;
36
+ code: string;
37
+ coordinate: Coordinate<'日本測地系' | undefined>;
38
+ depth: Depth;
39
+ detailed?: {
40
+ code: string;
41
+ name: string;
42
+ };
43
+ auxiliary?: {
44
+ text: string;
45
+ code: string;
46
+ name: string;
47
+ direction: string;
48
+ distance: Omit<UnitValueNotNull<never, 'km'>, 'type' | 'condition'>;
49
+ };
50
+ source?: 'PTWC' | 'USGS' | 'WCATWC';
51
+ };
52
+ magnitude: Magnitude;
53
+ }
54
+
55
+
56
+
@@ -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,3 +1,21 @@
1
- export * from './schema/earthquake-information';
2
- export * from './schema/tsunami-information';
3
- export * from './schema/weather-typhoon';
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';
6
+ import * as EewInformation from './schema/eew-information';
7
+ import * as TsunamiInformation from './schema/tsunami-information';
8
+ import * as VolcanoInformation from './schema/volcano-information';
9
+ import * as WeatherTyphoon from './schema/weather-typhoon';
10
+
11
+ export {
12
+ EarthquakeInformation,
13
+ EarthquakeExplanation,
14
+ EarthquakeCounts,
15
+ EarthquakeHypocenterUpdate,
16
+ EarthquakeNankai,
17
+ EewInformation,
18
+ TsunamiInformation,
19
+ VolcanoInformation,
20
+ WeatherTyphoon
21
+ };
@@ -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
+ };