{"openapi":"3.1.0","info":{"title":"market","version":"0.1.0"},"components":{"securitySchemes":{"pat":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"},"message":{"type":"string","minLength":1},"agcid":{"type":"string","pattern":"^[0-9a-f]{32}$"},"details":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["code","message","agcid"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}}},"paths":{"/api/v1/extensions":{"get":{"summary":"Listed extensions","security":[],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"page size; a limit above 200 is clamped to 200","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"the envelope","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","maxLength":140,"pattern":"^agentage\\/[A-Za-z0-9_.-]*[A-Za-z0-9_-][A-Za-z0-9_.-]*$"},"package":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":214},{"type":"null"}]},"registry":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"access":{"type":"string","enum":["public","private"]},"title":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500}},"required":["id","source","package","registry","access","title","description"],"additionalProperties":false}}},"required":["success","data"]}}}},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/extensions/{id}":{"get":{"summary":"One entry","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"}}],"responses":{"200":{"description":"the envelope","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","maxLength":140,"pattern":"^agentage\\/[A-Za-z0-9_.-]*[A-Za-z0-9_-][A-Za-z0-9_.-]*$"},"package":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":214},{"type":"null"}]},"registry":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"access":{"type":"string","enum":["public","private"]},"title":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500}},"required":["id","source","package","registry","access","title","description"],"additionalProperties":false}},"required":["success","data"]}}}},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"List or change","security":[{"pat":["market:admin"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","maxLength":140,"pattern":"^agentage\\/[A-Za-z0-9_.-]*[A-Za-z0-9_-][A-Za-z0-9_.-]*$"},"package":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":214},{"type":"null"}]},"registry":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"access":{"type":"string","enum":["public","private"]},"title":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500}},"required":["source","access","title"]}}}},"responses":{"201":{"description":"the envelope","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","maxLength":140,"pattern":"^agentage\\/[A-Za-z0-9_.-]*[A-Za-z0-9_-][A-Za-z0-9_.-]*$"},"package":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":214},{"type":"null"}]},"registry":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"access":{"type":"string","enum":["public","private"]},"title":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500}},"required":["id","source","package","registry","access","title","description"],"additionalProperties":false}},"required":["success","data"]}}}},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delist","security":[{"pat":["market:admin"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"}}],"responses":{"204":{"description":"no content"},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/extensions/{id}/latest":{"get":{"summary":"The newest release","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"}}],"responses":{"200":{"description":"the envelope","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"source":{"type":"string"},"access":{"type":"string","enum":["public","private"]},"package":{"type":["string","null"]},"registry":{"type":["string","null"]},"releasedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","version","commit","source","access","package","registry","releasedAt"],"additionalProperties":false}},"required":["success","data"]}}}},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/extensions/{id}/versions/{version}":{"get":{"summary":"One version","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"the envelope","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"releasedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"builtAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"previous":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"}},"required":["version","commit"],"additionalProperties":false},{"type":"null"}]},"compare":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"conflict":{"type":"boolean"}},"required":["id","version","commit","releasedAt","builtAt","previous","compare","conflict"],"additionalProperties":false}},"required":["success","data"]}}}},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/extensions/{id}/versions":{"get":{"summary":"Version history","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"at","in":"query","required":false,"schema":{"description":"at most one row, the version newest at this time; since, until and cursor are ignored","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"a limit above 100 is clamped to 100","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"}}],"responses":{"200":{"description":"the envelope","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"releasedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"builtAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"previous":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"}},"required":["version","commit"],"additionalProperties":false},{"type":"null"}]},"compare":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"conflict":{"type":"boolean"}},"required":["id","version","commit","releasedAt","builtAt","previous","compare","conflict"],"additionalProperties":false}}},"required":["success","data"]}}}},"400":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}