{"components":{"schemas":{"Account":{"properties":{"createdAt":{"format":"int64","type":"integer"},"id":{"type":"string"},"quotaBytes":{"format":"int64","type":"integer"},"revision":{"format":"int64","type":"integer"},"usedBytes":{"format":"int64","type":"integer"},"wrappedMasterKey":{"type":"string"}},"required":["createdAt","id","quotaBytes","revision","usedBytes","wrappedMasterKey"],"type":"object"},"Challenge":{"properties":{"challenge":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"format":{"type":"string"}},"required":["challenge","expiresAt","format"],"type":"object"},"Changes":{"properties":{"hasMore":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/Item"},"type":["array","null"]},"latest":{"format":"int64","type":"integer"}},"required":["hasMore","items","latest"],"type":"object"},"Confirm":{"properties":{"challenge":{"type":"string"},"signature":{"type":"string"}},"required":["challenge","signature"],"type":"object"},"Created":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"Error":{"properties":{"message":{"type":"string"}},"required":["message"],"type":"object"},"Info":{"properties":{"apiVersion":{"format":"int64","type":"integer"},"maxFileBytes":{"format":"int64","type":"integer"},"name":{"type":"string"},"product":{"type":"string"},"publicUrl":{"type":"string"},"quotaBytes":{"format":"int64","type":"integer"},"registration":{"type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/Stats"},{"type":"null"}]},"version":{"type":"string"}},"required":["apiVersion","maxFileBytes","name","product","publicUrl","quotaBytes","registration","version"],"type":"object"},"Item":{"properties":{"blobHash":{"type":"string"},"blobSize":{"format":"int64","type":"integer"},"deleted":{"type":"boolean"},"id":{"type":"string"},"meta":{"type":"string"},"revision":{"format":"int64","type":"integer"},"updatedAt":{"format":"int64","type":"integer"}},"required":["blobSize","deleted","id","revision","updatedAt"],"type":"object"},"MetaUpdate":{"properties":{"baseRevision":{"format":"int64","type":"integer"},"meta":{"type":"string"}},"required":["baseRevision","meta"],"type":"object"},"NewAccount":{"properties":{"id":{"type":"string"},"invite":{"type":"string"},"publicKey":{"type":"string"},"wrappedMasterKey":{"type":"string"}},"required":["id","publicKey","wrappedMasterKey"],"type":"object"},"Request":{"properties":{"accountId":{"type":"string"}},"required":["accountId"],"type":"object"},"Rotation":{"properties":{"challenge":{"type":"string"},"publicKey":{"type":"string"},"signature":{"type":"string"},"wrappedMasterKey":{"type":"string"}},"required":["challenge","publicKey","signature","wrappedMasterKey"],"type":"object"},"Session":{"properties":{"createdAt":{"format":"date-time","type":"string"},"current":{"type":"boolean"},"deviceName":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"lastUsedAt":{"format":"date-time","type":"string"}},"required":["createdAt","current","deviceName","expiresAt","id","lastUsedAt"],"type":"object"},"SignIn":{"properties":{"accountId":{"type":"string"},"challenge":{"type":"string"},"deviceName":{"type":"string"},"signature":{"type":"string"}},"required":["accountId","challenge","deviceName","signature"],"type":"object"},"SignedIn":{"properties":{"session":{"$ref":"#/components/schemas/Session"},"token":{"type":"string"}},"required":["session","token"],"type":"object"},"Stats":{"properties":{"accounts":{"format":"int64","type":"integer"},"availability":{"type":"number"},"documents":{"format":"int64","type":"integer"},"onlineSince":{"format":"date-time","type":"string"},"usedBytes":{"format":"int64","type":"integer"}},"required":["accounts","availability","documents","onlineSince","usedBytes"],"type":"object"}}},"info":{"title":"Ordo API","version":"0.1.0"},"openapi":"3.1.0","paths":{"/api/v1/account":{"get":{"operationId":"getApiV1Account","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/account/delete":{"post":{"operationId":"postApiV1AccountDelete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Confirm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/account/key":{"put":{"operationId":"putApiV1AccountKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rotation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/account/sessions":{"get":{"operationId":"getApiV1AccountSessions","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Session"},"type":["array","null"]}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/account/sessions/{id}":{"delete":{"operationId":"deleteApiV1AccountSessionsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/accounts":{"post":{"operationId":"postApiV1Accounts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewAccount"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Created"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/auth/challenge":{"post":{"operationId":"postApiV1AuthChallenge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/auth/session":{"delete":{"operationId":"deleteApiV1AuthSession","responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}},"post":{"operationId":"postApiV1AuthSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignIn"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedIn"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/items":{"get":{"operationId":"getApiV1Items","parameters":[{"in":"query","name":"since","schema":{"format":"int64","type":"integer"}},{"in":"query","name":"limit","schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Changes"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/items/{id}":{"delete":{"operationId":"deleteApiV1ItemsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}},"put":{"operationId":"putApiV1ItemsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}},"/api/v1/server":{"get":{"operationId":"getApiV1Server","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Info"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error"}}}}}}
