{"openapi":"3.1.0","info":{"title":"Shift Coverage Gap","version":"1.0.0","description":"Find exact understaffed intervals and uncovered person-minutes using already normalized shift timestamps.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/shift-coverage-gap/v1/check":{"post":{"operationId":"shift_coverage_gap","summary":"Find exact understaffed intervals and uncovered person-minutes using already normalized shift timestamps.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starts":{"type":"integer","minimum":0,"maximum":1000000000},"ends":{"type":"integer","minimum":0,"maximum":1000000000},"required":{"type":"integer","exclusiveMinimum":0,"maximum":200},"shifts":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"worker":{"type":"string","minLength":1,"maxLength":60},"starts":{"type":"integer","minimum":0,"maximum":1000000000},"ends":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["worker","starts","ends"],"additionalProperties":false}}},"required":["starts","ends","required","shifts"],"additionalProperties":false},"example":{"starts":540,"ends":600,"required":2,"shifts":[{"worker":"a","starts":540,"ends":600},{"worker":"b","starts":555,"ends":585}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"gaps":[{"starts":540,"ends":555,"on_duty":1},{"starts":585,"ends":600,"on_duty":1}],"uncovered_person_minutes":30}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}