Compare commits

...

5 Commits

Author SHA1 Message Date
AuHau
7fd5545959 Version bump 2025-05-22 06:52:43 +00:00
Adam Uhlíř
ed88a74c73
fix: update openapi generator (#6) 2025-05-22 08:41:00 +02:00
github-actions[bot]
00a3c7a086
Generated API update (#7)
Co-authored-by: codex-storage-bot <154258435+codex-storage-bot@users.noreply.github.com>
2025-05-22 08:35:56 +02:00
Adam Uhlíř
9e0759658a
ci: cleanup generate yaml (#5) 2025-04-23 11:19:37 +02:00
AuHau
60aaa4696a Version bump 2025-04-23 09:00:38 +00:00
18 changed files with 395 additions and 28 deletions

View File

@ -6,7 +6,7 @@ permissions:
on: on:
repository_dispatch: repository_dispatch:
types: [generate, release] types: [generate]
workflow_dispatch: workflow_dispatch:
inputs: inputs:
openapi_url: openapi_url:
@ -25,10 +25,6 @@ jobs:
echo "Error: 'openapi_url' is missing in client_payload." echo "Error: 'openapi_url' is missing in client_payload."
exit 1 exit 1
fi fi
if [ "${{ github.event.action }}" == "release" ] && [ -z "${{ github.event.client_payload.version }}" ]; then
echo "Error: We are supposed to release, but 'version' is missing in client_payload."
exit 1
fi
echo "OPENAPI_URL=${{ github.event.client_payload.openapi_url }}" >> $GITHUB_ENV echo "OPENAPI_URL=${{ github.event.client_payload.openapi_url }}" >> $GITHUB_ENV
else else

View File

@ -1 +1 @@
7.10.0 7.12.0

View File

@ -4,8 +4,8 @@ List of endpoints and interfaces available to Codex API users
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 0.0.1 - API version: 0.0.1
- Package version: 0.2.2 - Package version: 0.4.0
- Generator version: 7.10.0 - Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen - Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements. ## Requirements.
@ -45,15 +45,13 @@ configuration = codex_api_client.Configuration(
with codex_api_client.ApiClient(configuration) as api_client: with codex_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class # Create an instance of the API class
api_instance = codex_api_client.DataApi(api_client) api_instance = codex_api_client.DataApi(api_client)
cid = 'cid_example' # str | File to be downloaded. cid = 'cid_example' # str | Block or dataset to be deleted.
try: try:
# Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned. # Deletes either a single block or an entire dataset from the local node.
api_response = api_instance.download_local(cid) api_instance.delete_local(cid)
print("The response of DataApi->download_local:\n")
pprint(api_response)
except ApiException as e: except ApiException as e:
print("Exception when calling DataApi->download_local: %s\n" % e) print("Exception when calling DataApi->delete_local: %s\n" % e)
``` ```
@ -63,6 +61,7 @@ All URIs are relative to *http://localhost:8080/api/codex/v1*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*DataApi* | [**delete_local**](docs/DataApi.md#delete_local) | **DELETE** /data/{cid} | Deletes either a single block or an entire dataset from the local node.
*DataApi* | [**download_local**](docs/DataApi.md#download_local) | **GET** /data/{cid} | Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned. *DataApi* | [**download_local**](docs/DataApi.md#download_local) | **GET** /data/{cid} | Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned.
*DataApi* | [**download_network**](docs/DataApi.md#download_network) | **POST** /data/{cid}/network | Download a file from the network to the local node if it&#39;s not available locally. Note: Download is performed async. Call can return before download is completed. *DataApi* | [**download_network**](docs/DataApi.md#download_network) | **POST** /data/{cid}/network | Download a file from the network to the local node if it&#39;s not available locally. Note: Download is performed async. Call can return before download is completed.
*DataApi* | [**download_network_manifest**](docs/DataApi.md#download_network_manifest) | **GET** /data/{cid}/network/manifest | Download only the dataset manifest from the network to the local node if it&#39;s not available locally. *DataApi* | [**download_network_manifest**](docs/DataApi.md#download_network_manifest) | **GET** /data/{cid}/network/manifest | Download only the dataset manifest from the network to the local node if it&#39;s not available locally.

View File

@ -205,6 +205,7 @@ components:
required: required:
- id - id
- totalRemainingCollateral - totalRemainingCollateral
- freeSize
allOf: allOf:
- $ref: "#/components/schemas/SalesAvailability" - $ref: "#/components/schemas/SalesAvailability"
- type: object - type: object
@ -627,6 +628,26 @@ paths:
"500": "500":
description: Well it was bad-bad description: Well it was bad-bad
delete:
summary: "Deletes either a single block or an entire dataset from the local node."
tags: [Data]
operationId: deleteLocal
parameters:
- in: path
name: cid
required: true
schema:
$ref: "#/components/schemas/Cid"
description: Block or dataset to be deleted.
responses:
"204":
description: Data was successfully deleted.
"400":
description: Invalid CID is specified
"500":
description: There was an error during deletion
"/data/{cid}/network": "/data/{cid}/network":
post: post:
summary: "Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed." summary: "Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed."

View File

@ -14,7 +14,7 @@
""" # noqa: E501 """ # noqa: E501
__version__ = "0.2.2" __version__ = "0.4.0"
# import apis into sdk package # import apis into sdk package
from codex_api_client.api.data_api import DataApi from codex_api_client.api.data_api import DataApi

View File

@ -41,6 +41,262 @@ class DataApi:
self.api_client = api_client self.api_client = api_client
@validate_call
def delete_local(
self,
cid: Annotated[StrictStr, Field(description="Block or dataset to be deleted.")],
_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,
) -> None:
"""Deletes either a single block or an entire dataset from the local node.
:param cid: Block or dataset to be deleted. (required)
:type cid: str
: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._delete_local_serialize(
cid=cid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
'400': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def delete_local_with_http_info(
self,
cid: Annotated[StrictStr, Field(description="Block or dataset to be deleted.")],
_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[None]:
"""Deletes either a single block or an entire dataset from the local node.
:param cid: Block or dataset to be deleted. (required)
:type cid: str
: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._delete_local_serialize(
cid=cid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
'400': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def delete_local_without_preload_content(
self,
cid: Annotated[StrictStr, Field(description="Block or dataset to be deleted.")],
_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:
"""Deletes either a single block or an entire dataset from the local node.
:param cid: Block or dataset to be deleted. (required)
:type cid: str
: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._delete_local_serialize(
cid=cid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
'400': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _delete_local_serialize(
self,
cid,
_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
if cid is not None:
_path_params['cid'] = cid
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
]
return self.api_client.param_serialize(
method='DELETE',
resource_path='/data/{cid}',
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 @validate_call
def download_local( def download_local(
self, self,

View File

@ -517,7 +517,7 @@ class ApiClient:
if k in collection_formats: if k in collection_formats:
collection_format = collection_formats[k] collection_format = collection_formats[k]
if collection_format == 'multi': if collection_format == 'multi':
new_params.extend((k, str(value)) for value in v) new_params.extend((k, quote(str(value))) for value in v)
else: else:
if collection_format == 'ssv': if collection_format == 'ssv':
delimiter = ' ' delimiter = ' '

View File

@ -18,7 +18,7 @@ import logging
from logging import FileHandler from logging import FileHandler
import multiprocessing import multiprocessing
import sys import sys
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
from typing_extensions import NotRequired, Self from typing_extensions import NotRequired, Self
import urllib3 import urllib3
@ -160,6 +160,8 @@ class Configuration:
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
in PEM format. in PEM format.
:param retries: Number of retries for API requests. :param retries: Number of retries for API requests.
:param ca_cert_data: verify the peer using concatenated CA certificate data
in PEM (str) or DER (bytes) format.
""" """
@ -173,13 +175,14 @@ class Configuration:
username: Optional[str]=None, username: Optional[str]=None,
password: Optional[str]=None, password: Optional[str]=None,
access_token: Optional[str]=None, access_token: Optional[str]=None,
server_index: Optional[int]=None, server_index: Optional[int]=None,
server_variables: Optional[ServerVariablesT]=None, server_variables: Optional[ServerVariablesT]=None,
server_operation_index: Optional[Dict[int, int]]=None, server_operation_index: Optional[Dict[int, int]]=None,
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
ignore_operation_servers: bool=False, ignore_operation_servers: bool=False,
ssl_ca_cert: Optional[str]=None, ssl_ca_cert: Optional[str]=None,
retries: Optional[int] = None, retries: Optional[int] = None,
ca_cert_data: Optional[Union[str, bytes]] = None,
*, *,
debug: Optional[bool] = None, debug: Optional[bool] = None,
) -> None: ) -> None:
@ -257,6 +260,10 @@ class Configuration:
self.ssl_ca_cert = ssl_ca_cert self.ssl_ca_cert = ssl_ca_cert
"""Set this to customize the certificate file to verify the peer. """Set this to customize the certificate file to verify the peer.
""" """
self.ca_cert_data = ca_cert_data
"""Set this to verify the peer using PEM (str) or DER (bytes)
certificate data.
"""
self.cert_file = None self.cert_file = None
"""client certificate file """client certificate file
""" """
@ -494,7 +501,7 @@ class Configuration:
"OS: {env}\n"\ "OS: {env}\n"\
"Python Version: {pyversion}\n"\ "Python Version: {pyversion}\n"\
"Version of the API: 0.0.1\n"\ "Version of the API: 0.0.1\n"\
"SDK Package Version: 0.2.2".\ "SDK Package Version: 0.4.0".\
format(env=sys.platform, pyversion=sys.version) format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self) -> List[HostSetting]: def get_host_settings(self) -> List[HostSetting]:

View File

@ -150,6 +150,13 @@ class ApiException(OpenApiException):
if http_resp.status == 404: if http_resp.status == 404:
raise NotFoundException(http_resp=http_resp, body=body, data=data) raise NotFoundException(http_resp=http_resp, body=body, data=data)
# Added new conditions for 409 and 422
if http_resp.status == 409:
raise ConflictException(http_resp=http_resp, body=body, data=data)
if http_resp.status == 422:
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
if 500 <= http_resp.status <= 599: if 500 <= http_resp.status <= 599:
raise ServiceException(http_resp=http_resp, body=body, data=data) raise ServiceException(http_resp=http_resp, body=body, data=data)
raise ApiException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data)
@ -188,6 +195,16 @@ class ServiceException(ApiException):
pass pass
class ConflictException(ApiException):
"""Exception for HTTP 409 Conflict."""
pass
class UnprocessableEntityException(ApiException):
"""Exception for HTTP 422 Unprocessable Entity."""
pass
def render_path(path_to_item): def render_path(path_to_item):
"""Returns a string representation of a path""" """Returns a string representation of a path"""
result = "" result = ""

View File

@ -34,7 +34,7 @@ class SalesAvailabilityREAD(BaseModel):
enabled: Optional[StrictBool] = Field(default=True, description="Enable the ability to receive sales on this availability.") enabled: Optional[StrictBool] = Field(default=True, description="Enable the ability to receive sales on this availability.")
until: Optional[StrictInt] = Field(default=0, description="Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions.") until: Optional[StrictInt] = Field(default=0, description="Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions.")
id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.") id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.")
free_size: Optional[StrictInt] = Field(default=None, description="Unused size of availability's storage in bytes as decimal string", alias="freeSize") free_size: StrictInt = Field(description="Unused size of availability's storage in bytes as decimal string", alias="freeSize")
total_remaining_collateral: StrictStr = Field(description="Total collateral effective (in amount of tokens) that can be used for matching requests", alias="totalRemainingCollateral") total_remaining_collateral: StrictStr = Field(description="Total collateral effective (in amount of tokens) that can be used for matching requests", alias="totalRemainingCollateral")
__properties: ClassVar[List[str]] = ["totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "enabled", "until", "id", "freeSize", "totalRemainingCollateral"] __properties: ClassVar[List[str]] = ["totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "enabled", "until", "id", "freeSize", "totalRemainingCollateral"]

View File

@ -76,6 +76,7 @@ class RESTClientObject:
"ca_certs": configuration.ssl_ca_cert, "ca_certs": configuration.ssl_ca_cert,
"cert_file": configuration.cert_file, "cert_file": configuration.cert_file,
"key_file": configuration.key_file, "key_file": configuration.key_file,
"ca_cert_data": configuration.ca_cert_data,
} }
if configuration.assert_hostname is not None: if configuration.assert_hostname is not None:
pool_args['assert_hostname'] = ( pool_args['assert_hostname'] = (

View File

@ -4,6 +4,7 @@ All URIs are relative to *http://localhost:8080/api/codex/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**delete_local**](DataApi.md#delete_local) | **DELETE** /data/{cid} | Deletes either a single block or an entire dataset from the local node.
[**download_local**](DataApi.md#download_local) | **GET** /data/{cid} | Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned. [**download_local**](DataApi.md#download_local) | **GET** /data/{cid} | Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned.
[**download_network**](DataApi.md#download_network) | **POST** /data/{cid}/network | Download a file from the network to the local node if it&#39;s not available locally. Note: Download is performed async. Call can return before download is completed. [**download_network**](DataApi.md#download_network) | **POST** /data/{cid}/network | Download a file from the network to the local node if it&#39;s not available locally. Note: Download is performed async. Call can return before download is completed.
[**download_network_manifest**](DataApi.md#download_network_manifest) | **GET** /data/{cid}/network/manifest | Download only the dataset manifest from the network to the local node if it&#39;s not available locally. [**download_network_manifest**](DataApi.md#download_network_manifest) | **GET** /data/{cid}/network/manifest | Download only the dataset manifest from the network to the local node if it&#39;s not available locally.
@ -13,6 +14,71 @@ Method | HTTP request | Description
[**upload**](DataApi.md#upload) | **POST** /data | Upload a file in a streaming manner. Once finished, the file is stored in the node and can be retrieved by any node in the network using the returned CID. [**upload**](DataApi.md#upload) | **POST** /data | Upload a file in a streaming manner. Once finished, the file is stored in the node and can be retrieved by any node in the network using the returned CID.
# **delete_local**
> delete_local(cid)
Deletes either a single block or an entire dataset from the local node.
### Example
```python
import codex_api_client
from codex_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080/api/codex/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = codex_api_client.Configuration(
host = "http://localhost:8080/api/codex/v1"
)
# Enter a context with an instance of the API client
with codex_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = codex_api_client.DataApi(api_client)
cid = 'cid_example' # str | Block or dataset to be deleted.
try:
# Deletes either a single block or an entire dataset from the local node.
api_instance.delete_local(cid)
except Exception as e:
print("Exception when calling DataApi->delete_local: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cid** | **str**| Block or dataset to be deleted. |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | Data was successfully deleted. | - |
**400** | Invalid CID is specified | - |
**500** | There was an error during deletion | - |
[[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)
# **download_local** # **download_local**
> bytearray download_local(cid) > bytearray download_local(cid)

View File

@ -562,7 +562,9 @@ No authorization required
Updates availability Updates availability
The new parameters will be only considered for new requests. Existing Requests linked to this Availability will continue as is. The new parameters will be only considered for new requests.
Existing Requests linked to this Availability will continue as is.
### Example ### Example

View File

@ -14,7 +14,9 @@ Method | HTTP request | Description
Connect to a peer Connect to a peer
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used to invoke peer discovery, if it succeeds the returned addresses will be used to dial. If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used
to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
### Example ### Example

View File

@ -12,7 +12,7 @@ Name | Type | Description | Notes
**enabled** | **bool** | Enable the ability to receive sales on this availability. | [optional] [default to True] **enabled** | **bool** | Enable the ability to receive sales on this availability. | [optional] [default to True]
**until** | **int** | Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions. | [optional] [default to 0] **until** | **int** | Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions. | [optional] [default to 0]
**id** | **str** | 32bits identifier encoded in hex-decimal string. | **id** | **str** | 32bits identifier encoded in hex-decimal string. |
**free_size** | **int** | Unused size of availability&#39;s storage in bytes as decimal string | [optional] [readonly] **free_size** | **int** | Unused size of availability&#39;s storage in bytes as decimal string | [readonly]
**total_remaining_collateral** | **str** | Total collateral effective (in amount of tokens) that can be used for matching requests | [readonly] **total_remaining_collateral** | **str** | Total collateral effective (in amount of tokens) that can be used for matching requests | [readonly]
## Example ## Example

View File

@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2, "spaces": 2,
"generator-cli": { "generator-cli": {
"version": "7.10.0" "version": "7.12.0"
} }
} }

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "codex_api_client" name = "codex_api_client"
version = "0.2.2" version = "0.4.0"
description = "Codex API" description = "Codex API"
authors = ["OpenAPI Generator Community <team@openapitools.org>"] authors = ["OpenAPI Generator Community <team@openapitools.org>"]
license = "NoLicense" license = "NoLicense"
@ -12,7 +12,7 @@ include = ["codex_api_client/py.typed"]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.8" python = "^3.8"
urllib3 = ">= 1.25.3 < 3.0.0" urllib3 = ">= 1.25.3, < 3.0.0"
python-dateutil = ">= 2.8.2" python-dateutil = ">= 2.8.2"
pydantic = ">= 2" pydantic = ">= 2"
typing-extensions = ">= 4.7.1" typing-extensions = ">= 4.7.1"

View File

@ -21,7 +21,7 @@ from setuptools import setup, find_packages # noqa: H301
# prerequisite: setuptools # prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools # http://pypi.python.org/pypi/setuptools
NAME = "codex-api-client" NAME = "codex-api-client"
VERSION = "0.2.2" VERSION = "0.4.0"
PYTHON_REQUIRES = ">= 3.8" PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [ REQUIRES = [
"urllib3 >= 1.25.3, < 3.0.0", "urllib3 >= 1.25.3, < 3.0.0",
@ -46,4 +46,4 @@ setup(
List of endpoints and interfaces available to Codex API users List of endpoints and interfaces available to Codex API users
""", # noqa: E501 """, # noqa: E501
package_data={"codex_api_client": ["py.typed"]}, package_data={"codex_api_client": ["py.typed"]},
) )