diff --git a/python/sdk/src/.openapi-generator/FILES b/python/sdk/src/.openapi-generator/FILES index 15e9747..fb3a351 100644 --- a/python/sdk/src/.openapi-generator/FILES +++ b/python/sdk/src/.openapi-generator/FILES @@ -3,6 +3,7 @@ openapi_client/api/__init__.py openapi_client/api/account_data_api.py openapi_client/api/auth_api.py openapi_client/api/exchange_api.py +openapi_client/api/kora_api.py openapi_client/api/rewards_api.py openapi_client/api/streams_api.py openapi_client/api/trade_api.py @@ -66,6 +67,7 @@ openapi_client/docs/EpochConfigs.md openapi_client/docs/EpochConfigsResponse.md openapi_client/docs/EpochMetadata.md openapi_client/docs/Error.md +openapi_client/docs/Error1.md openapi_client/docs/ExchangeApi.md openapi_client/docs/ExchangeInfoResponse.md openapi_client/docs/FailedCommandType.md @@ -79,6 +81,9 @@ openapi_client/docs/IntervalMetadata.md openapi_client/docs/IntervalRewards.md openapi_client/docs/IssBase64Details.md openapi_client/docs/KlineInterval.md +openapi_client/docs/KoraApi.md +openapi_client/docs/KoraHealthCheck200Response.md +openapi_client/docs/KoraUserBonusResponse.md openapi_client/docs/LeaderboardEntry.md openapi_client/docs/LeaderboardInterval.md openapi_client/docs/LeaderboardResponse.md @@ -212,6 +217,7 @@ openapi_client/models/epoch_configs.py openapi_client/models/epoch_configs_response.py openapi_client/models/epoch_metadata.py openapi_client/models/error.py +openapi_client/models/error1.py openapi_client/models/exchange_info_response.py openapi_client/models/failed_command_type.py openapi_client/models/fee_configs.py @@ -224,6 +230,8 @@ openapi_client/models/interval_metadata.py openapi_client/models/interval_rewards.py openapi_client/models/iss_base64_details.py openapi_client/models/kline_interval.py +openapi_client/models/kora_health_check200_response.py +openapi_client/models/kora_user_bonus_response.py openapi_client/models/leaderboard_entry.py openapi_client/models/leaderboard_interval.py openapi_client/models/leaderboard_response.py @@ -299,8 +307,6 @@ openapi_client/models/zk_login_zkp_request.py openapi_client/models/zk_login_zkp_response.py openapi_client/rest.py openapi_client/test/__init__.py -openapi_client/test/test_leaderboard_entry.py -openapi_client/test/test_leaderboard_interval.py -openapi_client/test/test_leaderboard_response.py -openapi_client/test/test_sort_order.py +openapi_client/test/test_error1.py +openapi_client/test/test_kora_user_bonus_response.py openapi_client_README.md diff --git a/python/sdk/src/openapi_client/__init__.py b/python/sdk/src/openapi_client/__init__.py index 6fade1b..48ede19 100644 --- a/python/sdk/src/openapi_client/__init__.py +++ b/python/sdk/src/openapi_client/__init__.py @@ -20,6 +20,7 @@ from openapi_client.api.account_data_api import AccountDataApi from openapi_client.api.auth_api import AuthApi from openapi_client.api.exchange_api import ExchangeApi +from openapi_client.api.kora_api import KoraApi from openapi_client.api.rewards_api import RewardsApi from openapi_client.api.streams_api import StreamsApi from openapi_client.api.trade_api import TradeApi @@ -91,6 +92,7 @@ from openapi_client.models.epoch_configs_response import EpochConfigsResponse from openapi_client.models.epoch_metadata import EpochMetadata from openapi_client.models.error import Error +from openapi_client.models.error1 import Error1 from openapi_client.models.exchange_info_response import ExchangeInfoResponse from openapi_client.models.failed_command_type import FailedCommandType from openapi_client.models.fee_configs import FeeConfigs @@ -103,6 +105,8 @@ from openapi_client.models.interval_rewards import IntervalRewards from openapi_client.models.iss_base64_details import IssBase64Details from openapi_client.models.kline_interval import KlineInterval +from openapi_client.models.kora_health_check200_response import KoraHealthCheck200Response +from openapi_client.models.kora_user_bonus_response import KoraUserBonusResponse from openapi_client.models.leaderboard_entry import LeaderboardEntry from openapi_client.models.leaderboard_interval import LeaderboardInterval from openapi_client.models.leaderboard_response import LeaderboardResponse diff --git a/python/sdk/src/openapi_client/api/__init__.py b/python/sdk/src/openapi_client/api/__init__.py index 009c24a..3fc3835 100644 --- a/python/sdk/src/openapi_client/api/__init__.py +++ b/python/sdk/src/openapi_client/api/__init__.py @@ -4,6 +4,7 @@ from openapi_client.api.account_data_api import AccountDataApi from openapi_client.api.auth_api import AuthApi from openapi_client.api.exchange_api import ExchangeApi +from openapi_client.api.kora_api import KoraApi from openapi_client.api.rewards_api import RewardsApi from openapi_client.api.streams_api import StreamsApi from openapi_client.api.trade_api import TradeApi diff --git a/python/sdk/src/openapi_client/api/kora_api.py b/python/sdk/src/openapi_client/api/kora_api.py new file mode 100644 index 0000000..8c09ad6 --- /dev/null +++ b/python/sdk/src/openapi_client/api/kora_api.py @@ -0,0 +1,281 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from openapi_client.models.kora_health_check200_response import KoraHealthCheck200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class KoraApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def kora_health_check( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> KoraHealthCheck200Response: + """Kora service health check + + Returns the health status of the Kora rewards service. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._kora_health_check_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "KoraHealthCheck200Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def kora_health_check_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[KoraHealthCheck200Response]: + """Kora service health check + + Returns the health status of the Kora rewards service. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._kora_health_check_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "KoraHealthCheck200Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def kora_health_check_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Kora service health check + + Returns the health status of the Kora rewards service. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._kora_health_check_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "KoraHealthCheck200Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _kora_health_check_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/kora/health', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/python/sdk/src/openapi_client/api/rewards_api.py b/python/sdk/src/openapi_client/api/rewards_api.py index 52e5206..c6368b7 100644 --- a/python/sdk/src/openapi_client/api/rewards_api.py +++ b/python/sdk/src/openapi_client/api/rewards_api.py @@ -31,6 +31,7 @@ from openapi_client.models.get_affiliate_overview200_response import GetAffiliateOverview200Response from openapi_client.models.interval_metadata import IntervalMetadata from openapi_client.models.interval_rewards import IntervalRewards +from openapi_client.models.kora_user_bonus_response import KoraUserBonusResponse from openapi_client.models.mark_as_claimed_request import MarkAsClaimedRequest from openapi_client.models.mark_as_claimed_response import MarkAsClaimedResponse from openapi_client.models.onboard_affiliate_request import OnboardAffiliateRequest @@ -3756,6 +3757,271 @@ def _get_rewards_summary_serialize( + @validate_call + async def get_user_bonuses( + self, + epoch_number: Annotated[StrictInt, Field(description="Specify the epoch number")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[KoraUserBonusResponse]: + """Get all user bonuses by epoch + + Returns the bonuses earned by all users for a specific epoch number. + + :param epoch_number: Specify the epoch number (required) + :type epoch_number: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_bonuses_serialize( + epoch_number=epoch_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KoraUserBonusResponse]", + '400': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_bonuses_with_http_info( + self, + epoch_number: Annotated[StrictInt, Field(description="Specify the epoch number")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[KoraUserBonusResponse]]: + """Get all user bonuses by epoch + + Returns the bonuses earned by all users for a specific epoch number. + + :param epoch_number: Specify the epoch number (required) + :type epoch_number: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_bonuses_serialize( + epoch_number=epoch_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KoraUserBonusResponse]", + '400': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_bonuses_without_preload_content( + self, + epoch_number: Annotated[StrictInt, Field(description="Specify the epoch number")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get all user bonuses by epoch + + Returns the bonuses earned by all users for a specific epoch number. + + :param epoch_number: Specify the epoch number (required) + :type epoch_number: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_bonuses_serialize( + epoch_number=epoch_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KoraUserBonusResponse]", + '400': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_bonuses_serialize( + self, + epoch_number, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if epoch_number is not None: + + _query_params.append(('epochNumber', epoch_number)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/rewards/bonuses', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call async def mark_as_claimed( self, diff --git a/python/sdk/src/openapi_client/docs/Error1.md b/python/sdk/src/openapi_client/docs/Error1.md new file mode 100644 index 0000000..a05bfdb --- /dev/null +++ b/python/sdk/src/openapi_client/docs/Error1.md @@ -0,0 +1,30 @@ +# Error1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error message | [optional] +**code** | **str** | Error code | [optional] + +## Example + +```python +from openapi_client.models.error1 import Error1 + +# TODO update the JSON string below +json = "{}" +# create an instance of Error1 from a JSON string +error1_instance = Error1.from_json(json) +# print the JSON string representation of the object +print(Error1.to_json()) + +# convert the object into a dict +error1_dict = error1_instance.to_dict() +# create an instance of Error1 from a dict +error1_from_dict = Error1.from_dict(error1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraApi.md b/python/sdk/src/openapi_client/docs/KoraApi.md new file mode 100644 index 0000000..b4ac1a4 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraApi.md @@ -0,0 +1,73 @@ +# openapi_client.KoraApi + +All URIs are relative to *https://api.sui-staging.bluefin.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**kora_health_check**](KoraApi.md#kora_health_check) | **GET** /v1/kora/health | Kora service health check + + +# **kora_health_check** +> KoraHealthCheck200Response kora_health_check() + +Kora service health check + +Returns the health status of the Kora rewards service. + +### Example + + +```python +import openapi_client +from openapi_client.models.kora_health_check200_response import KoraHealthCheck200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.sui-staging.bluefin.io +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.sui-staging.bluefin.io" +) + + +# Enter a context with an instance of the API client +async with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.KoraApi(api_client) + + try: + # Kora service health check + api_response = await api_instance.kora_health_check() + print("The response of KoraApi->kora_health_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling KoraApi->kora_health_check: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**KoraHealthCheck200Response**](KoraHealthCheck200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Service is healthy | - | + +[[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) + diff --git a/python/sdk/src/openapi_client/docs/KoraCampaignBonus.md b/python/sdk/src/openapi_client/docs/KoraCampaignBonus.md new file mode 100644 index 0000000..17743c5 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraCampaignBonus.md @@ -0,0 +1,32 @@ +# KoraCampaignBonus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bonus_type** | **str** | Type of bonus (e.g., VOLUME_BONUS, REFERRAL_BONUS) | [optional] +**bonus_cc_reward** | **str** | CC reward amount for this bonus | [optional] +**bonus_points** | **str** | Points earned for this bonus | [optional] +**bonus_criteria** | **str** | Criteria that was met for earning this bonus | [optional] + +## Example + +```python +from openapi_client.models.kora_campaign_bonus import KoraCampaignBonus + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraCampaignBonus from a JSON string +kora_campaign_bonus_instance = KoraCampaignBonus.from_json(json) +# print the JSON string representation of the object +print(KoraCampaignBonus.to_json()) + +# convert the object into a dict +kora_campaign_bonus_dict = kora_campaign_bonus_instance.to_dict() +# create an instance of KoraCampaignBonus from a dict +kora_campaign_bonus_from_dict = KoraCampaignBonus.from_dict(kora_campaign_bonus_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraCampaignMetadata.md b/python/sdk/src/openapi_client/docs/KoraCampaignMetadata.md new file mode 100644 index 0000000..db7447c --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraCampaignMetadata.md @@ -0,0 +1,33 @@ +# KoraCampaignMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**campaign_name** | **str** | Name of the campaign | +**parent_campaign_name** | **str** | Name of the parent campaign | [optional] +**start_date** | **int** | Time in milliseconds for campaign start date | +**end_date** | **int** | Time in milliseconds for campaign end date | + +## Example + +```python +from openapi_client.models.kora_campaign_metadata import KoraCampaignMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraCampaignMetadata from a JSON string +kora_campaign_metadata_instance = KoraCampaignMetadata.from_json(json) +# print the JSON string representation of the object +print(KoraCampaignMetadata.to_json()) + +# convert the object into a dict +kora_campaign_metadata_dict = kora_campaign_metadata_instance.to_dict() +# create an instance of KoraCampaignMetadata from a dict +kora_campaign_metadata_from_dict = KoraCampaignMetadata.from_dict(kora_campaign_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraCampaignRewards.md b/python/sdk/src/openapi_client/docs/KoraCampaignRewards.md new file mode 100644 index 0000000..eae223e --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraCampaignRewards.md @@ -0,0 +1,47 @@ +# KoraCampaignRewards + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_address** | **str** | User address for the rewards earned data | +**campaign_name** | **str** | Name of the campaign | +**epoch_number** | **int** | Epoch number for the rewards earned data | +**interval_number** | **int** | Interval number for the rewards earned data | +**symbol** | **str** | Market Symbol | [optional] +**status** | **str** | | +**blue_rewards** | **str** | Total blue token rewards | [optional] +**sui_rewards** | **str** | Total sui token rewards | [optional] +**wal_rewards** | **str** | Total wal rewards | [optional] +**cash_rewards** | **str** | Total cash rewards | [optional] +**cc_rewards** | **str** | Total CC token rewards | [optional] +**kora_points** | **str** | Total Kora points earned | [optional] +**user_fee_paid** | **str** | Total user fee paid | [optional] +**interval_start_date** | **int** | Time in milliseconds for interval start date | [optional] +**interval_end_date** | **int** | Time in milliseconds for interval end date | [optional] +**is_disbursed** | **bool** | Indicates if rewards have been disbursed | [optional] +**txn_digest** | **str** | Transaction digest of the disbursement | [optional] +**claim_status** | **str** | Status of the claim | [optional] +**bonuses** | [**List[KoraCampaignBonus]**](KoraCampaignBonus.md) | List of bonuses attached to this reward entry | [optional] + +## Example + +```python +from openapi_client.models.kora_campaign_rewards import KoraCampaignRewards + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraCampaignRewards from a JSON string +kora_campaign_rewards_instance = KoraCampaignRewards.from_json(json) +# print the JSON string representation of the object +print(KoraCampaignRewards.to_json()) + +# convert the object into a dict +kora_campaign_rewards_dict = kora_campaign_rewards_instance.to_dict() +# create an instance of KoraCampaignRewards from a dict +kora_campaign_rewards_from_dict = KoraCampaignRewards.from_dict(kora_campaign_rewards_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraEpochConfig.md b/python/sdk/src/openapi_client/docs/KoraEpochConfig.md new file mode 100644 index 0000000..df34d5e --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraEpochConfig.md @@ -0,0 +1,38 @@ +# KoraEpochConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_name** | **str** | The name of the campaign | +**epoch_duration** | **int** | Duration of the epoch in hours | +**sui_rewards_allocation** | **str** | Allocation of Sui rewards for this epoch | [optional] +**blue_rewards_allocation** | **str** | Allocation of Blue rewards for this epoch | [optional] +**wal_rewards_allocation** | **str** | Allocation of Wal rewards for this epoch | [optional] +**cc_rewards_allocation** | **str** | Allocation of CC token rewards for this epoch | [optional] +**kora_points_rewards_allocation** | **str** | Allocation of Kora points rewards for this epoch | [optional] +**interval_number** | **int** | Interval number for the epoch | +**epoch_number** | **int** | Epoch number | +**config** | **Dict[str, object]** | Additional campaign-specific configurations | [optional] + +## Example + +```python +from openapi_client.models.kora_epoch_config import KoraEpochConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraEpochConfig from a JSON string +kora_epoch_config_instance = KoraEpochConfig.from_json(json) +# print the JSON string representation of the object +print(KoraEpochConfig.to_json()) + +# convert the object into a dict +kora_epoch_config_dict = kora_epoch_config_instance.to_dict() +# create an instance of KoraEpochConfig from a dict +kora_epoch_config_from_dict = KoraEpochConfig.from_dict(kora_epoch_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraEpochConfigResponse.md b/python/sdk/src/openapi_client/docs/KoraEpochConfigResponse.md new file mode 100644 index 0000000..29188fc --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraEpochConfigResponse.md @@ -0,0 +1,31 @@ +# KoraEpochConfigResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_interval_number** | **int** | The maximum interval number available | +**interval_number** | **int** | The current interval number being queried | +**data** | [**List[KoraEpochConfig]**](KoraEpochConfig.md) | | + +## Example + +```python +from openapi_client.models.kora_epoch_config_response import KoraEpochConfigResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraEpochConfigResponse from a JSON string +kora_epoch_config_response_instance = KoraEpochConfigResponse.from_json(json) +# print the JSON string representation of the object +print(KoraEpochConfigResponse.to_json()) + +# convert the object into a dict +kora_epoch_config_response_dict = kora_epoch_config_response_instance.to_dict() +# create an instance of KoraEpochConfigResponse from a dict +kora_epoch_config_response_from_dict = KoraEpochConfigResponse.from_dict(kora_epoch_config_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraEpochMetadata.md b/python/sdk/src/openapi_client/docs/KoraEpochMetadata.md new file mode 100644 index 0000000..4901114 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraEpochMetadata.md @@ -0,0 +1,34 @@ +# KoraEpochMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**campaign_name** | **str** | Name of the campaign | +**epoch_id** | **str** | Epoch ID | +**epoch_number** | **int** | Epoch number | +**start_date** | **int** | Time in milliseconds for epoch start date | +**end_date** | **int** | Time in milliseconds for epoch end date | + +## Example + +```python +from openapi_client.models.kora_epoch_metadata import KoraEpochMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraEpochMetadata from a JSON string +kora_epoch_metadata_instance = KoraEpochMetadata.from_json(json) +# print the JSON string representation of the object +print(KoraEpochMetadata.to_json()) + +# convert the object into a dict +kora_epoch_metadata_dict = kora_epoch_metadata_instance.to_dict() +# create an instance of KoraEpochMetadata from a dict +kora_epoch_metadata_from_dict = KoraEpochMetadata.from_dict(kora_epoch_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraHealthCheck200Response.md b/python/sdk/src/openapi_client/docs/KoraHealthCheck200Response.md new file mode 100644 index 0000000..16ccd09 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraHealthCheck200Response.md @@ -0,0 +1,30 @@ +# KoraHealthCheck200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | [optional] +**timestamp** | **int** | | [optional] + +## Example + +```python +from openapi_client.models.kora_health_check200_response import KoraHealthCheck200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraHealthCheck200Response from a JSON string +kora_health_check200_response_instance = KoraHealthCheck200Response.from_json(json) +# print the JSON string representation of the object +print(KoraHealthCheck200Response.to_json()) + +# convert the object into a dict +kora_health_check200_response_dict = kora_health_check200_response_instance.to_dict() +# create an instance of KoraHealthCheck200Response from a dict +kora_health_check200_response_from_dict = KoraHealthCheck200Response.from_dict(kora_health_check200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraIntervalMetadata.md b/python/sdk/src/openapi_client/docs/KoraIntervalMetadata.md new file mode 100644 index 0000000..946a416 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraIntervalMetadata.md @@ -0,0 +1,34 @@ +# KoraIntervalMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**start_date** | **int** | Time in milliseconds for interval start date | +**end_date** | **int** | Time in milliseconds for interval end date | +**interval_id** | **int** | Interval ID | +**interval_type** | **str** | Type of the interval | [optional] +**protocol** | **str** | Protocol for the interval | [optional] + +## Example + +```python +from openapi_client.models.kora_interval_metadata import KoraIntervalMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraIntervalMetadata from a JSON string +kora_interval_metadata_instance = KoraIntervalMetadata.from_json(json) +# print the JSON string representation of the object +print(KoraIntervalMetadata.to_json()) + +# convert the object into a dict +kora_interval_metadata_dict = kora_interval_metadata_instance.to_dict() +# create an instance of KoraIntervalMetadata from a dict +kora_interval_metadata_from_dict = KoraIntervalMetadata.from_dict(kora_interval_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraLeaderboardEntry.md b/python/sdk/src/openapi_client/docs/KoraLeaderboardEntry.md new file mode 100644 index 0000000..a7202db --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraLeaderboardEntry.md @@ -0,0 +1,41 @@ +# KoraLeaderboardEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rank** | **int** | Overall ranking position based on sortBy parameter | +**user_address** | **str** | Wallet address of the user | +**total_volume_e6** | **str** | Total swap volume (USD equivalent) | +**total_fee_e6** | **str** | Total fees paid | [optional] +**total_transactions** | **int** | Total number of qualifying swap transactions | +**cc_rewards** | **str** | CC token rewards earned | +**kora_points** | **str** | Kora points earned | +**total_bonus_points** | **str** | Total bonus points earned | [optional] +**total_bonus_cc** | **str** | Total bonus CC tokens earned | [optional] +**volume_rank** | **int** | Ranking based purely on trading volume | [optional] +**transaction_rank** | **int** | Ranking based purely on transaction count | [optional] +**total_earnings_rank** | **int** | Ranking based on combined CC + Kora points value | [optional] +**last_activity_date** | **int** | Timestamp of user's most recent swap (milliseconds) | [optional] + +## Example + +```python +from openapi_client.models.kora_leaderboard_entry import KoraLeaderboardEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraLeaderboardEntry from a JSON string +kora_leaderboard_entry_instance = KoraLeaderboardEntry.from_json(json) +# print the JSON string representation of the object +print(KoraLeaderboardEntry.to_json()) + +# convert the object into a dict +kora_leaderboard_entry_dict = kora_leaderboard_entry_instance.to_dict() +# create an instance of KoraLeaderboardEntry from a dict +kora_leaderboard_entry_from_dict = KoraLeaderboardEntry.from_dict(kora_leaderboard_entry_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraLeaderboardResponse.md b/python/sdk/src/openapi_client/docs/KoraLeaderboardResponse.md new file mode 100644 index 0000000..ed90215 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraLeaderboardResponse.md @@ -0,0 +1,32 @@ +# KoraLeaderboardResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[KoraLeaderboardEntry]**](KoraLeaderboardEntry.md) | | +**total** | **int** | Total number of records | +**limit** | **int** | Page size for pagination | +**page** | **int** | Current page number | + +## Example + +```python +from openapi_client.models.kora_leaderboard_response import KoraLeaderboardResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraLeaderboardResponse from a JSON string +kora_leaderboard_response_instance = KoraLeaderboardResponse.from_json(json) +# print the JSON string representation of the object +print(KoraLeaderboardResponse.to_json()) + +# convert the object into a dict +kora_leaderboard_response_dict = kora_leaderboard_response_instance.to_dict() +# create an instance of KoraLeaderboardResponse from a dict +kora_leaderboard_response_from_dict = KoraLeaderboardResponse.from_dict(kora_leaderboard_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraRewardsSummary.md b/python/sdk/src/openapi_client/docs/KoraRewardsSummary.md new file mode 100644 index 0000000..5783f33 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraRewardsSummary.md @@ -0,0 +1,34 @@ +# KoraRewardsSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_address** | **str** | User address for the rewards earned data | +**blue_rewards** | **str** | Total Blue token rewards earned | [optional] +**sui_rewards** | **str** | Total Sui token rewards earned | [optional] +**wal_rewards** | **str** | Total wal rewards earned | [optional] +**cc_rewards** | **str** | Total CC token rewards earned across all Kora campaigns | [optional] +**kora_points** | **str** | Total Kora points earned across all Kora campaigns | [optional] + +## Example + +```python +from openapi_client.models.kora_rewards_summary import KoraRewardsSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraRewardsSummary from a JSON string +kora_rewards_summary_instance = KoraRewardsSummary.from_json(json) +# print the JSON string representation of the object +print(KoraRewardsSummary.to_json()) + +# convert the object into a dict +kora_rewards_summary_dict = kora_rewards_summary_instance.to_dict() +# create an instance of KoraRewardsSummary from a dict +kora_rewards_summary_from_dict = KoraRewardsSummary.from_dict(kora_rewards_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/KoraUserBonusResponse.md b/python/sdk/src/openapi_client/docs/KoraUserBonusResponse.md new file mode 100644 index 0000000..fc8a544 --- /dev/null +++ b/python/sdk/src/openapi_client/docs/KoraUserBonusResponse.md @@ -0,0 +1,33 @@ +# KoraUserBonusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_address** | **str** | User wallet address | +**epoch_number** | **int** | Epoch number for the bonus | +**bonus_points** | **str** | Total bonus points earned | +**bonus_cc_rewards** | **str** | Total bonus CC rewards earned | +**criteria** | **str** | Criteria for earning the bonus | [optional] + +## Example + +```python +from openapi_client.models.kora_user_bonus_response import KoraUserBonusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of KoraUserBonusResponse from a JSON string +kora_user_bonus_response_instance = KoraUserBonusResponse.from_json(json) +# print the JSON string representation of the object +print(KoraUserBonusResponse.to_json()) + +# convert the object into a dict +kora_user_bonus_response_dict = kora_user_bonus_response_instance.to_dict() +# create an instance of KoraUserBonusResponse from a dict +kora_user_bonus_response_from_dict = KoraUserBonusResponse.from_dict(kora_user_bonus_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/sdk/src/openapi_client/docs/RewardsApi.md b/python/sdk/src/openapi_client/docs/RewardsApi.md index 106774b..541aad0 100644 --- a/python/sdk/src/openapi_client/docs/RewardsApi.md +++ b/python/sdk/src/openapi_client/docs/RewardsApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**get_rewards_epoch_metadata**](RewardsApi.md#get_rewards_epoch_metadata) | **GET** /v1/rewards/metadata/epoch | /rewards/metadata/epoch [**get_rewards_interval_metadata**](RewardsApi.md#get_rewards_interval_metadata) | **GET** /v1/rewards/metadata/interval | /rewards/metadata/interval [**get_rewards_summary**](RewardsApi.md#get_rewards_summary) | **GET** /v1/rewards/summary | /rewards/summary +[**get_user_bonuses**](RewardsApi.md#get_user_bonuses) | **GET** /v1/rewards/bonuses | Get all user bonuses by epoch [**mark_as_claimed**](RewardsApi.md#mark_as_claimed) | **POST** /v1/rewards/claims/mark-claimed | /v1/rewards/claims/mark-claimed [**onboard_affiliate**](RewardsApi.md#onboard_affiliate) | **POST** /v1/rewards/affiliate/onboard | /rewards/affiliate/onboard [**onboard_referee**](RewardsApi.md#onboard_referee) | **POST** /v1/rewards/affiliate/onboard/referee | /rewards/affiliate/onboard/referee @@ -969,6 +970,75 @@ This endpoint does not need any parameter. [[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_bonuses** +> List[KoraUserBonusResponse] get_user_bonuses(epoch_number) + +Get all user bonuses by epoch + +Returns the bonuses earned by all users for a specific epoch number. + +### Example + + +```python +import openapi_client +from openapi_client.models.kora_user_bonus_response import KoraUserBonusResponse +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.sui-staging.bluefin.io +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.sui-staging.bluefin.io" +) + + +# Enter a context with an instance of the API client +async with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.RewardsApi(api_client) + epoch_number = 7 # int | Specify the epoch number + + try: + # Get all user bonuses by epoch + api_response = await api_instance.get_user_bonuses(epoch_number) + print("The response of RewardsApi->get_user_bonuses:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RewardsApi->get_user_bonuses: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **epoch_number** | **int**| Specify the epoch number | + +### Return type + +[**List[KoraUserBonusResponse]**](KoraUserBonusResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Missing required parameters | - | + +[[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) + # **mark_as_claimed** > MarkAsClaimedResponse mark_as_claimed(mark_as_claimed_request) diff --git a/python/sdk/src/openapi_client/models/__init__.py b/python/sdk/src/openapi_client/models/__init__.py index 2264399..ac55e65 100644 --- a/python/sdk/src/openapi_client/models/__init__.py +++ b/python/sdk/src/openapi_client/models/__init__.py @@ -69,6 +69,7 @@ from openapi_client.models.epoch_configs_response import EpochConfigsResponse from openapi_client.models.epoch_metadata import EpochMetadata from openapi_client.models.error import Error +from openapi_client.models.error1 import Error1 from openapi_client.models.exchange_info_response import ExchangeInfoResponse from openapi_client.models.failed_command_type import FailedCommandType from openapi_client.models.fee_configs import FeeConfigs @@ -81,6 +82,8 @@ from openapi_client.models.interval_rewards import IntervalRewards from openapi_client.models.iss_base64_details import IssBase64Details from openapi_client.models.kline_interval import KlineInterval +from openapi_client.models.kora_health_check200_response import KoraHealthCheck200Response +from openapi_client.models.kora_user_bonus_response import KoraUserBonusResponse from openapi_client.models.leaderboard_entry import LeaderboardEntry from openapi_client.models.leaderboard_interval import LeaderboardInterval from openapi_client.models.leaderboard_response import LeaderboardResponse diff --git a/python/sdk/src/openapi_client/models/error1.py b/python/sdk/src/openapi_client/models/error1.py new file mode 100644 index 0000000..05a4f17 --- /dev/null +++ b/python/sdk/src/openapi_client/models/error1.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Error1(BaseModel): + """ + Error1 + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="Error message") + code: Optional[StrictStr] = Field(default=None, description="Error code") + __properties: ClassVar[List[str]] = ["error", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "code": obj.get("code") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_campaign_bonus.py b/python/sdk/src/openapi_client/models/kora_campaign_bonus.py new file mode 100644 index 0000000..4a81a7f --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_campaign_bonus.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraCampaignBonus(BaseModel): + """ + KoraCampaignBonus + """ # noqa: E501 + bonus_type: Optional[StrictStr] = Field(default=None, description="Type of bonus (e.g., VOLUME_BONUS, REFERRAL_BONUS)", alias="bonusType") + bonus_cc_reward: Optional[StrictStr] = Field(default=None, description="CC reward amount for this bonus", alias="bonusCcReward") + bonus_points: Optional[StrictStr] = Field(default=None, description="Points earned for this bonus", alias="bonusPoints") + bonus_criteria: Optional[StrictStr] = Field(default=None, description="Criteria that was met for earning this bonus", alias="bonusCriteria") + __properties: ClassVar[List[str]] = ["bonusType", "bonusCcReward", "bonusPoints", "bonusCriteria"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraCampaignBonus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraCampaignBonus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bonusType": obj.get("bonusType"), + "bonusCcReward": obj.get("bonusCcReward"), + "bonusPoints": obj.get("bonusPoints"), + "bonusCriteria": obj.get("bonusCriteria") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_campaign_metadata.py b/python/sdk/src/openapi_client/models/kora_campaign_metadata.py new file mode 100644 index 0000000..8f1d656 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_campaign_metadata.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraCampaignMetadata(BaseModel): + """ + KoraCampaignMetadata + """ # noqa: E501 + status: StrictStr + campaign_name: StrictStr = Field(description="Name of the campaign", alias="campaignName") + parent_campaign_name: Optional[StrictStr] = Field(default=None, description="Name of the parent campaign", alias="parentCampaignName") + start_date: StrictInt = Field(description="Time in milliseconds for campaign start date", alias="startDate") + end_date: StrictInt = Field(description="Time in milliseconds for campaign end date", alias="endDate") + __properties: ClassVar[List[str]] = ["status", "campaignName", "parentCampaignName", "startDate", "endDate"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACTIVE', 'INACTIVE']): + raise ValueError("must be one of enum values ('ACTIVE', 'INACTIVE')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraCampaignMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraCampaignMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "campaignName": obj.get("campaignName"), + "parentCampaignName": obj.get("parentCampaignName"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_campaign_rewards.py b/python/sdk/src/openapi_client/models/kora_campaign_rewards.py new file mode 100644 index 0000000..0d8eaa7 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_campaign_rewards.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.kora_campaign_bonus import KoraCampaignBonus +from typing import Optional, Set +from typing_extensions import Self + +class KoraCampaignRewards(BaseModel): + """ + KoraCampaignRewards + """ # noqa: E501 + user_address: StrictStr = Field(description="User address for the rewards earned data", alias="userAddress") + campaign_name: StrictStr = Field(description="Name of the campaign", alias="campaignName") + epoch_number: StrictInt = Field(description="Epoch number for the rewards earned data", alias="epochNumber") + interval_number: StrictInt = Field(description="Interval number for the rewards earned data", alias="intervalNumber") + symbol: Optional[StrictStr] = Field(default=None, description="Market Symbol") + status: StrictStr + blue_rewards: Optional[StrictStr] = Field(default=None, description="Total blue token rewards", alias="blueRewards") + sui_rewards: Optional[StrictStr] = Field(default=None, description="Total sui token rewards", alias="suiRewards") + wal_rewards: Optional[StrictStr] = Field(default=None, description="Total wal rewards", alias="walRewards") + cash_rewards: Optional[StrictStr] = Field(default=None, description="Total cash rewards", alias="cashRewards") + cc_rewards: Optional[StrictStr] = Field(default=None, description="Total CC token rewards", alias="ccRewards") + kora_points: Optional[StrictStr] = Field(default=None, description="Total Kora points earned", alias="koraPoints") + user_fee_paid: Optional[StrictStr] = Field(default=None, description="Total user fee paid", alias="userFeePaid") + interval_start_date: Optional[StrictInt] = Field(default=None, description="Time in milliseconds for interval start date", alias="intervalStartDate") + interval_end_date: Optional[StrictInt] = Field(default=None, description="Time in milliseconds for interval end date", alias="intervalEndDate") + is_disbursed: Optional[StrictBool] = Field(default=None, description="Indicates if rewards have been disbursed", alias="isDisbursed") + txn_digest: Optional[StrictStr] = Field(default=None, description="Transaction digest of the disbursement", alias="txnDigest") + claim_status: Optional[StrictStr] = Field(default=None, description="Status of the claim", alias="claimStatus") + bonuses: Optional[List[KoraCampaignBonus]] = Field(default=None, description="List of bonuses attached to this reward entry") + __properties: ClassVar[List[str]] = ["userAddress", "campaignName", "epochNumber", "intervalNumber", "symbol", "status", "blueRewards", "suiRewards", "walRewards", "cashRewards", "ccRewards", "koraPoints", "userFeePaid", "intervalStartDate", "intervalEndDate", "isDisbursed", "txnDigest", "claimStatus", "bonuses"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACTIVE', 'NOT_STARTED', 'FINALIZED', 'COOLDOWN']): + raise ValueError("must be one of enum values ('ACTIVE', 'NOT_STARTED', 'FINALIZED', 'COOLDOWN')") + return value + + @field_validator('claim_status') + def claim_status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CLAIMABLE', 'CLAIMED', 'NOT_YET_CLAIMABLE', 'CLAIM_ENDED']): + raise ValueError("must be one of enum values ('CLAIMABLE', 'CLAIMED', 'NOT_YET_CLAIMABLE', 'CLAIM_ENDED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraCampaignRewards from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in bonuses (list) + _items = [] + if self.bonuses: + for _item_bonuses in self.bonuses: + if _item_bonuses: + _items.append(_item_bonuses.to_dict()) + _dict['bonuses'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraCampaignRewards from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userAddress": obj.get("userAddress"), + "campaignName": obj.get("campaignName"), + "epochNumber": obj.get("epochNumber"), + "intervalNumber": obj.get("intervalNumber"), + "symbol": obj.get("symbol"), + "status": obj.get("status"), + "blueRewards": obj.get("blueRewards"), + "suiRewards": obj.get("suiRewards"), + "walRewards": obj.get("walRewards"), + "cashRewards": obj.get("cashRewards"), + "ccRewards": obj.get("ccRewards"), + "koraPoints": obj.get("koraPoints"), + "userFeePaid": obj.get("userFeePaid"), + "intervalStartDate": obj.get("intervalStartDate"), + "intervalEndDate": obj.get("intervalEndDate"), + "isDisbursed": obj.get("isDisbursed"), + "txnDigest": obj.get("txnDigest"), + "claimStatus": obj.get("claimStatus"), + "bonuses": [KoraCampaignBonus.from_dict(_item) for _item in obj["bonuses"]] if obj.get("bonuses") is not None else None + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_epoch_config.py b/python/sdk/src/openapi_client/models/kora_epoch_config.py new file mode 100644 index 0000000..3db9f2f --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_epoch_config.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraEpochConfig(BaseModel): + """ + KoraEpochConfig + """ # noqa: E501 + campaign_name: StrictStr = Field(description="The name of the campaign", alias="campaignName") + epoch_duration: StrictInt = Field(description="Duration of the epoch in hours", alias="epochDuration") + sui_rewards_allocation: Optional[StrictStr] = Field(default=None, description="Allocation of Sui rewards for this epoch", alias="suiRewardsAllocation") + blue_rewards_allocation: Optional[StrictStr] = Field(default=None, description="Allocation of Blue rewards for this epoch", alias="blueRewardsAllocation") + wal_rewards_allocation: Optional[StrictStr] = Field(default=None, description="Allocation of Wal rewards for this epoch", alias="walRewardsAllocation") + cc_rewards_allocation: Optional[StrictStr] = Field(default=None, description="Allocation of CC token rewards for this epoch", alias="ccRewardsAllocation") + kora_points_rewards_allocation: Optional[StrictStr] = Field(default=None, description="Allocation of Kora points rewards for this epoch", alias="koraPointsRewardsAllocation") + interval_number: StrictInt = Field(description="Interval number for the epoch", alias="intervalNumber") + epoch_number: StrictInt = Field(description="Epoch number", alias="epochNumber") + config: Optional[Dict[str, Any]] = Field(default=None, description="Additional campaign-specific configurations") + __properties: ClassVar[List[str]] = ["campaignName", "epochDuration", "suiRewardsAllocation", "blueRewardsAllocation", "walRewardsAllocation", "ccRewardsAllocation", "koraPointsRewardsAllocation", "intervalNumber", "epochNumber", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraEpochConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraEpochConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaignName": obj.get("campaignName"), + "epochDuration": obj.get("epochDuration"), + "suiRewardsAllocation": obj.get("suiRewardsAllocation"), + "blueRewardsAllocation": obj.get("blueRewardsAllocation"), + "walRewardsAllocation": obj.get("walRewardsAllocation"), + "ccRewardsAllocation": obj.get("ccRewardsAllocation"), + "koraPointsRewardsAllocation": obj.get("koraPointsRewardsAllocation"), + "intervalNumber": obj.get("intervalNumber"), + "epochNumber": obj.get("epochNumber"), + "config": obj.get("config") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_epoch_config_response.py b/python/sdk/src/openapi_client/models/kora_epoch_config_response.py new file mode 100644 index 0000000..33bfa20 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_epoch_config_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.kora_epoch_config import KoraEpochConfig +from typing import Optional, Set +from typing_extensions import Self + +class KoraEpochConfigResponse(BaseModel): + """ + KoraEpochConfigResponse + """ # noqa: E501 + max_interval_number: StrictInt = Field(description="The maximum interval number available", alias="maxIntervalNumber") + interval_number: StrictInt = Field(description="The current interval number being queried", alias="intervalNumber") + data: List[KoraEpochConfig] + __properties: ClassVar[List[str]] = ["maxIntervalNumber", "intervalNumber", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraEpochConfigResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraEpochConfigResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maxIntervalNumber": obj.get("maxIntervalNumber"), + "intervalNumber": obj.get("intervalNumber"), + "data": [KoraEpochConfig.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_epoch_metadata.py b/python/sdk/src/openapi_client/models/kora_epoch_metadata.py new file mode 100644 index 0000000..bcae4f5 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_epoch_metadata.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class KoraEpochMetadata(BaseModel): + """ + KoraEpochMetadata + """ # noqa: E501 + status: StrictStr + campaign_name: StrictStr = Field(description="Name of the campaign", alias="campaignName") + epoch_id: StrictStr = Field(description="Epoch ID", alias="epochId") + epoch_number: StrictInt = Field(description="Epoch number", alias="epochNumber") + start_date: StrictInt = Field(description="Time in milliseconds for epoch start date", alias="startDate") + end_date: StrictInt = Field(description="Time in milliseconds for epoch end date", alias="endDate") + __properties: ClassVar[List[str]] = ["status", "campaignName", "epochId", "epochNumber", "startDate", "endDate"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACTIVE', 'NOT_STARTED', 'FINALIZED', 'COOLDOWN']): + raise ValueError("must be one of enum values ('ACTIVE', 'NOT_STARTED', 'FINALIZED', 'COOLDOWN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraEpochMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraEpochMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "campaignName": obj.get("campaignName"), + "epochId": obj.get("epochId"), + "epochNumber": obj.get("epochNumber"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_health_check200_response.py b/python/sdk/src/openapi_client/models/kora_health_check200_response.py new file mode 100644 index 0000000..ec2ee26 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_health_check200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraHealthCheck200Response(BaseModel): + """ + KoraHealthCheck200Response + """ # noqa: E501 + status: Optional[StrictStr] = None + timestamp: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["status", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraHealthCheck200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraHealthCheck200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_interval_metadata.py b/python/sdk/src/openapi_client/models/kora_interval_metadata.py new file mode 100644 index 0000000..7baaa24 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_interval_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraIntervalMetadata(BaseModel): + """ + KoraIntervalMetadata + """ # noqa: E501 + status: StrictStr + start_date: StrictInt = Field(description="Time in milliseconds for interval start date", alias="startDate") + end_date: StrictInt = Field(description="Time in milliseconds for interval end date", alias="endDate") + interval_id: StrictInt = Field(description="Interval ID", alias="intervalId") + interval_type: Optional[StrictStr] = Field(default=None, description="Type of the interval", alias="intervalType") + protocol: Optional[StrictStr] = Field(default=None, description="Protocol for the interval") + __properties: ClassVar[List[str]] = ["status", "startDate", "endDate", "intervalId", "intervalType", "protocol"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACTIVE', 'NOT_STARTED', 'FINALIZED', 'COOLDOWN']): + raise ValueError("must be one of enum values ('ACTIVE', 'NOT_STARTED', 'FINALIZED', 'COOLDOWN')") + return value + + @field_validator('protocol') + def protocol_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['bluefin', 'kora']): + raise ValueError("must be one of enum values ('bluefin', 'kora')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraIntervalMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraIntervalMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "intervalId": obj.get("intervalId"), + "intervalType": obj.get("intervalType"), + "protocol": obj.get("protocol") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_leaderboard_entry.py b/python/sdk/src/openapi_client/models/kora_leaderboard_entry.py new file mode 100644 index 0000000..0c4ae7d --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_leaderboard_entry.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraLeaderboardEntry(BaseModel): + """ + KoraLeaderboardEntry + """ # noqa: E501 + rank: StrictInt = Field(description="Overall ranking position based on sortBy parameter") + user_address: StrictStr = Field(description="Wallet address of the user", alias="userAddress") + total_volume_e6: StrictStr = Field(description="Total swap volume (USD equivalent)", alias="totalVolumeE6") + total_fee_e6: Optional[StrictStr] = Field(default=None, description="Total fees paid", alias="totalFeeE6") + total_transactions: StrictInt = Field(description="Total number of qualifying swap transactions", alias="totalTransactions") + cc_rewards: StrictStr = Field(description="CC token rewards earned", alias="ccRewards") + kora_points: StrictStr = Field(description="Kora points earned", alias="koraPoints") + total_bonus_points: Optional[StrictStr] = Field(default=None, description="Total bonus points earned", alias="totalBonusPoints") + total_bonus_cc: Optional[StrictStr] = Field(default=None, description="Total bonus CC tokens earned", alias="totalBonusCC") + volume_rank: Optional[StrictInt] = Field(default=None, description="Ranking based purely on trading volume", alias="volumeRank") + transaction_rank: Optional[StrictInt] = Field(default=None, description="Ranking based purely on transaction count", alias="transactionRank") + total_earnings_rank: Optional[StrictInt] = Field(default=None, description="Ranking based on combined CC + Kora points value", alias="totalEarningsRank") + last_activity_date: Optional[StrictInt] = Field(default=None, description="Timestamp of user's most recent swap (milliseconds)", alias="lastActivityDate") + __properties: ClassVar[List[str]] = ["rank", "userAddress", "totalVolumeE6", "totalFeeE6", "totalTransactions", "ccRewards", "koraPoints", "totalBonusPoints", "totalBonusCC", "volumeRank", "transactionRank", "totalEarningsRank", "lastActivityDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraLeaderboardEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraLeaderboardEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rank": obj.get("rank"), + "userAddress": obj.get("userAddress"), + "totalVolumeE6": obj.get("totalVolumeE6"), + "totalFeeE6": obj.get("totalFeeE6"), + "totalTransactions": obj.get("totalTransactions"), + "ccRewards": obj.get("ccRewards"), + "koraPoints": obj.get("koraPoints"), + "totalBonusPoints": obj.get("totalBonusPoints"), + "totalBonusCC": obj.get("totalBonusCC"), + "volumeRank": obj.get("volumeRank"), + "transactionRank": obj.get("transactionRank"), + "totalEarningsRank": obj.get("totalEarningsRank"), + "lastActivityDate": obj.get("lastActivityDate") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_leaderboard_response.py b/python/sdk/src/openapi_client/models/kora_leaderboard_response.py new file mode 100644 index 0000000..2d79ff1 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_leaderboard_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.kora_leaderboard_entry import KoraLeaderboardEntry +from typing import Optional, Set +from typing_extensions import Self + +class KoraLeaderboardResponse(BaseModel): + """ + KoraLeaderboardResponse + """ # noqa: E501 + data: List[KoraLeaderboardEntry] + total: StrictInt = Field(description="Total number of records") + limit: StrictInt = Field(description="Page size for pagination") + page: StrictInt = Field(description="Current page number") + __properties: ClassVar[List[str]] = ["data", "total", "limit", "page"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraLeaderboardResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraLeaderboardResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [KoraLeaderboardEntry.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total": obj.get("total"), + "limit": obj.get("limit"), + "page": obj.get("page") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_rewards_summary.py b/python/sdk/src/openapi_client/models/kora_rewards_summary.py new file mode 100644 index 0000000..8df573c --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_rewards_summary.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraRewardsSummary(BaseModel): + """ + KoraRewardsSummary + """ # noqa: E501 + user_address: StrictStr = Field(description="User address for the rewards earned data", alias="userAddress") + blue_rewards: Optional[StrictStr] = Field(default=None, description="Total Blue token rewards earned", alias="blueRewards") + sui_rewards: Optional[StrictStr] = Field(default=None, description="Total Sui token rewards earned", alias="suiRewards") + wal_rewards: Optional[StrictStr] = Field(default=None, description="Total wal rewards earned", alias="walRewards") + cc_rewards: Optional[StrictStr] = Field(default=None, description="Total CC token rewards earned across all Kora campaigns", alias="ccRewards") + kora_points: Optional[StrictStr] = Field(default=None, description="Total Kora points earned across all Kora campaigns", alias="koraPoints") + __properties: ClassVar[List[str]] = ["userAddress", "blueRewards", "suiRewards", "walRewards", "ccRewards", "koraPoints"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraRewardsSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraRewardsSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userAddress": obj.get("userAddress"), + "blueRewards": obj.get("blueRewards"), + "suiRewards": obj.get("suiRewards"), + "walRewards": obj.get("walRewards"), + "ccRewards": obj.get("ccRewards"), + "koraPoints": obj.get("koraPoints") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/models/kora_user_bonus_response.py b/python/sdk/src/openapi_client/models/kora_user_bonus_response.py new file mode 100644 index 0000000..3b38c65 --- /dev/null +++ b/python/sdk/src/openapi_client/models/kora_user_bonus_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KoraUserBonusResponse(BaseModel): + """ + KoraUserBonusResponse + """ # noqa: E501 + user_address: StrictStr = Field(description="User wallet address", alias="userAddress") + epoch_number: StrictInt = Field(description="Epoch number for the bonus", alias="epochNumber") + bonus_points: StrictStr = Field(description="Total bonus points earned", alias="bonusPoints") + bonus_cc_rewards: StrictStr = Field(description="Total bonus CC rewards earned", alias="bonusCcRewards") + criteria: Optional[StrictStr] = Field(default=None, description="Criteria for earning the bonus") + __properties: ClassVar[List[str]] = ["userAddress", "epochNumber", "bonusPoints", "bonusCcRewards", "criteria"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KoraUserBonusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KoraUserBonusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userAddress": obj.get("userAddress"), + "epochNumber": obj.get("epochNumber"), + "bonusPoints": obj.get("bonusPoints"), + "bonusCcRewards": obj.get("bonusCcRewards"), + "criteria": obj.get("criteria") + }) + return _obj + + diff --git a/python/sdk/src/openapi_client/test/test_error1.py b/python/sdk/src/openapi_client/test/test_error1.py new file mode 100644 index 0000000..f3d5e20 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_error1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.error1 import Error1 + +class TestError1(unittest.TestCase): + """Error1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error1: + """Test Error1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error1` + """ + model = Error1() + if include_optional: + return Error1( + error = 'Invalid request parameters', + code = 'INVALID_PARAMS' + ) + else: + return Error1( + ) + """ + + def testError1(self): + """Test Error1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_api.py b/python/sdk/src/openapi_client/test/test_kora_api.py new file mode 100644 index 0000000..2418f9d --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_api.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.kora_api import KoraApi + + +class TestKoraApi(unittest.IsolatedAsyncioTestCase): + """KoraApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = KoraApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_get_kora_campaign_metadata(self) -> None: + """Test case for get_kora_campaign_metadata + + Get Kora campaign metadata + """ + pass + + async def test_get_kora_campaign_rewards(self) -> None: + """Test case for get_kora_campaign_rewards + + Get Kora campaign rewards + """ + pass + + async def test_get_kora_epoch_config_metadata(self) -> None: + """Test case for get_kora_epoch_config_metadata + + Get Kora epoch configuration + """ + pass + + async def test_get_kora_epoch_metadata(self) -> None: + """Test case for get_kora_epoch_metadata + + Get Kora epoch metadata + """ + pass + + async def test_get_kora_interval_metadata(self) -> None: + """Test case for get_kora_interval_metadata + + Get Kora interval metadata + """ + pass + + async def test_get_kora_leaderboard(self) -> None: + """Test case for get_kora_leaderboard + + Get Kora swap leaderboard + """ + pass + + async def test_get_kora_rewards_summary(self) -> None: + """Test case for get_kora_rewards_summary + + Get Kora all-time rewards summary + """ + pass + + async def test_kora_health_check(self) -> None: + """Test case for kora_health_check + + Kora service health check + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_campaign_bonus.py b/python/sdk/src/openapi_client/test/test_kora_campaign_bonus.py new file mode 100644 index 0000000..f63f1f0 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_campaign_bonus.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_campaign_bonus import KoraCampaignBonus + +class TestKoraCampaignBonus(unittest.TestCase): + """KoraCampaignBonus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraCampaignBonus: + """Test KoraCampaignBonus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraCampaignBonus` + """ + model = KoraCampaignBonus() + if include_optional: + return KoraCampaignBonus( + bonus_type = 'VOLUME_BONUS', + bonus_cc_reward = '500.5', + bonus_points = '1000.75', + bonus_criteria = 'volume_threshold_100k' + ) + else: + return KoraCampaignBonus( + ) + """ + + def testKoraCampaignBonus(self): + """Test KoraCampaignBonus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_campaign_metadata.py b/python/sdk/src/openapi_client/test/test_kora_campaign_metadata.py new file mode 100644 index 0000000..057fb12 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_campaign_metadata.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_campaign_metadata import KoraCampaignMetadata + +class TestKoraCampaignMetadata(unittest.TestCase): + """KoraCampaignMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraCampaignMetadata: + """Test KoraCampaignMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraCampaignMetadata` + """ + model = KoraCampaignMetadata() + if include_optional: + return KoraCampaignMetadata( + status = 'ACTIVE', + campaign_name = 'KORA_SWAPS', + parent_campaign_name = '', + start_date = 1724121094751, + end_date = 1724121094751 + ) + else: + return KoraCampaignMetadata( + status = 'ACTIVE', + campaign_name = 'KORA_SWAPS', + start_date = 1724121094751, + end_date = 1724121094751, + ) + """ + + def testKoraCampaignMetadata(self): + """Test KoraCampaignMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_campaign_rewards.py b/python/sdk/src/openapi_client/test/test_kora_campaign_rewards.py new file mode 100644 index 0000000..a254068 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_campaign_rewards.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_campaign_rewards import KoraCampaignRewards + +class TestKoraCampaignRewards(unittest.TestCase): + """KoraCampaignRewards unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraCampaignRewards: + """Test KoraCampaignRewards + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraCampaignRewards` + """ + model = KoraCampaignRewards() + if include_optional: + return KoraCampaignRewards( + user_address = '0x1234567890abcdef', + campaign_name = 'KORA_SWAPS', + epoch_number = 7, + interval_number = 7, + symbol = 'KORA-SWAPS', + status = 'ACTIVE', + blue_rewards = '100.5', + sui_rewards = '200.25', + wal_rewards = '50.75', + cash_rewards = '0', + cc_rewards = '1500.75', + kora_points = '2500.5', + user_fee_paid = '15.25', + interval_start_date = 1724121094751, + interval_end_date = 1724725894751, + is_disbursed = True, + txn_digest = '8Fs9Q4ljB0cc0NhcqSVZRgTxe9KwZeRqjGYYYe4jXgXL', + claim_status = 'CLAIMED', + bonuses = [ + openapi_client.models.kora_campaign_bonus.KoraCampaignBonus( + bonus_type = 'VOLUME_BONUS', + bonus_cc_reward = '500.5', + bonus_points = '1000.75', + bonus_criteria = 'volume_threshold_100k', ) + ] + ) + else: + return KoraCampaignRewards( + user_address = '0x1234567890abcdef', + campaign_name = 'KORA_SWAPS', + epoch_number = 7, + interval_number = 7, + status = 'ACTIVE', + ) + """ + + def testKoraCampaignRewards(self): + """Test KoraCampaignRewards""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_epoch_config.py b/python/sdk/src/openapi_client/test/test_kora_epoch_config.py new file mode 100644 index 0000000..00e77b9 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_epoch_config.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_epoch_config import KoraEpochConfig + +class TestKoraEpochConfig(unittest.TestCase): + """KoraEpochConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraEpochConfig: + """Test KoraEpochConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraEpochConfig` + """ + model = KoraEpochConfig() + if include_optional: + return KoraEpochConfig( + campaign_name = 'KORA_SWAPS', + epoch_duration = 168, + sui_rewards_allocation = '1000.5', + blue_rewards_allocation = '2000.25', + wal_rewards_allocation = '500.75', + cc_rewards_allocation = '5000.5', + kora_points_rewards_allocation = '10000.25', + interval_number = 7, + epoch_number = 7, + config = { } + ) + else: + return KoraEpochConfig( + campaign_name = 'KORA_SWAPS', + epoch_duration = 168, + interval_number = 7, + epoch_number = 7, + ) + """ + + def testKoraEpochConfig(self): + """Test KoraEpochConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_epoch_config_response.py b/python/sdk/src/openapi_client/test/test_kora_epoch_config_response.py new file mode 100644 index 0000000..81d5513 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_epoch_config_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_epoch_config_response import KoraEpochConfigResponse + +class TestKoraEpochConfigResponse(unittest.TestCase): + """KoraEpochConfigResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraEpochConfigResponse: + """Test KoraEpochConfigResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraEpochConfigResponse` + """ + model = KoraEpochConfigResponse() + if include_optional: + return KoraEpochConfigResponse( + max_interval_number = 14, + interval_number = 7, + data = [ + openapi_client.models.kora_epoch_config.KoraEpochConfig( + campaign_name = 'KORA_SWAPS', + epoch_duration = 168, + sui_rewards_allocation = '1000.5', + blue_rewards_allocation = '2000.25', + wal_rewards_allocation = '500.75', + cc_rewards_allocation = '5000.5', + kora_points_rewards_allocation = '10000.25', + interval_number = 7, + epoch_number = 7, + config = { }, ) + ] + ) + else: + return KoraEpochConfigResponse( + max_interval_number = 14, + interval_number = 7, + data = [ + openapi_client.models.kora_epoch_config.KoraEpochConfig( + campaign_name = 'KORA_SWAPS', + epoch_duration = 168, + sui_rewards_allocation = '1000.5', + blue_rewards_allocation = '2000.25', + wal_rewards_allocation = '500.75', + cc_rewards_allocation = '5000.5', + kora_points_rewards_allocation = '10000.25', + interval_number = 7, + epoch_number = 7, + config = { }, ) + ], + ) + """ + + def testKoraEpochConfigResponse(self): + """Test KoraEpochConfigResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_epoch_metadata.py b/python/sdk/src/openapi_client/test/test_kora_epoch_metadata.py new file mode 100644 index 0000000..3249757 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_epoch_metadata.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_epoch_metadata import KoraEpochMetadata + +class TestKoraEpochMetadata(unittest.TestCase): + """KoraEpochMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraEpochMetadata: + """Test KoraEpochMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraEpochMetadata` + """ + model = KoraEpochMetadata() + if include_optional: + return KoraEpochMetadata( + status = 'ACTIVE', + campaign_name = 'KORA_SWAPS', + epoch_id = '550e8400-e29b-41d4-a716-446655440000', + epoch_number = 7, + start_date = 1724121094751, + end_date = 1724725894751 + ) + else: + return KoraEpochMetadata( + status = 'ACTIVE', + campaign_name = 'KORA_SWAPS', + epoch_id = '550e8400-e29b-41d4-a716-446655440000', + epoch_number = 7, + start_date = 1724121094751, + end_date = 1724725894751, + ) + """ + + def testKoraEpochMetadata(self): + """Test KoraEpochMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_health_check200_response.py b/python/sdk/src/openapi_client/test/test_kora_health_check200_response.py new file mode 100644 index 0000000..61ec433 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_health_check200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_health_check200_response import KoraHealthCheck200Response + +class TestKoraHealthCheck200Response(unittest.TestCase): + """KoraHealthCheck200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraHealthCheck200Response: + """Test KoraHealthCheck200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraHealthCheck200Response` + """ + model = KoraHealthCheck200Response() + if include_optional: + return KoraHealthCheck200Response( + status = 'ok', + timestamp = 1724725894751 + ) + else: + return KoraHealthCheck200Response( + ) + """ + + def testKoraHealthCheck200Response(self): + """Test KoraHealthCheck200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_interval_metadata.py b/python/sdk/src/openapi_client/test/test_kora_interval_metadata.py new file mode 100644 index 0000000..dd913da --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_interval_metadata.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_interval_metadata import KoraIntervalMetadata + +class TestKoraIntervalMetadata(unittest.TestCase): + """KoraIntervalMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraIntervalMetadata: + """Test KoraIntervalMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraIntervalMetadata` + """ + model = KoraIntervalMetadata() + if include_optional: + return KoraIntervalMetadata( + status = 'ACTIVE', + start_date = 1724121094751, + end_date = 1724725894751, + interval_id = 7, + interval_type = 'WEEK', + protocol = 'kora' + ) + else: + return KoraIntervalMetadata( + status = 'ACTIVE', + start_date = 1724121094751, + end_date = 1724725894751, + interval_id = 7, + ) + """ + + def testKoraIntervalMetadata(self): + """Test KoraIntervalMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_leaderboard_entry.py b/python/sdk/src/openapi_client/test/test_kora_leaderboard_entry.py new file mode 100644 index 0000000..f188f43 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_leaderboard_entry.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_leaderboard_entry import KoraLeaderboardEntry + +class TestKoraLeaderboardEntry(unittest.TestCase): + """KoraLeaderboardEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraLeaderboardEntry: + """Test KoraLeaderboardEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraLeaderboardEntry` + """ + model = KoraLeaderboardEntry() + if include_optional: + return KoraLeaderboardEntry( + rank = 1, + user_address = '0x1234567890abcdef', + total_volume_e6 = '50000.123456', + total_fee_e6 = '150.75', + total_transactions = 1250, + cc_rewards = '1500.75', + kora_points = '2500.5', + total_bonus_points = '500.25', + total_bonus_cc = '200.5', + volume_rank = 1, + transaction_rank = 3, + total_earnings_rank = 1, + last_activity_date = 1724725894751 + ) + else: + return KoraLeaderboardEntry( + rank = 1, + user_address = '0x1234567890abcdef', + total_volume_e6 = '50000.123456', + total_transactions = 1250, + cc_rewards = '1500.75', + kora_points = '2500.5', + ) + """ + + def testKoraLeaderboardEntry(self): + """Test KoraLeaderboardEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_leaderboard_response.py b/python/sdk/src/openapi_client/test/test_kora_leaderboard_response.py new file mode 100644 index 0000000..075240e --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_leaderboard_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_leaderboard_response import KoraLeaderboardResponse + +class TestKoraLeaderboardResponse(unittest.TestCase): + """KoraLeaderboardResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraLeaderboardResponse: + """Test KoraLeaderboardResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraLeaderboardResponse` + """ + model = KoraLeaderboardResponse() + if include_optional: + return KoraLeaderboardResponse( + data = [ + openapi_client.models.kora_leaderboard_entry.KoraLeaderboardEntry( + rank = 1, + user_address = '0x1234567890abcdef', + total_volume_e6 = '50000.123456', + total_fee_e6 = '150.75', + total_transactions = 1250, + cc_rewards = '1500.75', + kora_points = '2500.5', + total_bonus_points = '500.25', + total_bonus_cc = '200.5', + volume_rank = 1, + transaction_rank = 3, + total_earnings_rank = 1, + last_activity_date = 1724725894751, ) + ], + total = 2847, + limit = 500, + page = 1 + ) + else: + return KoraLeaderboardResponse( + data = [ + openapi_client.models.kora_leaderboard_entry.KoraLeaderboardEntry( + rank = 1, + user_address = '0x1234567890abcdef', + total_volume_e6 = '50000.123456', + total_fee_e6 = '150.75', + total_transactions = 1250, + cc_rewards = '1500.75', + kora_points = '2500.5', + total_bonus_points = '500.25', + total_bonus_cc = '200.5', + volume_rank = 1, + transaction_rank = 3, + total_earnings_rank = 1, + last_activity_date = 1724725894751, ) + ], + total = 2847, + limit = 500, + page = 1, + ) + """ + + def testKoraLeaderboardResponse(self): + """Test KoraLeaderboardResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_rewards_summary.py b/python/sdk/src/openapi_client/test/test_kora_rewards_summary.py new file mode 100644 index 0000000..3479c38 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_rewards_summary.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_rewards_summary import KoraRewardsSummary + +class TestKoraRewardsSummary(unittest.TestCase): + """KoraRewardsSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraRewardsSummary: + """Test KoraRewardsSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraRewardsSummary` + """ + model = KoraRewardsSummary() + if include_optional: + return KoraRewardsSummary( + user_address = '0x1234567890abcdef', + blue_rewards = '100.5', + sui_rewards = '200.25', + wal_rewards = '50.75', + cc_rewards = '1500.75', + kora_points = '2500.5' + ) + else: + return KoraRewardsSummary( + user_address = '0x1234567890abcdef', + ) + """ + + def testKoraRewardsSummary(self): + """Test KoraRewardsSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client/test/test_kora_user_bonus_response.py b/python/sdk/src/openapi_client/test/test_kora_user_bonus_response.py new file mode 100644 index 0000000..5836462 --- /dev/null +++ b/python/sdk/src/openapi_client/test/test_kora_user_bonus_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Bluefin API + + Bluefin API + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.kora_user_bonus_response import KoraUserBonusResponse + +class TestKoraUserBonusResponse(unittest.TestCase): + """KoraUserBonusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KoraUserBonusResponse: + """Test KoraUserBonusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KoraUserBonusResponse` + """ + model = KoraUserBonusResponse() + if include_optional: + return KoraUserBonusResponse( + user_address = '0x1234567890abcdef', + epoch_number = 7, + bonus_points = '1000.75', + bonus_cc_rewards = '500.5', + criteria = 'volume_threshold_100k' + ) + else: + return KoraUserBonusResponse( + user_address = '0x1234567890abcdef', + epoch_number = 7, + bonus_points = '1000.75', + bonus_cc_rewards = '500.5', + ) + """ + + def testKoraUserBonusResponse(self): + """Test KoraUserBonusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/sdk/src/openapi_client_README.md b/python/sdk/src/openapi_client_README.md index b1710b9..a4bc8fb 100644 --- a/python/sdk/src/openapi_client_README.md +++ b/python/sdk/src/openapi_client_README.md @@ -92,6 +92,7 @@ Class | Method | HTTP request | Description *ExchangeApi* | [**get_market_ticker**](openapi_client/docs/ExchangeApi.md#get_market_ticker) | **GET** /v1/exchange/ticker | /exchange/ticker *ExchangeApi* | [**get_orderbook_depth**](openapi_client/docs/ExchangeApi.md#get_orderbook_depth) | **GET** /v1/exchange/depth | /exchange/depth *ExchangeApi* | [**get_recent_trades**](openapi_client/docs/ExchangeApi.md#get_recent_trades) | **GET** /v1/exchange/trades | /exchange/trades +*KoraApi* | [**kora_health_check**](openapi_client/docs/KoraApi.md#kora_health_check) | **GET** /v1/kora/health | Kora service health check *RewardsApi* | [**get_affiliate_interval_overview**](openapi_client/docs/RewardsApi.md#get_affiliate_interval_overview) | **GET** /v1/rewards/affiliate/intervalOverview | /rewards/affiliate/intervalOverview *RewardsApi* | [**get_affiliate_leader_dashboard**](openapi_client/docs/RewardsApi.md#get_affiliate_leader_dashboard) | **GET** /v1/rewards/affiliate/leaderDashboard | /rewards/affiliate/leaderDashboard *RewardsApi* | [**get_affiliate_metadata**](openapi_client/docs/RewardsApi.md#get_affiliate_metadata) | **GET** /v1/rewards/affiliate | /rewards/affiliate @@ -105,6 +106,7 @@ Class | Method | HTTP request | Description *RewardsApi* | [**get_rewards_epoch_metadata**](openapi_client/docs/RewardsApi.md#get_rewards_epoch_metadata) | **GET** /v1/rewards/metadata/epoch | /rewards/metadata/epoch *RewardsApi* | [**get_rewards_interval_metadata**](openapi_client/docs/RewardsApi.md#get_rewards_interval_metadata) | **GET** /v1/rewards/metadata/interval | /rewards/metadata/interval *RewardsApi* | [**get_rewards_summary**](openapi_client/docs/RewardsApi.md#get_rewards_summary) | **GET** /v1/rewards/summary | /rewards/summary +*RewardsApi* | [**get_user_bonuses**](openapi_client/docs/RewardsApi.md#get_user_bonuses) | **GET** /v1/rewards/bonuses | Get all user bonuses by epoch *RewardsApi* | [**mark_as_claimed**](openapi_client/docs/RewardsApi.md#mark_as_claimed) | **POST** /v1/rewards/claims/mark-claimed | /v1/rewards/claims/mark-claimed *RewardsApi* | [**onboard_affiliate**](openapi_client/docs/RewardsApi.md#onboard_affiliate) | **POST** /v1/rewards/affiliate/onboard | /rewards/affiliate/onboard *RewardsApi* | [**onboard_referee**](openapi_client/docs/RewardsApi.md#onboard_referee) | **POST** /v1/rewards/affiliate/onboard/referee | /rewards/affiliate/onboard/referee @@ -181,6 +183,7 @@ Class | Method | HTTP request | Description - [EpochConfigsResponse](openapi_client/docs/EpochConfigsResponse.md) - [EpochMetadata](openapi_client/docs/EpochMetadata.md) - [Error](openapi_client/docs/Error.md) + - [Error1](openapi_client/docs/Error1.md) - [ExchangeInfoResponse](openapi_client/docs/ExchangeInfoResponse.md) - [FailedCommandType](openapi_client/docs/FailedCommandType.md) - [FeeConfigs](openapi_client/docs/FeeConfigs.md) @@ -193,6 +196,8 @@ Class | Method | HTTP request | Description - [IntervalRewards](openapi_client/docs/IntervalRewards.md) - [IssBase64Details](openapi_client/docs/IssBase64Details.md) - [KlineInterval](openapi_client/docs/KlineInterval.md) + - [KoraHealthCheck200Response](openapi_client/docs/KoraHealthCheck200Response.md) + - [KoraUserBonusResponse](openapi_client/docs/KoraUserBonusResponse.md) - [LeaderboardEntry](openapi_client/docs/LeaderboardEntry.md) - [LeaderboardInterval](openapi_client/docs/LeaderboardInterval.md) - [LeaderboardResponse](openapi_client/docs/LeaderboardResponse.md) diff --git a/resources/bluefin-api.yaml b/resources/bluefin-api.yaml index bbf212c..de84764 100644 --- a/resources/bluefin-api.yaml +++ b/resources/bluefin-api.yaml @@ -268,9 +268,13 @@ paths: $ref: "./rewards-data-api.yaml#/paths/~1v1~1rewards~1claims~1mark-claimed" /v1/rewards/contract/config: $ref: "./rewards-data-api.yaml#/paths/~1v1~1rewards~1contract~1config" - - - + + # Kora Rewards Endpoints + /v1/rewards/bonuses: + $ref: "./kora-rewards-api.yaml#/paths/~1v1~1rewards~1bonuses" + /v1/kora/health: + $ref: "./kora-rewards-api.yaml#/paths/~1v1~1kora~1health" + /ws/account: $ref: "./websocket-api.yaml#/paths/~1ws~1account" servers: diff --git a/resources/kora-rewards-api.yaml b/resources/kora-rewards-api.yaml new file mode 100644 index 0000000..fbfe77f --- /dev/null +++ b/resources/kora-rewards-api.yaml @@ -0,0 +1,617 @@ +openapi: 3.0.3 +info: + title: Kora Rewards API + description: | + API for Kora swap rewards and campaigns. + All numeric quantities are represented as strings in their original decimal format (e0). + For example: "123.456789" represents the actual token amount, not a scaled integer. + version: 1.0.0 +tags: + - name: Kora + description: Kora swap rewards endpoints + - name: Rewards + description: General rewards endpoints extended for Kora +servers: + - url: https://api.{env}.kora.so + variables: + env: + default: sui-staging + enum: + - sui-staging + - sui-prod + +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + + schemas: + Error: + type: object + properties: + error: + type: string + description: Error message + example: "Invalid request parameters" + code: + type: string + description: Error code + example: "INVALID_PARAMS" + + # Campaign Rewards (extended for Kora) + KoraCampaignRewards: + type: object + required: + - userAddress + - campaignName + - epochNumber + - intervalNumber + - status + properties: + userAddress: + type: string + description: User address for the rewards earned data + example: "0x1234567890abcdef" + campaignName: + type: string + description: Name of the campaign + example: "KORA_SWAPS" + epochNumber: + type: integer + description: Epoch number for the rewards earned data + example: 7 + intervalNumber: + type: integer + description: Interval number for the rewards earned data + example: 7 + symbol: + type: string + description: Market Symbol + example: "KORA-SWAPS" + status: + type: string + enum: + - ACTIVE + - NOT_STARTED + - FINALIZED + - COOLDOWN + ccRewards: + type: string + description: Total CC token rewards + example: "1500.75" + koraPoints: + type: string + description: Total Kora points earned + example: "2500.5" + intervalStartDate: + type: integer + description: Time in milliseconds for interval start date + example: 1724121094751 + intervalEndDate: + type: integer + description: Time in milliseconds for interval end date + example: 1724725894751 + isDisbursed: + type: boolean + description: Indicates if rewards have been disbursed + example: true + txnDigest: + type: string + description: Transaction digest of the disbursement + example: "8Fs9Q4ljB0cc0NhcqSVZRgTxe9KwZeRqjGYYYe4jXgXL" + claimStatus: + type: string + enum: + - CLAIMABLE + - CLAIMED + - NOT_YET_CLAIMABLE + - CLAIM_ENDED + description: Status of the claim + example: "CLAIMED" + bonusCcReward: + type: string + description: Total CC reward amount from bonuses + example: "500.5" + bonusPoints: + type: string + description: Total points earned from bonuses + example: "1000.75" + bonusCriteria: + type: string + description: Criteria for earning bonuses + example: "volume_threshold_100k" + isEligible: + type: boolean + description: Indicates if the user is eligible for rewards + example: true + hasCompleted: + type: boolean + description: Indicates if the user has completed the required criteria + example: false + + # Rewards Summary (extended for Kora) + KoraRewardsSummary: + type: object + required: + - userAddress + properties: + userAddress: + type: string + description: User address for the rewards earned data + example: "0x1234567890abcdef" + ccRewards: + type: string + description: Total CC token rewards earned across all Kora campaigns + example: "1500.75" + koraPoints: + type: string + description: Total Kora points earned across all Kora campaigns + example: "2500.5" + totalTransactions: + type: integer + description: Total number of transactions across all Kora campaigns + example: 150 + allTimeVolume: + type: string + description: All time trading volume across all Kora campaigns + example: "500000.75" + + # User Bonus Response (simplified) + KoraUserBonusResponse: + type: object + required: + - userAddress + - epochNumber + - bonusPoints + - bonusCcRewards + properties: + userAddress: + type: string + description: User wallet address + example: "0x1234567890abcdef" + epochNumber: + type: integer + description: Epoch number for the bonus + example: 7 + bonusPoints: + type: string + description: Total bonus points earned + example: "1000.75" + bonusCcRewards: + type: string + description: Total bonus CC rewards earned + example: "500.5" + criteria: + type: string + description: Criteria for earning the bonus + example: "volume_threshold_100k" + + # Campaign Metadata + CampaignMetadata: + type: object + required: + - status + - campaignName + - startDate + - endDate + properties: + status: + type: string + enum: + - ACTIVE + - INACTIVE + campaignName: + type: string + description: Name of the campaign + example: "KORA_SWAPS" + parentCampaignName: + type: string + description: Name of the parent campaign + example: "" + startDate: + type: integer + description: Time in milliseconds for campaign start date + example: 1724121094751 + endDate: + type: integer + description: Time in milliseconds for campaign end date + example: 1724121094751 + + # Epoch Metadata + EpochMetadata: + type: object + required: + - status + - campaignName + - epochId + - epochNumber + - startDate + - endDate + properties: + status: + type: string + enum: + - ACTIVE + - NOT_STARTED + - FINALIZED + - COOLDOWN + campaignName: + type: string + description: Name of the campaign + example: "KORA_SWAPS" + epochId: + type: string + format: uuid + description: Epoch ID + example: "550e8400-e29b-41d4-a716-446655440000" + epochNumber: + type: integer + description: Epoch number + example: 7 + startDate: + type: integer + description: Time in milliseconds for epoch start date + example: 1724121094751 + endDate: + type: integer + description: Time in milliseconds for epoch end date + example: 1724725894751 + + # Interval Metadata + IntervalMetadata: + type: object + required: + - status + - startDate + - endDate + - intervalId + properties: + status: + type: string + enum: + - ACTIVE + - NOT_STARTED + - FINALIZED + - COOLDOWN + startDate: + type: integer + description: Time in milliseconds for interval start date + example: 1724121094751 + endDate: + type: integer + description: Time in milliseconds for interval end date + example: 1724725894751 + intervalId: + type: integer + description: Interval ID + example: 7 + intervalType: + type: string + description: Type of the interval + example: "WEEK" + protocol: + type: string + enum: + - bluefin + - kora + description: Protocol for the interval + example: "kora" + + # Epoch Config + EpochConfig: + type: object + required: + - campaignName + - epochDuration + - intervalNumber + - epochNumber + properties: + campaignName: + type: string + description: The name of the campaign + example: "KORA_SWAPS" + epochDuration: + type: integer + description: Duration of the epoch in hours + example: 168 + ccRewardsAllocation: + type: string + description: Allocation of CC token rewards for this epoch + example: "5000.5" + koraPointsRewardsAllocation: + type: string + description: Allocation of Kora points rewards for this epoch + example: "10000.25" + intervalNumber: + type: integer + description: Interval number for the epoch + example: 7 + epochNumber: + type: integer + description: Epoch number + example: 7 + config: + type: object + description: Additional campaign-specific configurations + additionalProperties: true + bonusCriteria: + type: string + description: Criteria for earning bonuses in this epoch + example: "volume_threshold_100k" + +paths: + # ============================================================================ + # REWARDS ENDPOINTS (Extended for Kora) + # ============================================================================ + + /v1/rewards/campaign: + get: + tags: + - Rewards + operationId: getCampaignRewards + summary: Get campaign rewards + description: Returns the rewards earned by users for a specific campaign (including KORA_SWAPS). + parameters: + - name: campaignName + in: query + required: true + description: Specify the campaign name + schema: + type: string + enum: + - KORA_SWAPS + example: "KORA_SWAPS" + - name: epochNumber + in: query + required: false + description: Optionally specify epoch number + schema: + type: integer + example: 7 + - name: userAddress + in: query + required: true + description: Specify wallet address + schema: + type: string + example: "0x1234567890abcdef" + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KoraCampaignRewards" + "400": + description: Missing required parameters + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + /v1/rewards/summary: + get: + tags: + - Rewards + operationId: getRewardsSummary + summary: Get all-time rewards summary + description: Returns the all-time rewards earned by users including Kora CC and points. + security: + - bearerAuth: [] + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KoraRewardsSummary" + + /v1/rewards/bonuses: + get: + tags: + - Rewards + operationId: getUserBonuses + summary: Get all user bonuses by epoch + description: Returns the bonuses earned by all users for a specific epoch number. + parameters: + - name: epochNumber + in: query + required: true + description: Specify the epoch number + schema: + type: integer + example: 7 + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KoraUserBonusResponse" + "400": + description: Missing required parameters + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + # ============================================================================ + # METADATA ENDPOINTS + # ============================================================================ + + /v1/rewards/metadata/campaign: + get: + tags: + - Rewards + operationId: getCampaignMetadata + summary: Get campaign metadata + description: Returns metadata for rewards campaigns including Kora campaigns. + parameters: + - name: campaignName + in: query + required: false + description: Specify the campaign name + schema: + type: string + example: "KORA_SWAPS" + - name: status + in: query + required: false + description: Filter by campaign status + schema: + type: string + enum: + - ACTIVE + - INACTIVE + default: ACTIVE + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/CampaignMetadata" + + /v1/rewards/metadata/epoch: + get: + tags: + - Rewards + operationId: getEpochMetadata + summary: Get epoch metadata + description: Returns the latest or next epoch for a campaign. + parameters: + - name: campaignName + in: query + required: false + description: Specify the campaign name + schema: + type: string + example: "KORA_SWAPS" + - name: epoch + in: query + required: false + description: Specify "next" or "latest" + schema: + type: string + enum: ["next", "latest"] + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/EpochMetadata" + + /v1/rewards/metadata/epoch/configs: + get: + tags: + - Rewards + operationId: getEpochConfigMetadata + summary: Get epoch configuration + description: Returns epoch configuration including reward allocations. + parameters: + - name: intervalNumber + in: query + required: false + description: Specify the interval number + schema: + type: integer + example: 7 + - name: campaignName + in: query + required: false + description: Filter by campaign name + schema: + type: string + example: "KORA_SWAPS" + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: object + properties: + maxIntervalNumber: + type: integer + example: 14 + intervalNumber: + type: integer + example: 7 + data: + type: array + items: + $ref: "#/components/schemas/EpochConfig" + + /v1/rewards/metadata/interval: + get: + tags: + - Rewards + operationId: getIntervalMetadata + summary: Get interval metadata + description: Returns interval metadata with protocol filtering support. + parameters: + - name: interval + in: query + required: false + description: Interval number or "next"/"latest" + schema: + type: string + example: "latest" + - name: protocol + in: query + required: false + description: Filter by protocol + schema: + type: string + enum: + - bluefin + - kora + example: "kora" + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/IntervalMetadata" + + # ============================================================================ + # HEALTH CHECK + # ============================================================================ + + /v1/kora/health: + get: + tags: + - Kora + operationId: koraHealthCheck + summary: Kora service health check + description: Returns the health status of the Kora rewards service. + responses: + "200": + description: Service is healthy + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: "ok" + timestamp: + type: integer + example: 1724725894751 diff --git a/rust/gen/bluefin_api/.openapi-generator/FILES b/rust/gen/bluefin_api/.openapi-generator/FILES index 8bcdde3..ad0c26f 100644 --- a/rust/gen/bluefin_api/.openapi-generator/FILES +++ b/rust/gen/bluefin_api/.openapi-generator/FILES @@ -59,6 +59,7 @@ docs/EpochConfigs.md docs/EpochConfigsResponse.md docs/EpochMetadata.md docs/Error.md +docs/Error1.md docs/ExchangeApi.md docs/ExchangeInfoResponse.md docs/FailedCommandType.md @@ -72,6 +73,9 @@ docs/IntervalMetadata.md docs/IntervalRewards.md docs/IssBase64Details.md docs/KlineInterval.md +docs/KoraApi.md +docs/KoraHealthCheck200Response.md +docs/KoraUserBonusResponse.md docs/LeaderboardEntry.md docs/LeaderboardInterval.md docs/LeaderboardResponse.md @@ -153,6 +157,7 @@ src/apis/account_data_api.rs src/apis/auth_api.rs src/apis/configuration.rs src/apis/exchange_api.rs +src/apis/kora_api.rs src/apis/mod.rs src/apis/rewards_api.rs src/apis/streams_api.rs @@ -213,6 +218,7 @@ src/models/epoch_configs.rs src/models/epoch_configs_response.rs src/models/epoch_metadata.rs src/models/error.rs +src/models/error_1.rs src/models/exchange_info_response.rs src/models/failed_command_type.rs src/models/fee_configs.rs @@ -225,6 +231,8 @@ src/models/interval_metadata.rs src/models/interval_rewards.rs src/models/iss_base64_details.rs src/models/kline_interval.rs +src/models/kora_health_check_200_response.rs +src/models/kora_user_bonus_response.rs src/models/leaderboard_entry.rs src/models/leaderboard_interval.rs src/models/leaderboard_response.rs diff --git a/rust/gen/bluefin_api/README.md b/rust/gen/bluefin_api/README.md index 6bad89e..75b0ad8 100644 --- a/rust/gen/bluefin_api/README.md +++ b/rust/gen/bluefin_api/README.md @@ -52,6 +52,7 @@ Class | Method | HTTP request | Description *ExchangeApi* | [**get_market_ticker**](docs/ExchangeApi.md#get_market_ticker) | **GET** /v1/exchange/ticker | /exchange/ticker *ExchangeApi* | [**get_orderbook_depth**](docs/ExchangeApi.md#get_orderbook_depth) | **GET** /v1/exchange/depth | /exchange/depth *ExchangeApi* | [**get_recent_trades**](docs/ExchangeApi.md#get_recent_trades) | **GET** /v1/exchange/trades | /exchange/trades +*KoraApi* | [**kora_health_check**](docs/KoraApi.md#kora_health_check) | **GET** /v1/kora/health | Kora service health check *RewardsApi* | [**get_affiliate_interval_overview**](docs/RewardsApi.md#get_affiliate_interval_overview) | **GET** /v1/rewards/affiliate/intervalOverview | /rewards/affiliate/intervalOverview *RewardsApi* | [**get_affiliate_leader_dashboard**](docs/RewardsApi.md#get_affiliate_leader_dashboard) | **GET** /v1/rewards/affiliate/leaderDashboard | /rewards/affiliate/leaderDashboard *RewardsApi* | [**get_affiliate_metadata**](docs/RewardsApi.md#get_affiliate_metadata) | **GET** /v1/rewards/affiliate | /rewards/affiliate @@ -65,6 +66,7 @@ Class | Method | HTTP request | Description *RewardsApi* | [**get_rewards_epoch_metadata**](docs/RewardsApi.md#get_rewards_epoch_metadata) | **GET** /v1/rewards/metadata/epoch | /rewards/metadata/epoch *RewardsApi* | [**get_rewards_interval_metadata**](docs/RewardsApi.md#get_rewards_interval_metadata) | **GET** /v1/rewards/metadata/interval | /rewards/metadata/interval *RewardsApi* | [**get_rewards_summary**](docs/RewardsApi.md#get_rewards_summary) | **GET** /v1/rewards/summary | /rewards/summary +*RewardsApi* | [**get_user_bonuses**](docs/RewardsApi.md#get_user_bonuses) | **GET** /v1/rewards/bonuses | Get all user bonuses by epoch *RewardsApi* | [**mark_as_claimed**](docs/RewardsApi.md#mark_as_claimed) | **POST** /v1/rewards/claims/mark-claimed | /v1/rewards/claims/mark-claimed *RewardsApi* | [**onboard_affiliate**](docs/RewardsApi.md#onboard_affiliate) | **POST** /v1/rewards/affiliate/onboard | /rewards/affiliate/onboard *RewardsApi* | [**onboard_referee**](docs/RewardsApi.md#onboard_referee) | **POST** /v1/rewards/affiliate/onboard/referee | /rewards/affiliate/onboard/referee @@ -141,6 +143,7 @@ Class | Method | HTTP request | Description - [EpochConfigsResponse](docs/EpochConfigsResponse.md) - [EpochMetadata](docs/EpochMetadata.md) - [Error](docs/Error.md) + - [Error1](docs/Error1.md) - [ExchangeInfoResponse](docs/ExchangeInfoResponse.md) - [FailedCommandType](docs/FailedCommandType.md) - [FeeConfigs](docs/FeeConfigs.md) @@ -153,6 +156,8 @@ Class | Method | HTTP request | Description - [IntervalRewards](docs/IntervalRewards.md) - [IssBase64Details](docs/IssBase64Details.md) - [KlineInterval](docs/KlineInterval.md) + - [KoraHealthCheck200Response](docs/KoraHealthCheck200Response.md) + - [KoraUserBonusResponse](docs/KoraUserBonusResponse.md) - [LeaderboardEntry](docs/LeaderboardEntry.md) - [LeaderboardInterval](docs/LeaderboardInterval.md) - [LeaderboardResponse](docs/LeaderboardResponse.md) diff --git a/rust/gen/bluefin_api/docs/Error1.md b/rust/gen/bluefin_api/docs/Error1.md new file mode 100644 index 0000000..c4b05c6 --- /dev/null +++ b/rust/gen/bluefin_api/docs/Error1.md @@ -0,0 +1,12 @@ +# Error1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | Option<**String**> | Error message | [optional] +**code** | Option<**String**> | Error code | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraApi.md b/rust/gen/bluefin_api/docs/KoraApi.md new file mode 100644 index 0000000..fc9578b --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraApi.md @@ -0,0 +1,36 @@ +# \KoraApi + +All URIs are relative to *https://api.sui-staging.bluefin.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**kora_health_check**](KoraApi.md#kora_health_check) | **GET** /v1/kora/health | Kora service health check + + + +## kora_health_check + +> models::KoraHealthCheck200Response kora_health_check() +Kora service health check + +Returns the health status of the Kora rewards service. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::KoraHealthCheck200Response**](koraHealthCheck_200_response.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) + diff --git a/rust/gen/bluefin_api/docs/KoraCampaignBonus.md b/rust/gen/bluefin_api/docs/KoraCampaignBonus.md new file mode 100644 index 0000000..a01a8ba --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraCampaignBonus.md @@ -0,0 +1,14 @@ +# KoraCampaignBonus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bonus_type** | Option<**String**> | Type of bonus (e.g., VOLUME_BONUS, REFERRAL_BONUS) | [optional] +**bonus_cc_reward** | Option<**String**> | CC reward amount for this bonus | [optional] +**bonus_points** | Option<**String**> | Points earned for this bonus | [optional] +**bonus_criteria** | Option<**String**> | Criteria that was met for earning this bonus | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraCampaignMetadata.md b/rust/gen/bluefin_api/docs/KoraCampaignMetadata.md new file mode 100644 index 0000000..fc0354a --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraCampaignMetadata.md @@ -0,0 +1,15 @@ +# KoraCampaignMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **String** | | +**campaign_name** | **String** | Name of the campaign | +**parent_campaign_name** | Option<**String**> | Name of the parent campaign | [optional] +**start_date** | **i32** | Time in milliseconds for campaign start date | +**end_date** | **i32** | Time in milliseconds for campaign end date | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rust/gen/bluefin_api/docs/KoraCampaignRewards.md b/rust/gen/bluefin_api/docs/KoraCampaignRewards.md new file mode 100644 index 0000000..8b15c55 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraCampaignRewards.md @@ -0,0 +1,29 @@ +# KoraCampaignRewards + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_address** | **String** | User address for the rewards earned data | +**campaign_name** | **String** | Name of the campaign | +**epoch_number** | **i32** | Epoch number for the rewards earned data | +**interval_number** | **i32** | Interval number for the rewards earned data | +**symbol** | Option<**String**> | Market Symbol | [optional] +**status** | **String** | | +**blue_rewards** | Option<**String**> | Total blue token rewards | [optional] +**sui_rewards** | Option<**String**> | Total sui token rewards | [optional] +**wal_rewards** | Option<**String**> | Total wal rewards | [optional] +**cash_rewards** | Option<**String**> | Total cash rewards | [optional] +**cc_rewards** | Option<**String**> | Total CC token rewards | [optional] +**kora_points** | Option<**String**> | Total Kora points earned | [optional] +**user_fee_paid** | Option<**String**> | Total user fee paid | [optional] +**interval_start_date** | Option<**i32**> | Time in milliseconds for interval start date | [optional] +**interval_end_date** | Option<**i32**> | Time in milliseconds for interval end date | [optional] +**is_disbursed** | Option<**bool**> | Indicates if rewards have been disbursed | [optional] +**txn_digest** | Option<**String**> | Transaction digest of the disbursement | [optional] +**claim_status** | Option<**String**> | Status of the claim | [optional] +**bonuses** | Option<[**Vec**](KoraCampaignBonus.md)> | List of bonuses attached to this reward entry | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraEpochConfig.md b/rust/gen/bluefin_api/docs/KoraEpochConfig.md new file mode 100644 index 0000000..5cbec5d --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraEpochConfig.md @@ -0,0 +1,20 @@ +# KoraEpochConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_name** | **String** | The name of the campaign | +**epoch_duration** | **i32** | Duration of the epoch in hours | +**sui_rewards_allocation** | Option<**String**> | Allocation of Sui rewards for this epoch | [optional] +**blue_rewards_allocation** | Option<**String**> | Allocation of Blue rewards for this epoch | [optional] +**wal_rewards_allocation** | Option<**String**> | Allocation of Wal rewards for this epoch | [optional] +**cc_rewards_allocation** | Option<**String**> | Allocation of CC token rewards for this epoch | [optional] +**kora_points_rewards_allocation** | Option<**String**> | Allocation of Kora points rewards for this epoch | [optional] +**interval_number** | **i32** | Interval number for the epoch | +**epoch_number** | **i32** | Epoch number | +**config** | Option<[**std::collections::HashMap**](serde_json::Value.md)> | Additional campaign-specific configurations | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraEpochConfigResponse.md b/rust/gen/bluefin_api/docs/KoraEpochConfigResponse.md new file mode 100644 index 0000000..af52829 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraEpochConfigResponse.md @@ -0,0 +1,13 @@ +# KoraEpochConfigResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_interval_number** | **i32** | The maximum interval number available | +**interval_number** | **i32** | The current interval number being queried | +**data** | [**Vec**](KoraEpochConfig.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) + + diff --git a/rust/gen/bluefin_api/docs/KoraEpochMetadata.md b/rust/gen/bluefin_api/docs/KoraEpochMetadata.md new file mode 100644 index 0000000..629cee3 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraEpochMetadata.md @@ -0,0 +1,16 @@ +# KoraEpochMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **String** | | +**campaign_name** | **String** | Name of the campaign | +**epoch_id** | [**uuid::Uuid**](uuid::Uuid.md) | Epoch ID | +**epoch_number** | **i32** | Epoch number | +**start_date** | **i32** | Time in milliseconds for epoch start date | +**end_date** | **i32** | Time in milliseconds for epoch end date | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rust/gen/bluefin_api/docs/KoraHealthCheck200Response.md b/rust/gen/bluefin_api/docs/KoraHealthCheck200Response.md new file mode 100644 index 0000000..d7d8453 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraHealthCheck200Response.md @@ -0,0 +1,12 @@ +# KoraHealthCheck200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | Option<**String**> | | [optional] +**timestamp** | Option<**i32**> | | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraIntervalMetadata.md b/rust/gen/bluefin_api/docs/KoraIntervalMetadata.md new file mode 100644 index 0000000..f539a50 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraIntervalMetadata.md @@ -0,0 +1,16 @@ +# KoraIntervalMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **String** | | +**start_date** | **i32** | Time in milliseconds for interval start date | +**end_date** | **i32** | Time in milliseconds for interval end date | +**interval_id** | **i32** | Interval ID | +**interval_type** | Option<**String**> | Type of the interval | [optional] +**protocol** | Option<**String**> | Protocol for the interval | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraLeaderboardEntry.md b/rust/gen/bluefin_api/docs/KoraLeaderboardEntry.md new file mode 100644 index 0000000..c97fdd3 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraLeaderboardEntry.md @@ -0,0 +1,23 @@ +# KoraLeaderboardEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rank** | **i32** | Overall ranking position based on sortBy parameter | +**user_address** | **String** | Wallet address of the user | +**total_volume_e6** | **String** | Total swap volume (USD equivalent) | +**total_fee_e6** | Option<**String**> | Total fees paid | [optional] +**total_transactions** | **i32** | Total number of qualifying swap transactions | +**cc_rewards** | **String** | CC token rewards earned | +**kora_points** | **String** | Kora points earned | +**total_bonus_points** | Option<**String**> | Total bonus points earned | [optional] +**total_bonus_cc** | Option<**String**> | Total bonus CC tokens earned | [optional] +**volume_rank** | Option<**i32**> | Ranking based purely on trading volume | [optional] +**transaction_rank** | Option<**i32**> | Ranking based purely on transaction count | [optional] +**total_earnings_rank** | Option<**i32**> | Ranking based on combined CC + Kora points value | [optional] +**last_activity_date** | Option<**i32**> | Timestamp of user's most recent swap (milliseconds) | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraLeaderboardResponse.md b/rust/gen/bluefin_api/docs/KoraLeaderboardResponse.md new file mode 100644 index 0000000..27243d8 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraLeaderboardResponse.md @@ -0,0 +1,14 @@ +# KoraLeaderboardResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Vec**](KoraLeaderboardEntry.md) | | +**total** | **i32** | Total number of records | +**limit** | **i32** | Page size for pagination | +**page** | **i32** | Current page number | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rust/gen/bluefin_api/docs/KoraRewardsSummary.md b/rust/gen/bluefin_api/docs/KoraRewardsSummary.md new file mode 100644 index 0000000..9104f48 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraRewardsSummary.md @@ -0,0 +1,16 @@ +# KoraRewardsSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_address** | **String** | User address for the rewards earned data | +**blue_rewards** | Option<**String**> | Total Blue token rewards earned | [optional] +**sui_rewards** | Option<**String**> | Total Sui token rewards earned | [optional] +**wal_rewards** | Option<**String**> | Total wal rewards earned | [optional] +**cc_rewards** | Option<**String**> | Total CC token rewards earned across all Kora campaigns | [optional] +**kora_points** | Option<**String**> | Total Kora points earned across all Kora campaigns | [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) + + diff --git a/rust/gen/bluefin_api/docs/KoraUserBonusResponse.md b/rust/gen/bluefin_api/docs/KoraUserBonusResponse.md new file mode 100644 index 0000000..c0e0348 --- /dev/null +++ b/rust/gen/bluefin_api/docs/KoraUserBonusResponse.md @@ -0,0 +1,15 @@ +# KoraUserBonusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_address** | **String** | User wallet address | +**epoch_number** | **i32** | Epoch number for the bonus | +**bonus_points** | **String** | Total bonus points earned | +**bonus_cc_rewards** | **String** | Total bonus CC rewards earned | +**criteria** | Option<**String**> | Criteria for earning the bonus | [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) + + diff --git a/rust/gen/bluefin_api/docs/RewardsApi.md b/rust/gen/bluefin_api/docs/RewardsApi.md index b47d3c1..62eef63 100644 --- a/rust/gen/bluefin_api/docs/RewardsApi.md +++ b/rust/gen/bluefin_api/docs/RewardsApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**get_rewards_epoch_metadata**](RewardsApi.md#get_rewards_epoch_metadata) | **GET** /v1/rewards/metadata/epoch | /rewards/metadata/epoch [**get_rewards_interval_metadata**](RewardsApi.md#get_rewards_interval_metadata) | **GET** /v1/rewards/metadata/interval | /rewards/metadata/interval [**get_rewards_summary**](RewardsApi.md#get_rewards_summary) | **GET** /v1/rewards/summary | /rewards/summary +[**get_user_bonuses**](RewardsApi.md#get_user_bonuses) | **GET** /v1/rewards/bonuses | Get all user bonuses by epoch [**mark_as_claimed**](RewardsApi.md#mark_as_claimed) | **POST** /v1/rewards/claims/mark-claimed | /v1/rewards/claims/mark-claimed [**onboard_affiliate**](RewardsApi.md#onboard_affiliate) | **POST** /v1/rewards/affiliate/onboard | /rewards/affiliate/onboard [**onboard_referee**](RewardsApi.md#onboard_referee) | **POST** /v1/rewards/affiliate/onboard/referee | /rewards/affiliate/onboard/referee @@ -425,6 +426,36 @@ This endpoint does not need any parameter. [[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_bonuses + +> Vec get_user_bonuses(epoch_number) +Get all user bonuses by epoch + +Returns the bonuses earned by all users for a specific epoch number. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**epoch_number** | **i32** | Specify the epoch number | [required] | + +### Return type + +[**Vec**](KoraUserBonusResponse.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) + + ## mark_as_claimed > models::MarkAsClaimedResponse mark_as_claimed(mark_as_claimed_request) diff --git a/rust/gen/bluefin_api/src/apis/kora_api.rs b/rust/gen/bluefin_api/src/apis/kora_api.rs new file mode 100644 index 0000000..9f4e01f --- /dev/null +++ b/rust/gen/bluefin_api/src/apis/kora_api.rs @@ -0,0 +1,60 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`kora_health_check`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum KoraHealthCheckError { + UnknownValue(serde_json::Value), +} + + +/// Returns the health status of the Kora rewards service. +pub async fn kora_health_check(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/v1/kora/health", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KoraHealthCheck200Response`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KoraHealthCheck200Response`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/rust/gen/bluefin_api/src/apis/mod.rs b/rust/gen/bluefin_api/src/apis/mod.rs index ac5de8d..46f31a6 100644 --- a/rust/gen/bluefin_api/src/apis/mod.rs +++ b/rust/gen/bluefin_api/src/apis/mod.rs @@ -114,6 +114,7 @@ impl From<&str> for ContentType { pub mod account_data_api; pub mod auth_api; pub mod exchange_api; +pub mod kora_api; pub mod rewards_api; pub mod streams_api; pub mod trade_api; diff --git a/rust/gen/bluefin_api/src/apis/rewards_api.rs b/rust/gen/bluefin_api/src/apis/rewards_api.rs index 5f06e12..4d39fd1 100644 --- a/rust/gen/bluefin_api/src/apis/rewards_api.rs +++ b/rust/gen/bluefin_api/src/apis/rewards_api.rs @@ -123,6 +123,14 @@ pub enum GetRewardsSummaryError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`get_user_bonuses`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserBonusesError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`mark_as_claimed`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -747,6 +755,44 @@ pub async fn get_rewards_summary(configuration: &configuration::Configuration, ) } } +/// Returns the bonuses earned by all users for a specific epoch number. +pub async fn get_user_bonuses(configuration: &configuration::Configuration, epoch_number: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_epoch_number = epoch_number; + + let uri_str = format!("{}/v1/rewards/bonuses", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("epochNumber", &p_epoch_number.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::KoraUserBonusResponse>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::KoraUserBonusResponse>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + /// Mark user claims as claimed for the specified campaign name and interval number pub async fn mark_as_claimed(configuration: &configuration::Configuration, mark_as_claimed_request: models::MarkAsClaimedRequest) -> Result> { // add a prefix to parameters to efficiently prevent name collisions diff --git a/rust/gen/bluefin_api/src/models/error_1.rs b/rust/gen/bluefin_api/src/models/error_1.rs new file mode 100644 index 0000000..9bc913e --- /dev/null +++ b/rust/gen/bluefin_api/src/models/error_1.rs @@ -0,0 +1,32 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Error1 { + /// Error message + #[serde(rename = "error", skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Error code + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, +} + +impl Error1 { + pub fn new() -> Error1 { + Error1 { + error: None, + code: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_campaign_bonus.rs b/rust/gen/bluefin_api/src/models/kora_campaign_bonus.rs new file mode 100644 index 0000000..3a42ab3 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_campaign_bonus.rs @@ -0,0 +1,40 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraCampaignBonus { + /// Type of bonus (e.g., VOLUME_BONUS, REFERRAL_BONUS) + #[serde(rename = "bonusType", skip_serializing_if = "Option::is_none")] + pub bonus_type: Option, + /// CC reward amount for this bonus + #[serde(rename = "bonusCcReward", skip_serializing_if = "Option::is_none")] + pub bonus_cc_reward: Option, + /// Points earned for this bonus + #[serde(rename = "bonusPoints", skip_serializing_if = "Option::is_none")] + pub bonus_points: Option, + /// Criteria that was met for earning this bonus + #[serde(rename = "bonusCriteria", skip_serializing_if = "Option::is_none")] + pub bonus_criteria: Option, +} + +impl KoraCampaignBonus { + pub fn new() -> KoraCampaignBonus { + KoraCampaignBonus { + bonus_type: None, + bonus_cc_reward: None, + bonus_points: None, + bonus_criteria: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_campaign_metadata.rs b/rust/gen/bluefin_api/src/models/kora_campaign_metadata.rs new file mode 100644 index 0000000..2ecdd03 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_campaign_metadata.rs @@ -0,0 +1,57 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraCampaignMetadata { + #[serde(rename = "status")] + pub status: Status, + /// Name of the campaign + #[serde(rename = "campaignName")] + pub campaign_name: String, + /// Name of the parent campaign + #[serde(rename = "parentCampaignName", skip_serializing_if = "Option::is_none")] + pub parent_campaign_name: Option, + /// Time in milliseconds for campaign start date + #[serde(rename = "startDate")] + pub start_date: i32, + /// Time in milliseconds for campaign end date + #[serde(rename = "endDate")] + pub end_date: i32, +} + +impl KoraCampaignMetadata { + pub fn new(status: Status, campaign_name: String, start_date: i32, end_date: i32) -> KoraCampaignMetadata { + KoraCampaignMetadata { + status, + campaign_name, + parent_campaign_name: None, + start_date, + end_date, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "ACTIVE")] + Active, + #[serde(rename = "INACTIVE")] + Inactive, +} + +impl Default for Status { + fn default() -> Status { + Self::Active + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_campaign_rewards.rs b/rust/gen/bluefin_api/src/models/kora_campaign_rewards.rs new file mode 100644 index 0000000..ad2ce9d --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_campaign_rewards.rs @@ -0,0 +1,135 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraCampaignRewards { + /// User address for the rewards earned data + #[serde(rename = "userAddress")] + pub user_address: String, + /// Name of the campaign + #[serde(rename = "campaignName")] + pub campaign_name: String, + /// Epoch number for the rewards earned data + #[serde(rename = "epochNumber")] + pub epoch_number: i32, + /// Interval number for the rewards earned data + #[serde(rename = "intervalNumber")] + pub interval_number: i32, + /// Market Symbol + #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] + pub symbol: Option, + #[serde(rename = "status")] + pub status: Status, + /// Total blue token rewards + #[serde(rename = "blueRewards", skip_serializing_if = "Option::is_none")] + pub blue_rewards: Option, + /// Total sui token rewards + #[serde(rename = "suiRewards", skip_serializing_if = "Option::is_none")] + pub sui_rewards: Option, + /// Total wal rewards + #[serde(rename = "walRewards", skip_serializing_if = "Option::is_none")] + pub wal_rewards: Option, + /// Total cash rewards + #[serde(rename = "cashRewards", skip_serializing_if = "Option::is_none")] + pub cash_rewards: Option, + /// Total CC token rewards + #[serde(rename = "ccRewards", skip_serializing_if = "Option::is_none")] + pub cc_rewards: Option, + /// Total Kora points earned + #[serde(rename = "koraPoints", skip_serializing_if = "Option::is_none")] + pub kora_points: Option, + /// Total user fee paid + #[serde(rename = "userFeePaid", skip_serializing_if = "Option::is_none")] + pub user_fee_paid: Option, + /// Time in milliseconds for interval start date + #[serde(rename = "intervalStartDate", skip_serializing_if = "Option::is_none")] + pub interval_start_date: Option, + /// Time in milliseconds for interval end date + #[serde(rename = "intervalEndDate", skip_serializing_if = "Option::is_none")] + pub interval_end_date: Option, + /// Indicates if rewards have been disbursed + #[serde(rename = "isDisbursed", skip_serializing_if = "Option::is_none")] + pub is_disbursed: Option, + /// Transaction digest of the disbursement + #[serde(rename = "txnDigest", skip_serializing_if = "Option::is_none")] + pub txn_digest: Option, + /// Status of the claim + #[serde(rename = "claimStatus", skip_serializing_if = "Option::is_none")] + pub claim_status: Option, + /// List of bonuses attached to this reward entry + #[serde(rename = "bonuses", skip_serializing_if = "Option::is_none")] + pub bonuses: Option>, +} + +impl KoraCampaignRewards { + pub fn new(user_address: String, campaign_name: String, epoch_number: i32, interval_number: i32, status: Status) -> KoraCampaignRewards { + KoraCampaignRewards { + user_address, + campaign_name, + epoch_number, + interval_number, + symbol: None, + status, + blue_rewards: None, + sui_rewards: None, + wal_rewards: None, + cash_rewards: None, + cc_rewards: None, + kora_points: None, + user_fee_paid: None, + interval_start_date: None, + interval_end_date: None, + is_disbursed: None, + txn_digest: None, + claim_status: None, + bonuses: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "ACTIVE")] + Active, + #[serde(rename = "NOT_STARTED")] + NotStarted, + #[serde(rename = "FINALIZED")] + Finalized, + #[serde(rename = "COOLDOWN")] + Cooldown, +} + +impl Default for Status { + fn default() -> Status { + Self::Active + } +} +/// Status of the claim +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ClaimStatus { + #[serde(rename = "CLAIMABLE")] + Claimable, + #[serde(rename = "CLAIMED")] + Claimed, + #[serde(rename = "NOT_YET_CLAIMABLE")] + NotYetClaimable, + #[serde(rename = "CLAIM_ENDED")] + ClaimEnded, +} + +impl Default for ClaimStatus { + fn default() -> ClaimStatus { + Self::Claimable + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_epoch_config.rs b/rust/gen/bluefin_api/src/models/kora_epoch_config.rs new file mode 100644 index 0000000..12b1e48 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_epoch_config.rs @@ -0,0 +1,64 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraEpochConfig { + /// The name of the campaign + #[serde(rename = "campaignName")] + pub campaign_name: String, + /// Duration of the epoch in hours + #[serde(rename = "epochDuration")] + pub epoch_duration: i32, + /// Allocation of Sui rewards for this epoch + #[serde(rename = "suiRewardsAllocation", skip_serializing_if = "Option::is_none")] + pub sui_rewards_allocation: Option, + /// Allocation of Blue rewards for this epoch + #[serde(rename = "blueRewardsAllocation", skip_serializing_if = "Option::is_none")] + pub blue_rewards_allocation: Option, + /// Allocation of Wal rewards for this epoch + #[serde(rename = "walRewardsAllocation", skip_serializing_if = "Option::is_none")] + pub wal_rewards_allocation: Option, + /// Allocation of CC token rewards for this epoch + #[serde(rename = "ccRewardsAllocation", skip_serializing_if = "Option::is_none")] + pub cc_rewards_allocation: Option, + /// Allocation of Kora points rewards for this epoch + #[serde(rename = "koraPointsRewardsAllocation", skip_serializing_if = "Option::is_none")] + pub kora_points_rewards_allocation: Option, + /// Interval number for the epoch + #[serde(rename = "intervalNumber")] + pub interval_number: i32, + /// Epoch number + #[serde(rename = "epochNumber")] + pub epoch_number: i32, + /// Additional campaign-specific configurations + #[serde(rename = "config", skip_serializing_if = "Option::is_none")] + pub config: Option>, +} + +impl KoraEpochConfig { + pub fn new(campaign_name: String, epoch_duration: i32, interval_number: i32, epoch_number: i32) -> KoraEpochConfig { + KoraEpochConfig { + campaign_name, + epoch_duration, + sui_rewards_allocation: None, + blue_rewards_allocation: None, + wal_rewards_allocation: None, + cc_rewards_allocation: None, + kora_points_rewards_allocation: None, + interval_number, + epoch_number, + config: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_epoch_config_response.rs b/rust/gen/bluefin_api/src/models/kora_epoch_config_response.rs new file mode 100644 index 0000000..2a2d1e1 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_epoch_config_response.rs @@ -0,0 +1,35 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraEpochConfigResponse { + /// The maximum interval number available + #[serde(rename = "maxIntervalNumber")] + pub max_interval_number: i32, + /// The current interval number being queried + #[serde(rename = "intervalNumber")] + pub interval_number: i32, + #[serde(rename = "data")] + pub data: Vec, +} + +impl KoraEpochConfigResponse { + pub fn new(max_interval_number: i32, interval_number: i32, data: Vec) -> KoraEpochConfigResponse { + KoraEpochConfigResponse { + max_interval_number, + interval_number, + data, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_epoch_metadata.rs b/rust/gen/bluefin_api/src/models/kora_epoch_metadata.rs new file mode 100644 index 0000000..aa53d27 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_epoch_metadata.rs @@ -0,0 +1,65 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraEpochMetadata { + #[serde(rename = "status")] + pub status: Status, + /// Name of the campaign + #[serde(rename = "campaignName")] + pub campaign_name: String, + /// Epoch ID + #[serde(rename = "epochId")] + pub epoch_id: uuid::Uuid, + /// Epoch number + #[serde(rename = "epochNumber")] + pub epoch_number: i32, + /// Time in milliseconds for epoch start date + #[serde(rename = "startDate")] + pub start_date: i32, + /// Time in milliseconds for epoch end date + #[serde(rename = "endDate")] + pub end_date: i32, +} + +impl KoraEpochMetadata { + pub fn new(status: Status, campaign_name: String, epoch_id: uuid::Uuid, epoch_number: i32, start_date: i32, end_date: i32) -> KoraEpochMetadata { + KoraEpochMetadata { + status, + campaign_name, + epoch_id, + epoch_number, + start_date, + end_date, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "ACTIVE")] + Active, + #[serde(rename = "NOT_STARTED")] + NotStarted, + #[serde(rename = "FINALIZED")] + Finalized, + #[serde(rename = "COOLDOWN")] + Cooldown, +} + +impl Default for Status { + fn default() -> Status { + Self::Active + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_health_check_200_response.rs b/rust/gen/bluefin_api/src/models/kora_health_check_200_response.rs new file mode 100644 index 0000000..3606f98 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_health_check_200_response.rs @@ -0,0 +1,30 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraHealthCheck200Response { + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] + pub timestamp: Option, +} + +impl KoraHealthCheck200Response { + pub fn new() -> KoraHealthCheck200Response { + KoraHealthCheck200Response { + status: None, + timestamp: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_interval_metadata.rs b/rust/gen/bluefin_api/src/models/kora_interval_metadata.rs new file mode 100644 index 0000000..ea0b60b --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_interval_metadata.rs @@ -0,0 +1,79 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraIntervalMetadata { + #[serde(rename = "status")] + pub status: Status, + /// Time in milliseconds for interval start date + #[serde(rename = "startDate")] + pub start_date: i32, + /// Time in milliseconds for interval end date + #[serde(rename = "endDate")] + pub end_date: i32, + /// Interval ID + #[serde(rename = "intervalId")] + pub interval_id: i32, + /// Type of the interval + #[serde(rename = "intervalType", skip_serializing_if = "Option::is_none")] + pub interval_type: Option, + /// Protocol for the interval + #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")] + pub protocol: Option, +} + +impl KoraIntervalMetadata { + pub fn new(status: Status, start_date: i32, end_date: i32, interval_id: i32) -> KoraIntervalMetadata { + KoraIntervalMetadata { + status, + start_date, + end_date, + interval_id, + interval_type: None, + protocol: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "ACTIVE")] + Active, + #[serde(rename = "NOT_STARTED")] + NotStarted, + #[serde(rename = "FINALIZED")] + Finalized, + #[serde(rename = "COOLDOWN")] + Cooldown, +} + +impl Default for Status { + fn default() -> Status { + Self::Active + } +} +/// Protocol for the interval +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Protocol { + #[serde(rename = "bluefin")] + Bluefin, + #[serde(rename = "kora")] + Kora, +} + +impl Default for Protocol { + fn default() -> Protocol { + Self::Bluefin + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_leaderboard_entry.rs b/rust/gen/bluefin_api/src/models/kora_leaderboard_entry.rs new file mode 100644 index 0000000..de05972 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_leaderboard_entry.rs @@ -0,0 +1,76 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraLeaderboardEntry { + /// Overall ranking position based on sortBy parameter + #[serde(rename = "rank")] + pub rank: i32, + /// Wallet address of the user + #[serde(rename = "userAddress")] + pub user_address: String, + /// Total swap volume (USD equivalent) + #[serde(rename = "totalVolumeE6")] + pub total_volume_e6: String, + /// Total fees paid + #[serde(rename = "totalFeeE6", skip_serializing_if = "Option::is_none")] + pub total_fee_e6: Option, + /// Total number of qualifying swap transactions + #[serde(rename = "totalTransactions")] + pub total_transactions: i32, + /// CC token rewards earned + #[serde(rename = "ccRewards")] + pub cc_rewards: String, + /// Kora points earned + #[serde(rename = "koraPoints")] + pub kora_points: String, + /// Total bonus points earned + #[serde(rename = "totalBonusPoints", skip_serializing_if = "Option::is_none")] + pub total_bonus_points: Option, + /// Total bonus CC tokens earned + #[serde(rename = "totalBonusCC", skip_serializing_if = "Option::is_none")] + pub total_bonus_cc: Option, + /// Ranking based purely on trading volume + #[serde(rename = "volumeRank", skip_serializing_if = "Option::is_none")] + pub volume_rank: Option, + /// Ranking based purely on transaction count + #[serde(rename = "transactionRank", skip_serializing_if = "Option::is_none")] + pub transaction_rank: Option, + /// Ranking based on combined CC + Kora points value + #[serde(rename = "totalEarningsRank", skip_serializing_if = "Option::is_none")] + pub total_earnings_rank: Option, + /// Timestamp of user's most recent swap (milliseconds) + #[serde(rename = "lastActivityDate", skip_serializing_if = "Option::is_none")] + pub last_activity_date: Option, +} + +impl KoraLeaderboardEntry { + pub fn new(rank: i32, user_address: String, total_volume_e6: String, total_transactions: i32, cc_rewards: String, kora_points: String) -> KoraLeaderboardEntry { + KoraLeaderboardEntry { + rank, + user_address, + total_volume_e6, + total_fee_e6: None, + total_transactions, + cc_rewards, + kora_points, + total_bonus_points: None, + total_bonus_cc: None, + volume_rank: None, + transaction_rank: None, + total_earnings_rank: None, + last_activity_date: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_leaderboard_response.rs b/rust/gen/bluefin_api/src/models/kora_leaderboard_response.rs new file mode 100644 index 0000000..36dea29 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_leaderboard_response.rs @@ -0,0 +1,39 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraLeaderboardResponse { + #[serde(rename = "data")] + pub data: Vec, + /// Total number of records + #[serde(rename = "total")] + pub total: i32, + /// Page size for pagination + #[serde(rename = "limit")] + pub limit: i32, + /// Current page number + #[serde(rename = "page")] + pub page: i32, +} + +impl KoraLeaderboardResponse { + pub fn new(data: Vec, total: i32, limit: i32, page: i32) -> KoraLeaderboardResponse { + KoraLeaderboardResponse { + data, + total, + limit, + page, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_rewards_summary.rs b/rust/gen/bluefin_api/src/models/kora_rewards_summary.rs new file mode 100644 index 0000000..80f84cb --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_rewards_summary.rs @@ -0,0 +1,48 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraRewardsSummary { + /// User address for the rewards earned data + #[serde(rename = "userAddress")] + pub user_address: String, + /// Total Blue token rewards earned + #[serde(rename = "blueRewards", skip_serializing_if = "Option::is_none")] + pub blue_rewards: Option, + /// Total Sui token rewards earned + #[serde(rename = "suiRewards", skip_serializing_if = "Option::is_none")] + pub sui_rewards: Option, + /// Total wal rewards earned + #[serde(rename = "walRewards", skip_serializing_if = "Option::is_none")] + pub wal_rewards: Option, + /// Total CC token rewards earned across all Kora campaigns + #[serde(rename = "ccRewards", skip_serializing_if = "Option::is_none")] + pub cc_rewards: Option, + /// Total Kora points earned across all Kora campaigns + #[serde(rename = "koraPoints", skip_serializing_if = "Option::is_none")] + pub kora_points: Option, +} + +impl KoraRewardsSummary { + pub fn new(user_address: String) -> KoraRewardsSummary { + KoraRewardsSummary { + user_address, + blue_rewards: None, + sui_rewards: None, + wal_rewards: None, + cc_rewards: None, + kora_points: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/kora_user_bonus_response.rs b/rust/gen/bluefin_api/src/models/kora_user_bonus_response.rs new file mode 100644 index 0000000..f1dd0c8 --- /dev/null +++ b/rust/gen/bluefin_api/src/models/kora_user_bonus_response.rs @@ -0,0 +1,44 @@ +/* + * Bluefin API + * + * Bluefin API + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct KoraUserBonusResponse { + /// User wallet address + #[serde(rename = "userAddress")] + pub user_address: String, + /// Epoch number for the bonus + #[serde(rename = "epochNumber")] + pub epoch_number: i32, + /// Total bonus points earned + #[serde(rename = "bonusPoints")] + pub bonus_points: String, + /// Total bonus CC rewards earned + #[serde(rename = "bonusCcRewards")] + pub bonus_cc_rewards: String, + /// Criteria for earning the bonus + #[serde(rename = "criteria", skip_serializing_if = "Option::is_none")] + pub criteria: Option, +} + +impl KoraUserBonusResponse { + pub fn new(user_address: String, epoch_number: i32, bonus_points: String, bonus_cc_rewards: String) -> KoraUserBonusResponse { + KoraUserBonusResponse { + user_address, + epoch_number, + bonus_points, + bonus_cc_rewards, + criteria: None, + } + } +} + diff --git a/rust/gen/bluefin_api/src/models/mod.rs b/rust/gen/bluefin_api/src/models/mod.rs index bf58f9c..9628a5e 100644 --- a/rust/gen/bluefin_api/src/models/mod.rs +++ b/rust/gen/bluefin_api/src/models/mod.rs @@ -108,6 +108,8 @@ pub mod epoch_metadata; pub use self::epoch_metadata::EpochMetadata; pub mod error; pub use self::error::Error; +pub mod error_1; +pub use self::error_1::Error1; pub mod exchange_info_response; pub use self::exchange_info_response::ExchangeInfoResponse; pub mod failed_command_type; @@ -132,6 +134,10 @@ pub mod iss_base64_details; pub use self::iss_base64_details::IssBase64Details; pub mod kline_interval; pub use self::kline_interval::KlineInterval; +pub mod kora_health_check_200_response; +pub use self::kora_health_check_200_response::KoraHealthCheck200Response; +pub mod kora_user_bonus_response; +pub use self::kora_user_bonus_response::KoraUserBonusResponse; pub mod leaderboard_entry; pub use self::leaderboard_entry::LeaderboardEntry; pub mod leaderboard_interval; diff --git a/ts/sdk/package.json b/ts/sdk/package.json index a167a44..8e18c5a 100644 --- a/ts/sdk/package.json +++ b/ts/sdk/package.json @@ -51,5 +51,5 @@ "prepare": "npm run build" }, "types": "./dist/types/index.d.ts", - "version": "1.10.0" + "version": "1.11.0" } \ No newline at end of file diff --git a/ts/sdk/src/.openapi-generator/FILES b/ts/sdk/src/.openapi-generator/FILES index 51d10d9..3160a7a 100644 --- a/ts/sdk/src/.openapi-generator/FILES +++ b/ts/sdk/src/.openapi-generator/FILES @@ -61,6 +61,7 @@ docs/EpochConfigs.md docs/EpochConfigsResponse.md docs/EpochMetadata.md docs/Error.md +docs/Error1.md docs/ExchangeApi.md docs/ExchangeInfoResponse.md docs/FailedCommandType.md @@ -74,6 +75,9 @@ docs/IntervalMetadata.md docs/IntervalRewards.md docs/IssBase64Details.md docs/KlineInterval.md +docs/KoraApi.md +docs/KoraHealthCheck200Response.md +docs/KoraUserBonusResponse.md docs/LeaderboardEntry.md docs/LeaderboardInterval.md docs/LeaderboardResponse.md diff --git a/ts/sdk/src/api.ts b/ts/sdk/src/api.ts index 300fa00..418ecf9 100644 --- a/ts/sdk/src/api.ts +++ b/ts/sdk/src/api.ts @@ -2413,6 +2413,25 @@ export const EpochMetadataStatusEnum = { export type EpochMetadataStatusEnum = typeof EpochMetadataStatusEnum[keyof typeof EpochMetadataStatusEnum]; +/** + * + * @export + * @interface Error1 + */ +export interface Error1 { + /** + * Error message + * @type {string} + * @memberof Error1 + */ + 'error'?: string; + /** + * Error code + * @type {string} + * @memberof Error1 + */ + 'code'?: string; +} /** * * @export @@ -2813,6 +2832,62 @@ export const KlineInterval = { export type KlineInterval = typeof KlineInterval[keyof typeof KlineInterval]; +/** + * + * @export + * @interface KoraHealthCheck200Response + */ +export interface KoraHealthCheck200Response { + /** + * + * @type {string} + * @memberof KoraHealthCheck200Response + */ + 'status'?: string; + /** + * + * @type {number} + * @memberof KoraHealthCheck200Response + */ + 'timestamp'?: number; +} +/** + * + * @export + * @interface KoraUserBonusResponse + */ +export interface KoraUserBonusResponse { + /** + * User wallet address + * @type {string} + * @memberof KoraUserBonusResponse + */ + 'userAddress': string; + /** + * Epoch number for the bonus + * @type {number} + * @memberof KoraUserBonusResponse + */ + 'epochNumber': number; + /** + * Total bonus points earned + * @type {string} + * @memberof KoraUserBonusResponse + */ + 'bonusPoints': string; + /** + * Total bonus CC rewards earned + * @type {string} + * @memberof KoraUserBonusResponse + */ + 'bonusCcRewards': string; + /** + * Criteria for earning the bonus + * @type {string} + * @memberof KoraUserBonusResponse + */ + 'criteria'?: string; +} /** * * @export @@ -8035,6 +8110,107 @@ export const GetLeaderboardSortByEnum = { export type GetLeaderboardSortByEnum = typeof GetLeaderboardSortByEnum[keyof typeof GetLeaderboardSortByEnum]; +/** + * KoraApi - axios parameter creator + * @export + */ +export const KoraApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns the health status of the Kora rewards service. + * @summary Kora service health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + koraHealthCheck: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/kora/health`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * KoraApi - functional programming interface + * @export + */ +export const KoraApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = KoraApiAxiosParamCreator(configuration) + return { + /** + * Returns the health status of the Kora rewards service. + * @summary Kora service health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async koraHealthCheck(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.koraHealthCheck(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['KoraApi.koraHealthCheck']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * KoraApi - factory interface + * @export + */ +export const KoraApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = KoraApiFp(configuration) + return { + /** + * Returns the health status of the Kora rewards service. + * @summary Kora service health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + koraHealthCheck(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.koraHealthCheck(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * KoraApi - object-oriented interface + * @export + * @class KoraApi + * @extends {BaseAPI} + */ +export class KoraApi extends BaseAPI { + /** + * Returns the health status of the Kora rewards service. + * @summary Kora service health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof KoraApi + */ + public koraHealthCheck(options?: RawAxiosRequestConfig) { + return KoraApiFp(this.configuration).koraHealthCheck(options).then((request) => request(this.axios, this.basePath)); + } +} + + + /** * RewardsApi - axios parameter creator * @export @@ -8577,6 +8753,43 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the bonuses earned by all users for a specific epoch number. + * @summary Get all user bonuses by epoch + * @param {number} epochNumber Specify the epoch number + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserBonuses: async (epochNumber: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'epochNumber' is not null or undefined + assertParamExists('getUserBonuses', 'epochNumber', epochNumber) + const localVarPath = `/v1/rewards/bonuses`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (epochNumber !== undefined) { + localVarQueryParameter['epochNumber'] = epochNumber; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -8979,6 +9192,19 @@ export const RewardsApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['RewardsApi.getRewardsSummary']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Returns the bonuses earned by all users for a specific epoch number. + * @summary Get all user bonuses by epoch + * @param {number} epochNumber Specify the epoch number + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserBonuses(epochNumber: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserBonuses(epochNumber, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RewardsApi.getUserBonuses']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Mark user claims as claimed for the specified campaign name and interval number * @summary /v1/rewards/claims/mark-claimed @@ -9198,6 +9424,16 @@ export const RewardsApiFactory = function (configuration?: Configuration, basePa getRewardsSummary(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.getRewardsSummary(options).then((request) => request(axios, basePath)); }, + /** + * Returns the bonuses earned by all users for a specific epoch number. + * @summary Get all user bonuses by epoch + * @param {number} epochNumber Specify the epoch number + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserBonuses(epochNumber: number, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.getUserBonuses(epochNumber, options).then((request) => request(axios, basePath)); + }, /** * Mark user claims as claimed for the specified campaign name and interval number * @summary /v1/rewards/claims/mark-claimed @@ -9428,6 +9664,18 @@ export class RewardsApi extends BaseAPI { return RewardsApiFp(this.configuration).getRewardsSummary(options).then((request) => request(this.axios, this.basePath)); } + /** + * Returns the bonuses earned by all users for a specific epoch number. + * @summary Get all user bonuses by epoch + * @param {number} epochNumber Specify the epoch number + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RewardsApi + */ + public getUserBonuses(epochNumber: number, options?: RawAxiosRequestConfig) { + return RewardsApiFp(this.configuration).getUserBonuses(epochNumber, options).then((request) => request(this.axios, this.basePath)); + } + /** * Mark user claims as claimed for the specified campaign name and interval number * @summary /v1/rewards/claims/mark-claimed diff --git a/ts/sdk/src/docs/Error1.md b/ts/sdk/src/docs/Error1.md new file mode 100644 index 0000000..21ad690 --- /dev/null +++ b/ts/sdk/src/docs/Error1.md @@ -0,0 +1,22 @@ +# Error1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **string** | Error message | [optional] [default to undefined] +**code** | **string** | Error code | [optional] [default to undefined] + +## Example + +```typescript +import { Error1 } from '@bluefin/api-client'; + +const instance: Error1 = { + error, + code, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraApi.md b/ts/sdk/src/docs/KoraApi.md new file mode 100644 index 0000000..7192aaf --- /dev/null +++ b/ts/sdk/src/docs/KoraApi.md @@ -0,0 +1,52 @@ +# KoraApi + +All URIs are relative to *https://api.sui-staging.bluefin.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**koraHealthCheck**](#korahealthcheck) | **GET** /v1/kora/health | Kora service health check| + +# **koraHealthCheck** +> KoraHealthCheck200Response koraHealthCheck() + +Returns the health status of the Kora rewards service. + +### Example + +```typescript +import { + KoraApi, + Configuration +} from '@bluefin/api-client'; + +const configuration = new Configuration(); +const apiInstance = new KoraApi(configuration); + +const { status, data } = await apiInstance.koraHealthCheck(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**KoraHealthCheck200Response** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Service is healthy | - | + +[[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) + diff --git a/ts/sdk/src/docs/KoraCampaignBonus.md b/ts/sdk/src/docs/KoraCampaignBonus.md new file mode 100644 index 0000000..bf20f12 --- /dev/null +++ b/ts/sdk/src/docs/KoraCampaignBonus.md @@ -0,0 +1,26 @@ +# KoraCampaignBonus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bonusType** | **string** | Type of bonus (e.g., VOLUME_BONUS, REFERRAL_BONUS) | [optional] [default to undefined] +**bonusCcReward** | **string** | CC reward amount for this bonus | [optional] [default to undefined] +**bonusPoints** | **string** | Points earned for this bonus | [optional] [default to undefined] +**bonusCriteria** | **string** | Criteria that was met for earning this bonus | [optional] [default to undefined] + +## Example + +```typescript +import { KoraCampaignBonus } from '@bluefin/api-client'; + +const instance: KoraCampaignBonus = { + bonusType, + bonusCcReward, + bonusPoints, + bonusCriteria, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraCampaignMetadata.md b/ts/sdk/src/docs/KoraCampaignMetadata.md new file mode 100644 index 0000000..a773a2d --- /dev/null +++ b/ts/sdk/src/docs/KoraCampaignMetadata.md @@ -0,0 +1,28 @@ +# KoraCampaignMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | | [default to undefined] +**campaignName** | **string** | Name of the campaign | [default to undefined] +**parentCampaignName** | **string** | Name of the parent campaign | [optional] [default to undefined] +**startDate** | **number** | Time in milliseconds for campaign start date | [default to undefined] +**endDate** | **number** | Time in milliseconds for campaign end date | [default to undefined] + +## Example + +```typescript +import { KoraCampaignMetadata } from '@bluefin/api-client'; + +const instance: KoraCampaignMetadata = { + status, + campaignName, + parentCampaignName, + startDate, + endDate, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraCampaignRewards.md b/ts/sdk/src/docs/KoraCampaignRewards.md new file mode 100644 index 0000000..564d7e4 --- /dev/null +++ b/ts/sdk/src/docs/KoraCampaignRewards.md @@ -0,0 +1,56 @@ +# KoraCampaignRewards + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userAddress** | **string** | User address for the rewards earned data | [default to undefined] +**campaignName** | **string** | Name of the campaign | [default to undefined] +**epochNumber** | **number** | Epoch number for the rewards earned data | [default to undefined] +**intervalNumber** | **number** | Interval number for the rewards earned data | [default to undefined] +**symbol** | **string** | Market Symbol | [optional] [default to undefined] +**status** | **string** | | [default to undefined] +**blueRewards** | **string** | Total blue token rewards | [optional] [default to undefined] +**suiRewards** | **string** | Total sui token rewards | [optional] [default to undefined] +**walRewards** | **string** | Total wal rewards | [optional] [default to undefined] +**cashRewards** | **string** | Total cash rewards | [optional] [default to undefined] +**ccRewards** | **string** | Total CC token rewards | [optional] [default to undefined] +**koraPoints** | **string** | Total Kora points earned | [optional] [default to undefined] +**userFeePaid** | **string** | Total user fee paid | [optional] [default to undefined] +**intervalStartDate** | **number** | Time in milliseconds for interval start date | [optional] [default to undefined] +**intervalEndDate** | **number** | Time in milliseconds for interval end date | [optional] [default to undefined] +**isDisbursed** | **boolean** | Indicates if rewards have been disbursed | [optional] [default to undefined] +**txnDigest** | **string** | Transaction digest of the disbursement | [optional] [default to undefined] +**claimStatus** | **string** | Status of the claim | [optional] [default to undefined] +**bonuses** | [**Array<KoraCampaignBonus>**](KoraCampaignBonus.md) | List of bonuses attached to this reward entry | [optional] [default to undefined] + +## Example + +```typescript +import { KoraCampaignRewards } from '@bluefin/api-client'; + +const instance: KoraCampaignRewards = { + userAddress, + campaignName, + epochNumber, + intervalNumber, + symbol, + status, + blueRewards, + suiRewards, + walRewards, + cashRewards, + ccRewards, + koraPoints, + userFeePaid, + intervalStartDate, + intervalEndDate, + isDisbursed, + txnDigest, + claimStatus, + bonuses, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraEpochConfig.md b/ts/sdk/src/docs/KoraEpochConfig.md new file mode 100644 index 0000000..a3851e1 --- /dev/null +++ b/ts/sdk/src/docs/KoraEpochConfig.md @@ -0,0 +1,38 @@ +# KoraEpochConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignName** | **string** | The name of the campaign | [default to undefined] +**epochDuration** | **number** | Duration of the epoch in hours | [default to undefined] +**suiRewardsAllocation** | **string** | Allocation of Sui rewards for this epoch | [optional] [default to undefined] +**blueRewardsAllocation** | **string** | Allocation of Blue rewards for this epoch | [optional] [default to undefined] +**walRewardsAllocation** | **string** | Allocation of Wal rewards for this epoch | [optional] [default to undefined] +**ccRewardsAllocation** | **string** | Allocation of CC token rewards for this epoch | [optional] [default to undefined] +**koraPointsRewardsAllocation** | **string** | Allocation of Kora points rewards for this epoch | [optional] [default to undefined] +**intervalNumber** | **number** | Interval number for the epoch | [default to undefined] +**epochNumber** | **number** | Epoch number | [default to undefined] +**config** | **{ [key: string]: any | undefined; }** | Additional campaign-specific configurations | [optional] [default to undefined] + +## Example + +```typescript +import { KoraEpochConfig } from '@bluefin/api-client'; + +const instance: KoraEpochConfig = { + campaignName, + epochDuration, + suiRewardsAllocation, + blueRewardsAllocation, + walRewardsAllocation, + ccRewardsAllocation, + koraPointsRewardsAllocation, + intervalNumber, + epochNumber, + config, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraEpochConfigResponse.md b/ts/sdk/src/docs/KoraEpochConfigResponse.md new file mode 100644 index 0000000..3533230 --- /dev/null +++ b/ts/sdk/src/docs/KoraEpochConfigResponse.md @@ -0,0 +1,24 @@ +# KoraEpochConfigResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maxIntervalNumber** | **number** | The maximum interval number available | [default to undefined] +**intervalNumber** | **number** | The current interval number being queried | [default to undefined] +**data** | [**Array<KoraEpochConfig>**](KoraEpochConfig.md) | | [default to undefined] + +## Example + +```typescript +import { KoraEpochConfigResponse } from '@bluefin/api-client'; + +const instance: KoraEpochConfigResponse = { + maxIntervalNumber, + intervalNumber, + data, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraEpochMetadata.md b/ts/sdk/src/docs/KoraEpochMetadata.md new file mode 100644 index 0000000..f2eb293 --- /dev/null +++ b/ts/sdk/src/docs/KoraEpochMetadata.md @@ -0,0 +1,30 @@ +# KoraEpochMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | | [default to undefined] +**campaignName** | **string** | Name of the campaign | [default to undefined] +**epochId** | **string** | Epoch ID | [default to undefined] +**epochNumber** | **number** | Epoch number | [default to undefined] +**startDate** | **number** | Time in milliseconds for epoch start date | [default to undefined] +**endDate** | **number** | Time in milliseconds for epoch end date | [default to undefined] + +## Example + +```typescript +import { KoraEpochMetadata } from '@bluefin/api-client'; + +const instance: KoraEpochMetadata = { + status, + campaignName, + epochId, + epochNumber, + startDate, + endDate, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraHealthCheck200Response.md b/ts/sdk/src/docs/KoraHealthCheck200Response.md new file mode 100644 index 0000000..de3de09 --- /dev/null +++ b/ts/sdk/src/docs/KoraHealthCheck200Response.md @@ -0,0 +1,22 @@ +# KoraHealthCheck200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | | [optional] [default to undefined] +**timestamp** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { KoraHealthCheck200Response } from '@bluefin/api-client'; + +const instance: KoraHealthCheck200Response = { + status, + timestamp, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraIntervalMetadata.md b/ts/sdk/src/docs/KoraIntervalMetadata.md new file mode 100644 index 0000000..be57eb4 --- /dev/null +++ b/ts/sdk/src/docs/KoraIntervalMetadata.md @@ -0,0 +1,30 @@ +# KoraIntervalMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | | [default to undefined] +**startDate** | **number** | Time in milliseconds for interval start date | [default to undefined] +**endDate** | **number** | Time in milliseconds for interval end date | [default to undefined] +**intervalId** | **number** | Interval ID | [default to undefined] +**intervalType** | **string** | Type of the interval | [optional] [default to undefined] +**protocol** | **string** | Protocol for the interval | [optional] [default to undefined] + +## Example + +```typescript +import { KoraIntervalMetadata } from '@bluefin/api-client'; + +const instance: KoraIntervalMetadata = { + status, + startDate, + endDate, + intervalId, + intervalType, + protocol, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraLeaderboardEntry.md b/ts/sdk/src/docs/KoraLeaderboardEntry.md new file mode 100644 index 0000000..91373d7 --- /dev/null +++ b/ts/sdk/src/docs/KoraLeaderboardEntry.md @@ -0,0 +1,44 @@ +# KoraLeaderboardEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rank** | **number** | Overall ranking position based on sortBy parameter | [default to undefined] +**userAddress** | **string** | Wallet address of the user | [default to undefined] +**totalVolumeE6** | **string** | Total swap volume (USD equivalent) | [default to undefined] +**totalFeeE6** | **string** | Total fees paid | [optional] [default to undefined] +**totalTransactions** | **number** | Total number of qualifying swap transactions | [default to undefined] +**ccRewards** | **string** | CC token rewards earned | [default to undefined] +**koraPoints** | **string** | Kora points earned | [default to undefined] +**totalBonusPoints** | **string** | Total bonus points earned | [optional] [default to undefined] +**totalBonusCC** | **string** | Total bonus CC tokens earned | [optional] [default to undefined] +**volumeRank** | **number** | Ranking based purely on trading volume | [optional] [default to undefined] +**transactionRank** | **number** | Ranking based purely on transaction count | [optional] [default to undefined] +**totalEarningsRank** | **number** | Ranking based on combined CC + Kora points value | [optional] [default to undefined] +**lastActivityDate** | **number** | Timestamp of user\'s most recent swap (milliseconds) | [optional] [default to undefined] + +## Example + +```typescript +import { KoraLeaderboardEntry } from '@bluefin/api-client'; + +const instance: KoraLeaderboardEntry = { + rank, + userAddress, + totalVolumeE6, + totalFeeE6, + totalTransactions, + ccRewards, + koraPoints, + totalBonusPoints, + totalBonusCC, + volumeRank, + transactionRank, + totalEarningsRank, + lastActivityDate, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraLeaderboardResponse.md b/ts/sdk/src/docs/KoraLeaderboardResponse.md new file mode 100644 index 0000000..daadf7e --- /dev/null +++ b/ts/sdk/src/docs/KoraLeaderboardResponse.md @@ -0,0 +1,26 @@ +# KoraLeaderboardResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Array<KoraLeaderboardEntry>**](KoraLeaderboardEntry.md) | | [default to undefined] +**total** | **number** | Total number of records | [default to undefined] +**limit** | **number** | Page size for pagination | [default to undefined] +**page** | **number** | Current page number | [default to undefined] + +## Example + +```typescript +import { KoraLeaderboardResponse } from '@bluefin/api-client'; + +const instance: KoraLeaderboardResponse = { + data, + total, + limit, + page, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraRewardsSummary.md b/ts/sdk/src/docs/KoraRewardsSummary.md new file mode 100644 index 0000000..bef2f41 --- /dev/null +++ b/ts/sdk/src/docs/KoraRewardsSummary.md @@ -0,0 +1,30 @@ +# KoraRewardsSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userAddress** | **string** | User address for the rewards earned data | [default to undefined] +**blueRewards** | **string** | Total Blue token rewards earned | [optional] [default to undefined] +**suiRewards** | **string** | Total Sui token rewards earned | [optional] [default to undefined] +**walRewards** | **string** | Total wal rewards earned | [optional] [default to undefined] +**ccRewards** | **string** | Total CC token rewards earned across all Kora campaigns | [optional] [default to undefined] +**koraPoints** | **string** | Total Kora points earned across all Kora campaigns | [optional] [default to undefined] + +## Example + +```typescript +import { KoraRewardsSummary } from '@bluefin/api-client'; + +const instance: KoraRewardsSummary = { + userAddress, + blueRewards, + suiRewards, + walRewards, + ccRewards, + koraPoints, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/KoraUserBonusResponse.md b/ts/sdk/src/docs/KoraUserBonusResponse.md new file mode 100644 index 0000000..c3a5f40 --- /dev/null +++ b/ts/sdk/src/docs/KoraUserBonusResponse.md @@ -0,0 +1,28 @@ +# KoraUserBonusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userAddress** | **string** | User wallet address | [default to undefined] +**epochNumber** | **number** | Epoch number for the bonus | [default to undefined] +**bonusPoints** | **string** | Total bonus points earned | [default to undefined] +**bonusCcRewards** | **string** | Total bonus CC rewards earned | [default to undefined] +**criteria** | **string** | Criteria for earning the bonus | [optional] [default to undefined] + +## Example + +```typescript +import { KoraUserBonusResponse } from '@bluefin/api-client'; + +const instance: KoraUserBonusResponse = { + userAddress, + epochNumber, + bonusPoints, + bonusCcRewards, + criteria, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/ts/sdk/src/docs/RewardsApi.md b/ts/sdk/src/docs/RewardsApi.md index 9091b08..0097dea 100644 --- a/ts/sdk/src/docs/RewardsApi.md +++ b/ts/sdk/src/docs/RewardsApi.md @@ -17,6 +17,7 @@ All URIs are relative to *https://api.sui-staging.bluefin.io* |[**getRewardsEpochMetadata**](#getrewardsepochmetadata) | **GET** /v1/rewards/metadata/epoch | /rewards/metadata/epoch| |[**getRewardsIntervalMetadata**](#getrewardsintervalmetadata) | **GET** /v1/rewards/metadata/interval | /rewards/metadata/interval| |[**getRewardsSummary**](#getrewardssummary) | **GET** /v1/rewards/summary | /rewards/summary| +|[**getUserBonuses**](#getuserbonuses) | **GET** /v1/rewards/bonuses | Get all user bonuses by epoch| |[**markAsClaimed**](#markasclaimed) | **POST** /v1/rewards/claims/mark-claimed | /v1/rewards/claims/mark-claimed| |[**onboardAffiliate**](#onboardaffiliate) | **POST** /v1/rewards/affiliate/onboard | /rewards/affiliate/onboard| |[**onboardReferee**](#onboardreferee) | **POST** /v1/rewards/affiliate/onboard/referee | /rewards/affiliate/onboard/referee| @@ -737,6 +738,58 @@ This endpoint does not have any parameters. [[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) +# **getUserBonuses** +> Array getUserBonuses() + +Returns the bonuses earned by all users for a specific epoch number. + +### Example + +```typescript +import { + RewardsApi, + Configuration +} from '@bluefin/api-client'; + +const configuration = new Configuration(); +const apiInstance = new RewardsApi(configuration); + +let epochNumber: number; //Specify the epoch number (default to undefined) + +const { status, data } = await apiInstance.getUserBonuses( + epochNumber +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **epochNumber** | [**number**] | Specify the epoch number | defaults to undefined| + + +### Return type + +**Array** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful response | - | +|**400** | Missing required parameters | - | + +[[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) + # **markAsClaimed** > MarkAsClaimedResponse markAsClaimed(markAsClaimedRequest)