{"openapi":"3.1.0","info":{"title":"warp-server","description":"","license":{"name":""},"version":"0.1.0"},"paths":{"/api/v1/auth/login":{"post":{"tags":["auth"],"operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextUrl"}}},"required":true},"responses":{"200":{"description":"Returns an OAuth authorization URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthUrlResponse"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"operationId":"logout","responses":{"204":{"description":"Successfully logged out, no content"}}}},"/api/v1/auth/o/callback":{"get":{"tags":["auth"],"operationId":"oauth_callback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}},{"name":"state","in":"query","description":"CSRF token to validate callback.","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect after successful authentication"},"400":{"description":"Bad request, missing or invalid state"},"401":{"description":"Unauthorized, authentication failed"}}}},"/api/v1/commits/query":{"post":{"tags":["commits"],"operationId":"query_commits","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitQueryRequest"}}},"required":true},"responses":{"200":{"description":"List of commits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVec_CommitMdl"}}}}}}},"/api/v1/commits/{id}":{"get":{"tags":["commits"],"operationId":"get_commit","parameters":[{"name":"id","in":"path","description":"Commit ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Commit details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitMdl"}}}},"404":{"description":"Commit not found"}}},"delete":{"tags":["commits"],"summary":"Delete the commit.","description":"Must be a part of the source users or an admin.","operationId":"delete_commit","parameters":[{"name":"id","in":"path","description":"Commit ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Commit has been deleted"},"401":{"description":"Not authorized"},"404":{"description":"Commit not found"}}}},"/api/v1/files":{"post":{"tags":["files"],"summary":"Push a file to the source (multipart).","description":"User must be a part of the source or an admin.","operationId":"push_file_multipart","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadFile"}}},"required":true},"responses":{"200":{"description":"File successfully pushed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResponse"}}}},"400":{"description":"Invalid input or malformed file"},"401":{"description":"Unauthorized"},"404":{"description":"Source not found"}}}},"/api/v1/files/json":{"post":{"tags":["files"],"summary":"Push a file to the source (JSON; base64-encoded file).","description":"User must be a part of the source or an admin.","operationId":"push_file_json","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFileJson"}}},"required":true},"responses":{"200":{"description":"File successfully pushed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResponse"}}}},"400":{"description":"Invalid input or malformed file"},"401":{"description":"Unauthorized"},"404":{"description":"Source not found"}}}},"/api/v1/functions/query":{"post":{"tags":["functions"],"operationId":"query_functions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Paginated list of functions in JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVec_FunctionMdl"}}}}}}},"/api/v1/functions/query/source":{"post":{"tags":["functions"],"operationId":"query_functions_source","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Mapping of source UUID to list of GUIDs","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","format":"uuid"}},"propertyNames":{"type":"string","format":"uuid"}}}}}}}},"/api/v1/functions/{id}":{"get":{"tags":["functions"],"operationId":"get_function_by_id","parameters":[{"name":"id","in":"path","description":"Function ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Function details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionMdl"}}}}}}},"/api/v1/functions/{id}/comments":{"get":{"tags":["functions"],"summary":"Get the list of comments for a given function.","operationId":"get_function_comments","parameters":[{"name":"id","in":"path","description":"Function ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Comments on the function","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FunctionCommentMdl"}}}}}}}},"/api/v1/functions/{id}/constraints":{"get":{"tags":["functions"],"summary":"Get the list of constraints for a given function.","operationId":"get_function_constraints","parameters":[{"name":"id","in":"path","description":"Function ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Constraints on the function","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FunctionConstraintMdl"}}}}}}}},"/api/v1/functions/{id}/data":{"get":{"tags":["functions"],"summary":"Get the WARP flatbuffer data for a given function.","operationId":"get_function_data","parameters":[{"name":"id","in":"path","description":"Function ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Flatbuffer object","content":{"application/octet-stream":{}}}}}},"/api/v1/functions/{id}/symbol":{"get":{"tags":["functions"],"summary":"Get the symbol for a given function.","operationId":"get_function_symbol","parameters":[{"name":"id","in":"path","description":"Function ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Symbol for the function","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolMdl"}}}}}}},"/api/v1/functions/{id}/type":{"get":{"tags":["functions"],"summary":"Get the type for a given function.","operationId":"get_function_type","parameters":[{"name":"id","in":"path","description":"Function ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Return type of the function","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypeMdl"}}}}}}},"/api/v1/search":{"get":{"tags":["search"],"summary":"Search across the unified search view with an optional kind and fuzzy query.","operationId":"search_handler","parameters":[{"name":"q","in":"query","description":"Optional fuzzy term matched against","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","description":"Optional kind filter: one of \"function\", \"source\", \"type\"","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Pagination limit (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Pagination offset (default: 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"function_guid","in":"query","description":"Function GUID filter (exact)","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"commit_id","in":"query","description":"Commit ID filter (exact)","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"source_id","in":"query","description":"Source ID filter (exact)","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"source_tags","in":"query","description":"Optional filter: return only items whose source has any of these tags\n\nAccepts repeated flags (e.g., --source-tag a --source-tag b)\nor a comma-separated list (e.g., --source-tags a,b).","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieve_data","in":"query","description":"Retrieve data for the items returned by the search. (default: false)","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Invalid request"},"500":{"description":"Server error"}}}},"/api/v1/sources":{"post":{"tags":["sources"],"summary":"Create a new source.","operationId":"create_source","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSourceRequest"}}},"required":true},"responses":{"200":{"description":"Created a new source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceMdl"}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/sources/query":{"post":{"tags":["sources"],"operationId":"query_sources","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceQueryRequest"}}},"required":true},"responses":{"200":{"description":"Paginated list of symbols","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVec_SourceMdl"}}}}}}},"/api/v1/sources/{id}":{"get":{"tags":["sources"],"operationId":"get_source_by_id","parameters":[{"name":"id","in":"path","description":"Source UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Symbol by ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceMdl"}}}}}}},"/api/v1/sources/{id}/":{"post":{"tags":["sources"],"summary":"Update source information.","description":"If a source tag is \"protected\" it can only be updated by an admin.\n\nYou must be an admin or already a part of the source.","operationId":"update_source","parameters":[{"name":"id","in":"path","description":"Source UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSourceRequest"}}},"required":true},"responses":{"200":{"description":"Source was updated"},"404":{"description":"Source or user not found"}}},"delete":{"tags":["sources"],"summary":"Delete the source.","description":"Must be an admin or in the source users.","operationId":"delete_source","parameters":[{"name":"id","in":"path","description":"Source UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Source deleted"},"404":{"description":"Source not found"}}}},"/api/v1/sources/{id}/tags":{"get":{"tags":["sources"],"summary":"List tags associated with the source.","operationId":"list_source_tags","parameters":[{"name":"id","in":"path","description":"Source UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of tags associated with the source","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceTagMdl"}}}}}}}},"/api/v1/sources/{id}/users":{"get":{"tags":["sources"],"summary":"List users associated with the source.","operationId":"list_source_users","parameters":[{"name":"id","in":"path","description":"Source UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of users associated with the source","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceUserMdl"}}}}}}}},"/api/v1/status":{"get":{"tags":["status"],"summary":"Health-check endpoint","operationId":"status_handler","responses":{"200":{"description":"Service is operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/api/v1/symbols/query":{"post":{"tags":["symbols"],"operationId":"query_symbols","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolQueryRequest"}}},"required":true},"responses":{"200":{"description":"Paginated list of symbols","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVec_SymbolMdl"}}}}}}},"/api/v1/symbols/{id}":{"get":{"tags":["symbols"],"operationId":"get_symbol_by_id","parameters":[{"name":"id","in":"path","description":"Symbol ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Symbol by ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolMdl"}}}}}}},"/api/v1/targets/query":{"get":{"tags":["targets"],"summary":"Deprecated, use POST /query instead.","operationId":"get_query_targets","parameters":[{"name":"platform","in":"query","description":"Filter by platform, e.g. \"linux\"","required":false,"schema":{"type":"string"}},{"name":"arch","in":"query","description":"Filter by architecture, e.g. \"x86_64\"","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returned target","content":{"text/plain":{"schema":{"type":"integer","format":"int32"}}}}}},"post":{"tags":["targets"],"operationId":"query_targets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetQueryRequest"}}},"required":true},"responses":{"200":{"description":"List of targets","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TargetMdl"}}}}}}}},"/api/v1/types/query":{"post":{"tags":["types"],"operationId":"query_types","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypeQueryRequest"}}},"required":true},"responses":{"200":{"description":"List of types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVec_TypeMdl"}}}}}}},"/api/v1/types/{id}":{"get":{"tags":["types"],"operationId":"get_type_by_id","parameters":[{"name":"id","in":"path","description":"Type UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Type details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypeMdl"}}}},"404":{"description":"Type not found"}}}},"/api/v1/types/{id}/data":{"get":{"tags":["types"],"operationId":"get_type_data","parameters":[{"name":"id","in":"path","description":"Type UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Type data","content":{"application/octet-stream":{}}},"404":{"description":"Type not found"}}}},"/api/v1/users":{"post":{"tags":["users"],"summary":"Create a new user, you must be an admin to do this.","operationId":"create_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"201":{"description":"Created a new user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMdl"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}},"/api/v1/users/me":{"get":{"tags":["users"],"summary":"Returns the currently authenticated user, or 401 if not logged in.","operationId":"get_current_user","responses":{"200":{"description":"Current authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMdl"}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/users/me/keys":{"get":{"tags":["users"],"summary":"List current user keys","operationId":"list_current_user_keys","responses":{"200":{"description":"List of API keys for user","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyInfo"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}},"post":{"tags":["users"],"summary":"Create a new API key for the current user.","operationId":"create_current_user_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Created a new API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyMdl"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}},"/api/v1/users/query":{"post":{"tags":["users"],"operationId":"query_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQueryRequest"}}},"required":true},"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVec_UserInfo"}}}}}}},"/api/v1/users/{id}":{"get":{"tags":["users"],"operationId":"get_user_by_id","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"User by ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}}}},"delete":{"tags":["users"],"summary":"Delete a user, you must be an admin to do this.","description":"Deleting a user will anonymize all relevant commits.","operationId":"delete_user","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"User deleted"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"User not found"}}}},"/api/v1/users/{id}/keys":{"get":{"tags":["users"],"summary":"List a users keys, must be an admin to do this.","operationId":"list_user_keys","parameters":[{"name":"id","in":"path","description":"ID of the user","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of API keys for user","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyInfo"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}},"post":{"tags":["users"],"summary":"Create a new API key for the specified user. Must be an admin to do this.","operationId":"create_api_key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Created a new API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyMdl"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}},"/api/v1/users/{id}/role":{"patch":{"tags":["users"],"summary":"Change a user's role. Must be an admin.","operationId":"change_role","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeRoleRequest"}}},"required":true},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"User not found"}}}},"/api/v1/users/{id}/username":{"patch":{"tags":["users"],"summary":"Change a user's username. Must be an admin.","operationId":"change_username","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeUsernameRequest"}}},"required":true},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"User not found"},"409":{"description":"Username already taken"}}}}},"components":{"schemas":{"ApiKeyInfo":{"type":"object","required":["id","user_id","name","created_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int32"},"last_used_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"user_id":{"type":"integer","format":"int32"}}},"ApiKeyMdl":{"type":"object","required":["id","user_id","key","name","created_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int32"},"key":{"type":"string"},"last_used_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"user_id":{"type":"integer","format":"int32"}}},"AuthUrlResponse":{"type":"object","required":["auth_url"],"properties":{"auth_url":{"type":"string"}}},"ChangeRoleRequest":{"type":"object","required":["role"],"properties":{"role":{"$ref":"#/components/schemas/UserRoleMdl"}}},"ChangeUsernameRequest":{"type":"object","required":["username"],"properties":{"username":{"type":"string"}}},"CommitMdl":{"type":"object","required":["id","created_at","source_id"],"properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"name":{"type":["string","null"]},"source_id":{"type":"string","format":"uuid"},"user_id":{"type":["integer","null"],"format":"int32"}}},"CommitQueryRequest":{"type":"object","properties":{"limit":{"type":["integer","null"],"format":"int64"},"page":{"type":["integer","null"],"format":"int64"},"source_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":["integer","null"],"format":"int32"}}},"CreateApiKeyRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"CreateSourceRequest":{"type":"object","required":["user_ids","name"],"properties":{"name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"integer","format":"int32"}}}},"CreateUserRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"name":{"type":["string","null"]}}},"FunctionCommentMdl":{"type":"object","required":["id","function_id","text","byte_offset"],"properties":{"byte_offset":{"type":"integer","format":"int32"},"function_id":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"},"text":{"type":"string"}}},"FunctionConstraintMdl":{"type":"object","required":["id","function_id","guid"],"properties":{"byte_offset":{"type":["integer","null"],"format":"int32"},"function_id":{"type":"integer","format":"int32"},"guid":{"type":"string","format":"uuid"},"id":{"type":"integer","format":"int32"}}},"FunctionMdl":{"type":"object","required":["id","created_at","commit_id","target_id","source_id","guid","symbol_id"],"properties":{"commit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"guid":{"type":"string","format":"uuid"},"id":{"type":"integer","format":"int32"},"source_id":{"type":"string","format":"uuid"},"symbol_id":{"type":"integer","format":"int32"},"target_id":{"type":"integer","format":"int32"},"type_id":{"type":["string","null"],"format":"uuid"}}},"FunctionQueryRequest":{"type":"object","properties":{"commit_id":{"type":["integer","null"],"format":"int32","description":"Only return functions with the provided commit ID."},"constraints":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"Only return functions with one of the provided constraint GUIDs.\n\nThis is a little strange, we actually just use this for filtering and allow any\nfunction to match from any in the list, rather than associating specific constraints\nwith a given function. The reason is simply because the purpose of this is to minimize\ntransmitting useless functions which are definitely not the correct one (e.g. NO constraints are same)"},"format":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseFormat","description":"How the response should be formatted.\n\nWe need to support returning flatbuffer data for consumption by the Binary Ninja client."}]},"guids":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"The list of GUIDs to query."},"limit":{"type":["integer","null"],"format":"int64","description":"The paginated limit for this request."},"page":{"type":["integer","null"],"format":"int64","description":"The paginated offset (or page) for this request."},"source_id":{"type":["string","null"],"format":"uuid","description":"Only return functions with the provided source ID."},"source_tags":{"type":["array","null"],"items":{"type":"string"},"description":"Only return functions with a source that contains any of the provided tags."},"symbol_id":{"type":["integer","null"],"format":"int32"},"target_id":{"type":["integer","null"],"format":"int32","description":"Only return functions with the provided target ID."}}},"NextUrl":{"type":"object","properties":{"next":{"type":["string","null"]}}},"PaginatedVec_CommitMdl":{"type":"object","required":["items","total_pages","total_results"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","created_at","source_id"],"properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"name":{"type":["string","null"]},"source_id":{"type":"string","format":"uuid"},"user_id":{"type":["integer","null"],"format":"int32"}}}},"total_pages":{"type":"integer","format":"int32","minimum":0},"total_results":{"type":"integer","format":"int64","minimum":0}}},"PaginatedVec_FunctionMdl":{"type":"object","required":["items","total_pages","total_results"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","created_at","commit_id","target_id","source_id","guid","symbol_id"],"properties":{"commit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"guid":{"type":"string","format":"uuid"},"id":{"type":"integer","format":"int32"},"source_id":{"type":"string","format":"uuid"},"symbol_id":{"type":"integer","format":"int32"},"target_id":{"type":"integer","format":"int32"},"type_id":{"type":["string","null"],"format":"uuid"}}}},"total_pages":{"type":"integer","format":"int32","minimum":0},"total_results":{"type":"integer","format":"int64","minimum":0}}},"PaginatedVec_SourceMdl":{"type":"object","required":["items","total_pages","total_results"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","created_at","name"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"total_pages":{"type":"integer","format":"int32","minimum":0},"total_results":{"type":"integer","format":"int64","minimum":0}}},"PaginatedVec_SymbolMdl":{"type":"object","required":["items","total_pages","total_results"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","created_at","name","class","modifier"],"properties":{"class":{"$ref":"#/components/schemas/SymbolClassMdl"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int32"},"modifier":{"$ref":"#/components/schemas/SymbolModifierMdl"},"name":{"type":"string"}}}},"total_pages":{"type":"integer","format":"int32","minimum":0},"total_results":{"type":"integer","format":"int64","minimum":0}}},"PaginatedVec_TypeMdl":{"type":"object","required":["items","total_pages","total_results"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","created_at","commit_id","source_id","data"],"properties":{"commit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"source_id":{"type":"string","format":"uuid"}}}},"total_pages":{"type":"integer","format":"int32","minimum":0},"total_results":{"type":"integer","format":"int64","minimum":0}}},"PaginatedVec_UserInfo":{"type":"object","required":["items","total_pages","total_results"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","username","role","created_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int32"},"role":{"$ref":"#/components/schemas/UserRoleMdl"},"username":{"type":"string"}}}},"total_pages":{"type":"integer","format":"int32","minimum":0},"total_results":{"type":"integer","format":"int64","minimum":0}}},"PushResponse":{"type":"object","required":["commit_id"],"properties":{"commit_id":{"type":"integer","format":"int32"}}},"PutSourceRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"},"description":"Set the source tags, must be an admin to do this."},"user_ids":{"type":["array","null"],"items":{"type":"integer","format":"int32"}}}},"ResponseFormat":{"type":"string","description":"Some route handlers support multiple outgoing formats.\n\nSee [`functions::query_functions`] for an example.","enum":["json","flatbuffer"]},"SearchIndexRow":{"type":"object","required":["kind","id","created_at"],"properties":{"commit_id":{"type":["integer","null"],"format":"int32"},"created_at":{"type":"string","format":"date-time"},"data":{"type":["array","null"],"items":{"type":"integer","format":"int32","minimum":0},"description":"Binary payload for the item:\n- For kind == \"type\": WARP type bytes\n- For kind == \"function\": WARP function bytes\n- Otherwise: empty"},"function_guid":{"type":["string","null"],"format":"uuid"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":["string","null"]},"source_id":{"type":["string","null"],"format":"uuid"},"symbol_id":{"type":["integer","null"],"format":"int32"}}},"SearchResponse":{"type":"object","required":["total","limit","offset","items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SearchIndexRow"}},"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"SourceMdl":{"type":"object","required":["id","created_at","name"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"SourceQueryRequest":{"type":"object","properties":{"exact":{"type":["boolean","null"]},"limit":{"type":["integer","null"],"format":"int64"},"name":{"type":["string","null"],"description":"Search term for source name.","example":"mason"},"page":{"type":["integer","null"],"format":"int64"},"user_id":{"type":["integer","null"],"format":"int32","description":"Search for sources with user."}}},"SourceTagMdl":{"type":"object","required":["source_id","tag"],"properties":{"source_id":{"type":"string","format":"uuid"},"tag":{"type":"string"}}},"SourceUserMdl":{"type":"object","required":["source_id","user_id"],"properties":{"source_id":{"type":"string","format":"uuid"},"user_id":{"type":"integer","format":"int32"}}},"StatusResponse":{"type":"object","description":"Simple health-check response","required":["status"],"properties":{"status":{"type":"string","description":"Service status"}}},"SymbolClassMdl":{"type":"string","enum":["Bare","Data","Function"]},"SymbolMdl":{"type":"object","required":["id","created_at","name","class","modifier"],"properties":{"class":{"$ref":"#/components/schemas/SymbolClassMdl"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int32"},"modifier":{"$ref":"#/components/schemas/SymbolModifierMdl"},"name":{"type":"string"}}},"SymbolModifierMdl":{"type":"string","enum":["None","Extern","Exported"]},"SymbolQueryRequest":{"type":"object","properties":{"exact":{"type":["boolean","null"],"default":false},"limit":{"type":["integer","null"],"format":"int64"},"name":{"type":["string","null"],"description":"Search term for symbol name.","example":"init"},"page":{"type":["integer","null"],"format":"int64"}}},"TargetMdl":{"type":"object","required":["id","created_at"],"properties":{"arch":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int32"},"platform":{"type":["string","null"]}}},"TargetQueryRequest":{"type":"object","properties":{"arch":{"type":["string","null"],"description":"Filter by architecture, e.g. \"x86_64\"","example":"x86_64"},"platform":{"type":["string","null"],"description":"Filter by platform, e.g. \"linux\"","example":"linux"}}},"TypeMdl":{"type":"object","required":["id","created_at","commit_id","source_id","data"],"properties":{"commit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"source_id":{"type":"string","format":"uuid"}}},"TypeQueryRequest":{"type":"object","properties":{"exact":{"type":["boolean","null"],"description":"if true, do `name = ?`, else `ILIKE %?%`"},"format":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseFormat"}]},"limit":{"type":["integer","null"],"format":"int64"},"name":{"type":["string","null"]},"page":{"type":["integer","null"],"format":"int64"}}},"UploadFile":{"type":"object","required":["id","name","file"],"properties":{"file":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"name":{"type":"string"},"source":{"type":"string"}}},"UploadFileJson":{"type":"object","required":["name","source","file"],"properties":{"description":{"type":["string","null"],"description":"Description of the upload, this will be attached to the commit."},"file":{"type":"string","description":"Base64-encoded file bytes. Max 64MB."},"name":{"type":"string","description":"Name of the upload, this will be attached to the commit."},"source":{"type":"string","format":"uuid","description":"The source to upload to."}}},"UserInfo":{"type":"object","required":["id","username","role","created_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int32"},"role":{"$ref":"#/components/schemas/UserRoleMdl"},"username":{"type":"string"}}},"UserMdl":{"type":"object","required":["id","created_at","email","role","username"],"properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"id":{"type":"integer","format":"int32"},"role":{"$ref":"#/components/schemas/UserRoleMdl"},"username":{"type":"string"}}},"UserQueryRequest":{"type":"object","properties":{"exact":{"type":["boolean","null"],"description":"if true, do `username = ?`, else `ILIKE %?%`"},"limit":{"type":["integer","null"],"format":"int64"},"name":{"type":["string","null"]},"page":{"type":["integer","null"],"format":"int64"},"role":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserRoleMdl"}]}}},"UserRoleMdl":{"type":"string","enum":["User","Admin"]}}},"security":[{"bearerAuth":[]}]}