feat: implement RFS client with authentication and file management APIs

This commit is contained in:
Sameh Abouelsaad
2025-08-27 17:59:20 +03:00
parent b39f24ca8f
commit c2969621b1
154 changed files with 8065 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
# \AuthenticationApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**sign_in_handler**](AuthenticationApi.md#sign_in_handler) | **POST** /api/v1/signin |
## sign_in_handler
> models::SignInResponse sign_in_handler(sign_in_body)
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**sign_in_body** | [**SignInBody**](SignInBody.md) | | [required] |
### Return type
[**models::SignInResponse**](SignInResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,14 @@
# Block
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**std::path::PathBuf**](std::path::PathBuf.md) | |
**hash** | **String** | |
**index** | **i64** | |
**size** | **i32** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# BlockDownloadsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**block_hash** | **String** | Block hash |
**block_size** | **i64** | Size of the block in bytes |
**downloads_count** | **i64** | Number of times the block has been downloaded |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# BlockInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hash** | **String** | Block hash |
**index** | **i64** | Block index within the file |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,250 @@
# \BlockManagementApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**check_block_handler**](BlockManagementApi.md#check_block_handler) | **HEAD** /api/v1/block/{hash} | Checks a block by its hash.
[**get_block_downloads_handler**](BlockManagementApi.md#get_block_downloads_handler) | **GET** /api/v1/block/{hash}/downloads | Retrieve the number of times a block has been downloaded.
[**get_block_handler**](BlockManagementApi.md#get_block_handler) | **GET** /api/v1/block/{hash} | Retrieve a block by its hash.
[**get_blocks_by_hash_handler**](BlockManagementApi.md#get_blocks_by_hash_handler) | **GET** /api/v1/blocks/{hash} | Retrieve blocks by hash (file hash or block hash).
[**get_user_blocks_handler**](BlockManagementApi.md#get_user_blocks_handler) | **GET** /api/v1/user/blocks | Retrieve all blocks uploaded by a specific user.
[**list_blocks_handler**](BlockManagementApi.md#list_blocks_handler) | **GET** /api/v1/blocks | List all block hashes in the server with pagination
[**upload_block_handler**](BlockManagementApi.md#upload_block_handler) | **POST** /api/v1/block | Upload a block to the server.
[**verify_blocks_handler**](BlockManagementApi.md#verify_blocks_handler) | **POST** /api/v1/block/verify | Verify if multiple blocks exist on the server.
## check_block_handler
> check_block_handler(hash)
Checks a block by its hash.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**hash** | **String** | Block hash | [required] |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_block_downloads_handler
> models::BlockDownloadsResponse get_block_downloads_handler(hash)
Retrieve the number of times a block has been downloaded.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**hash** | **String** | Block hash | [required] |
### Return type
[**models::BlockDownloadsResponse**](BlockDownloadsResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_block_handler
> std::path::PathBuf get_block_handler(hash)
Retrieve a block by its hash.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**hash** | **String** | Block hash | [required] |
### Return type
[**std::path::PathBuf**](std::path::PathBuf.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/octet-stream, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_blocks_by_hash_handler
> models::BlocksResponse get_blocks_by_hash_handler(hash)
Retrieve blocks by hash (file hash or block hash).
If the hash is a file hash, returns all blocks with their block index related to that file. If the hash is a block hash, returns the block itself.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**hash** | **String** | File hash or block hash | [required] |
### Return type
[**models::BlocksResponse**](BlocksResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_user_blocks_handler
> models::UserBlocksResponse get_user_blocks_handler(page, per_page)
Retrieve all blocks uploaded by a specific user.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**page** | Option<**i32**> | Page number (1-indexed) | |
**per_page** | Option<**i32**> | Number of items per page | |
### Return type
[**models::UserBlocksResponse**](UserBlocksResponse.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_blocks_handler
> models::ListBlocksResponse list_blocks_handler(page, per_page)
List all block hashes in the server with pagination
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**page** | Option<**i32**> | Page number (1-indexed) | |
**per_page** | Option<**i32**> | Number of items per page | |
### Return type
[**models::ListBlocksResponse**](ListBlocksResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## upload_block_handler
> models::BlockUploadedResponse upload_block_handler(file_hash, idx, body)
Upload a block to the server.
If the block already exists, the server will return a 200 OK response. If the block is new, the server will return a 201 Created response.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**file_hash** | **String** | File hash associated with the block | [required] |
**idx** | **i64** | Block index within the file | [required] |
**body** | **std::path::PathBuf** | Block data to upload | [required] |
### Return type
[**models::BlockUploadedResponse**](BlockUploadedResponse.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/octet-stream
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## verify_blocks_handler
> models::VerifyBlocksResponse verify_blocks_handler(verify_blocks_request)
Verify if multiple blocks exist on the server.
Returns a list of missing blocks.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**verify_blocks_request** | [**VerifyBlocksRequest**](VerifyBlocksRequest.md) | List of block hashes to verify | [required] |
### Return type
[**models::VerifyBlocksResponse**](VerifyBlocksResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# BlockUploadedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hash** | **String** | |
**message** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# BlocksResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**blocks** | [**Vec<models::BlockInfo>**](BlockInfo.md) | List of blocks with their indices |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# DirListTemplate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cur_path** | **String** | |
**lister** | [**models::DirLister**](DirLister.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# DirLister
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**files** | [**Vec<models::FileInfo>**](FileInfo.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# ErrorTemplate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cur_path** | **String** | |
**err** | [**models::TemplateErr**](TemplateErr.md) | |
**message** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# File
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_content** | [**std::path::PathBuf**](std::path::PathBuf.md) | |
**file_hash** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# FileDownloadRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_name** | **String** | The custom filename to use for download |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,16 @@
# FileInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**is_file** | **bool** | |
**last_modified** | **i64** | |
**name** | **String** | |
**path_uri** | **String** | |
**progress** | **f32** | |
**size** | **i64** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,71 @@
# \FileManagementApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_file_handler**](FileManagementApi.md#get_file_handler) | **GET** /api/v1/file/{hash} | Retrieve a file by its hash from path, with optional custom filename in request body.
[**upload_file_handler**](FileManagementApi.md#upload_file_handler) | **POST** /api/v1/file | Upload a file to the server.
## get_file_handler
> std::path::PathBuf get_file_handler(hash, file_download_request)
Retrieve a file by its hash from path, with optional custom filename in request body.
The file will be reconstructed from its blocks.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**hash** | **String** | File hash | [required] |
**file_download_request** | [**FileDownloadRequest**](FileDownloadRequest.md) | Optional custom filename for download | [required] |
### Return type
[**std::path::PathBuf**](std::path::PathBuf.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/octet-stream, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## upload_file_handler
> models::FileUploadResponse upload_file_handler(body)
Upload a file to the server.
The file will be split into blocks and stored in the database.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | **std::path::PathBuf** | File data to upload | [required] |
### Return type
[**models::FileUploadResponse**](FileUploadResponse.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/octet-stream
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# FileUploadResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_hash** | **String** | The file hash |
**message** | **String** | Message indicating success |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,18 @@
# FlistBody
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**auth** | Option<**String**> | | [optional]
**email** | Option<**String**> | | [optional]
**identity_token** | Option<**String**> | | [optional]
**image_name** | **String** | |
**password** | Option<**String**> | | [optional]
**registry_token** | Option<**String**> | | [optional]
**server_address** | Option<**String**> | | [optional]
**username** | Option<**String**> | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,150 @@
# \FlistManagementApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_flist_handler**](FlistManagementApi.md#create_flist_handler) | **POST** /api/v1/fl |
[**get_flist_state_handler**](FlistManagementApi.md#get_flist_state_handler) | **GET** /api/v1/fl/{job_id} |
[**list_flists_handler**](FlistManagementApi.md#list_flists_handler) | **GET** /api/v1/fl |
[**preview_flist_handler**](FlistManagementApi.md#preview_flist_handler) | **GET** /api/v1/fl/preview/{flist_path} |
[**serve_flists**](FlistManagementApi.md#serve_flists) | **GET** /{path} | Serve flist files from the server's filesystem
## create_flist_handler
> models::Job create_flist_handler(flist_body)
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**flist_body** | [**FlistBody**](FlistBody.md) | | [required] |
### Return type
[**models::Job**](Job.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_flist_state_handler
> models::FlistStateResponse get_flist_state_handler(job_id)
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**job_id** | **String** | flist job id | [required] |
### Return type
[**models::FlistStateResponse**](FlistStateResponse.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_flists_handler
> std::collections::HashMap<String, Vec<models::FileInfo>> list_flists_handler()
### Parameters
This endpoint does not need any parameter.
### Return type
[**std::collections::HashMap<String, Vec<models::FileInfo>>**](Vec.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## preview_flist_handler
> models::PreviewResponse preview_flist_handler(flist_path)
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**flist_path** | **String** | flist file path | [required] |
### Return type
[**models::PreviewResponse**](PreviewResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## serve_flists
> std::path::PathBuf serve_flists(path)
Serve flist files from the server's filesystem
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**path** | **String** | Path to the flist file or directory to serve | [required] |
### Return type
[**std::path::PathBuf**](std::path::PathBuf.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/octet-stream, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,37 @@
# \FlistServingApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**serve_flists**](FlistServingApi.md#serve_flists) | **GET** /{path} | Serve flist files from the server's filesystem
## serve_flists
> models::ResponseResult serve_flists(path)
Serve flist files from the server's filesystem
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**path** | **String** | Path to the flist file or directory to serve | [required] |
### Return type
[**models::ResponseResult**](ResponseResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,15 @@
# FlistState
## Enum Variants
| Name | Description |
|---- | -----|
| FlistStateAccepted | |
| FlistStateCreated | |
| FlistStateInProgress | |
| FlistStateStarted | |
| String | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# FlistStateAccepted
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accepted** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# FlistStateCreated
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**created** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# FlistStateInProgress
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**in_progress** | [**models::FlistStateInfo**](FlistStateInfo.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# FlistStateInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**msg** | **String** | |
**progress** | **f32** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# FlistStateResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**flist_state** | [**models::FlistState**](FlistState.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# FlistStateStarted
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**started** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# HealthResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**msg** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# Job
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# ListBlocksParams
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**page** | Option<**i32**> | Page number (1-indexed) | [optional][default to 1]
**per_page** | Option<**i32**> | Number of items per page | [optional][default to 50]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,14 @@
# ListBlocksResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**blocks** | **Vec<String>** | List of block hashes |
**page** | **i32** | Current page number |
**per_page** | **i32** | Number of items per page |
**total** | **i64** | Total number of blocks |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# PreviewResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**checksum** | **String** | |
**content** | **Vec<String>** | |
**metadata** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,17 @@
# ResponseError
## Enum Variants
| Name | Description |
|---- | -----|
| ResponseErrorBadRequest | |
| ResponseErrorConflict | |
| ResponseErrorForbidden | |
| ResponseErrorNotFound | |
| ResponseErrorTemplateError | |
| ResponseErrorUnauthorized | |
| String | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseErrorBadRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bad_request** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseErrorConflict
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conflict** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseErrorForbidden
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**forbidden** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseErrorNotFound
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**not_found** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseErrorTemplateError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**template_error** | [**models::ErrorTemplate**](ErrorTemplate.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseErrorUnauthorized
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**unauthorized** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,20 @@
# ResponseResult
## Enum Variants
| Name | Description |
|---- | -----|
| ResponseResultBlockUploaded | |
| ResponseResultDirTemplate | |
| ResponseResultFileUploaded | |
| ResponseResultFlistCreated | |
| ResponseResultFlistState | |
| ResponseResultFlists | |
| ResponseResultPreviewFlist | |
| ResponseResultRes | |
| ResponseResultSignedIn | |
| String | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultBlockUploaded
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**block_uploaded** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultDirTemplate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**dir_template** | [**models::DirListTemplate**](DirListTemplate.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultFileUploaded
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_uploaded** | [**models::FileUploadResponse**](FileUploadResponse.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultFlistCreated
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**flist_created** | [**models::Job**](Job.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultFlistState
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**flist_state** | [**models::FlistState**](FlistState.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultFlists
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**flists** | [**std::collections::HashMap<String, Vec<models::FileInfo>>**](Vec.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultPreviewFlist
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**preview_flist** | [**models::PreviewResponse**](PreviewResponse.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultRes
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**res** | [**std::path::PathBuf**](std::path::PathBuf.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# ResponseResultSignedIn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**signed_in** | [**models::SignInResponse**](SignInResponse.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# SignInBody
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**password** | **String** | |
**username** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# SignInResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**access_token** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# \SystemApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**health_check_handler**](SystemApi.md#health_check_handler) | **GET** /api/v1 |
## health_check_handler
> models::HealthResponse health_check_handler()
### Parameters
This endpoint does not need any parameter.
### Return type
[**models::HealthResponse**](HealthResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# TemplateErr
## Enum Variants
| Name | Description |
|---- | -----|
| TemplateErrBadRequest | |
| TemplateErrInternalServerError | |
| TemplateErrNotFound | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# TemplateErrBadRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bad_request** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# TemplateErrInternalServerError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**internal_server_error** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# TemplateErrNotFound
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**not_found** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# UploadBlockParams
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_hash** | **String** | File hash associated with the block |
**idx** | **i64** | Block index within the file |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# UserBlockInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hash** | **String** | Block hash |
**size** | **i64** | Block size in bytes |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# UserBlocksResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**all_blocks** | **i64** | Total number of all blocks |
**blocks** | [**Vec<models::UserBlockInfo>**](UserBlockInfo.md) | List of blocks with their sizes |
**total** | **i64** | Total number of blocks |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# VerifyBlock
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**block_hash** | **String** | Block hash to verify |
**block_index** | **i64** | Block index within the file |
**file_hash** | **String** | File hash associated with the block |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# VerifyBlocksRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**blocks** | [**Vec<models::VerifyBlock>**](VerifyBlock.md) | List of blocks to verify |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,11 @@
# VerifyBlocksResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**missing** | **Vec<String>** | List of block hashes that are missing on the server |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,38 @@
# \WebsiteServingApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**serve_website_handler**](WebsiteServingApi.md#serve_website_handler) | **GET** /api/v1/website/{website_hash}/{path} |
## serve_website_handler
> std::path::PathBuf serve_website_handler(website_hash, path)
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**website_hash** | **String** | flist hash of the website directory | [required] |
**path** | **String** | Path to the file within the website directory, defaults to index.html if empty | [required] |
### Return type
[**std::path::PathBuf**](std::path::PathBuf.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/octet-stream, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)