{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://freedom250observatory.com/astrology/data/contracts.schema.json","title":"Freedom250 astronomical temporal records","$defs":{"Clock":{"type":"object","required":["jd_ut","jd_tt","delta_t_seconds","calendar","input_time_scale","precision"],"properties":{"jd_ut":{"type":"number"},"jd_tt":{"type":"number"},"delta_t_seconds":{"type":"number"},"calendar":{"enum":["proleptic_gregorian","julian"]},"input_time_scale":{"enum":["UT","TT","UTC","canonical_legacy_UT_epoch"]},"precision":{"type":"string"},"source_timestamp_text":{"type":["string","null"]},"historical_utc_warning":{"type":["string","null"]},"display_convention":{"type":"string"}}},"Provenance":{"type":"object","required":["calculation_source_id","ephemeris_resources_id","software_version","frame","units"],"properties":{"calculation_source_id":{"type":"string"},"ephemeris_resources_id":{"type":"string"},"software_version":{"type":"string"},"frame":{"type":"object"},"units":{"type":"object"},"independent_verification":{"type":"string"}}},"PhysicalState":{"type":"object","required":["schema","id","layer","clock","provenance","bodies"],"properties":{"schema":{"const":"f250.astronomical-state/v1"},"id":{"type":"string"},"layer":{"const":"astronomical"},"clock":{"$ref":"#/$defs/Clock"},"provenance":{"$ref":"#/$defs/Provenance"},"bodies":{"type":"array"},"representation":{"enum":["canonical_calculation","cached_canonical_calculation","interpolated"]},"observer":{"type":["object","null"]}}},"DerivedState":{"type":"object","required":["schema","id","layer","source_state_ids","ruleset_id","classifications"],"properties":{"schema":{"const":"f250.derived-astrological-state/v1"},"id":{"type":"string"},"layer":{"const":"rule_derived"},"source_state_ids":{"type":"array","items":{"type":"string"}},"ruleset_id":{"type":"string"},"classifications":{"type":"object"},"symbolic_references":{"type":"array"}}},"Event":{"type":"object","required":["id","event_type","clock","source_id","criteria","residual","numerical_tolerance","completeness"],"properties":{"id":{"type":"string"},"event_type":{"enum":["sign_boundary","longitude_station","relative_motion_station","aspect_perfection","phase_boundary","orb_boundary","degree_crossing"]},"clock":{"$ref":"#/$defs/Clock"},"source_id":{"type":"string"},"criteria":{"type":"object"},"residual":{"type":"object"},"numerical_tolerance":{"type":"object"},"completeness":{"type":"object"},"pass_id":{"type":["string","null"]},"chapter_id":{"type":["string","null"]}}},"Interval":{"type":"object","required":["id","predicate_id","ruleset_id","from_jd_ut","through_jd_ut","boundary_policy","boundary_event_ids","coverage_status"],"properties":{"id":{"type":"string"},"predicate_id":{"type":"string"},"ruleset_id":{"type":"string"},"from_jd_ut":{"type":"number"},"through_jd_ut":{"type":"number"},"boundary_policy":{"const":"half_open"},"boundary_event_ids":{"type":"array","items":{"type":"string"}},"coverage_status":{"type":"string"}}},"QueryResult":{"type":"object","required":["schema","query_id","requested_criteria","executed_criteria","source_build_id","ruleset_ids","status","coverage","population","counting_unit","total_records","returned_records","records","next"],"properties":{"schema":{"const":"f250.astronomical-query-result/v1"},"query_id":{"type":"string"},"requested_criteria":{"type":"object"},"executed_criteria":{"type":"object"},"source_build_id":{"type":"string"},"ruleset_ids":{"type":"array","items":{"type":"string"}},"status":{"enum":["complete_for_declared_predicates","bounded_by_coverage","sampled","partial","failed","unavailable"]},"coverage":{"type":"object"},"population":{"type":"object"},"counting_unit":{"enum":["state","exact_event","pass","continuous_interval","repeated_interval","chapter","chart","contact","structural_signature"]},"total_records":{"type":["integer","null"],"minimum":0},"returned_records":{"type":"integer","minimum":0},"records":{"type":"array"},"next":{"type":["string","null"]},"duration":{"type":["object","null"]},"error":{"type":["object","null"]}}},"QueryError":{"type":"object","required":["schema","status","error","total_records","records"],"properties":{"schema":{"const":"f250.astronomical-query-error/v1"},"status":{"enum":["failed","unavailable"]},"total_records":{"type":"null"},"records":{"type":"array","maxItems":0},"error":{"type":"object","required":["code","message","source_http_status"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"source_http_status":{"type":["integer","null"]}}}}}}}
