Generated API update

This commit is contained in:
codex-storage-bot 2025-04-23 08:53:13 +00:00 committed by github-actions[bot]
parent bd67201dac
commit 1b3c944edc
47 changed files with 339 additions and 217 deletions

View File

@ -23,7 +23,6 @@ codex_api_client/models/peers_table.py
codex_api_client/models/purchase.py codex_api_client/models/purchase.py
codex_api_client/models/reservation.py codex_api_client/models/reservation.py
codex_api_client/models/sales_availability.py codex_api_client/models/sales_availability.py
codex_api_client/models/sales_availability_create.py
codex_api_client/models/sales_availability_read.py codex_api_client/models/sales_availability_read.py
codex_api_client/models/slot.py codex_api_client/models/slot.py
codex_api_client/models/slot_agent.py codex_api_client/models/slot_agent.py
@ -51,7 +50,6 @@ docs/Purchase.md
docs/Reservation.md docs/Reservation.md
docs/SPRRead.md docs/SPRRead.md
docs/SalesAvailability.md docs/SalesAvailability.md
docs/SalesAvailabilityCREATE.md
docs/SalesAvailabilityREAD.md docs/SalesAvailabilityREAD.md
docs/Slot.md docs/Slot.md
docs/SlotAgent.md docs/SlotAgent.md

View File

@ -101,7 +101,6 @@ Class | Method | HTTP request | Description
- [Reservation](docs/Reservation.md) - [Reservation](docs/Reservation.md)
- [SPRRead](docs/SPRRead.md) - [SPRRead](docs/SPRRead.md)
- [SalesAvailability](docs/SalesAvailability.md) - [SalesAvailability](docs/SalesAvailability.md)
- [SalesAvailabilityCREATE](docs/SalesAvailabilityCREATE.md)
- [SalesAvailabilityREAD](docs/SalesAvailabilityREAD.md) - [SalesAvailabilityREAD](docs/SalesAvailabilityREAD.md)
- [Slot](docs/Slot.md) - [Slot](docs/Slot.md)
- [SlotAgent](docs/SlotAgent.md) - [SlotAgent](docs/SlotAgent.md)

View File

@ -50,6 +50,10 @@ components:
type: string type: string
description: The amount of tokens paid per byte per second per slot to hosts the client is willing to pay description: The amount of tokens paid per byte per second per slot to hosts the client is willing to pay
CollateralPerByte:
type: string
description: Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots
Duration: Duration:
type: integer type: integer
format: int64 format: int64
@ -70,6 +74,8 @@ components:
SPRRead: SPRRead:
type: object type: object
required:
- spr
properties: properties:
spr: spr:
$ref: "#/components/schemas/SPR" $ref: "#/components/schemas/SPR"
@ -82,6 +88,8 @@ components:
Content: Content:
type: object type: object
required:
- cid
description: Parameters specifying the content description: Parameters specifying the content
properties: properties:
cid: cid:
@ -89,6 +97,12 @@ components:
Node: Node:
type: object type: object
required:
- nodeId
- peerId
- record
- address
- seen
properties: properties:
nodeId: nodeId:
type: string type: string
@ -110,9 +124,15 @@ components:
revision: revision:
type: string type: string
example: 0c647d8 example: 0c647d8
contracts:
type: string
example: 0b537c7
PeersTable: PeersTable:
type: object type: object
required:
- localNode
- nodes
properties: properties:
localNode: localNode:
$ref: "#/components/schemas/Node" $ref: "#/components/schemas/Node"
@ -123,6 +143,14 @@ components:
DebugInfo: DebugInfo:
type: object type: object
required:
- id
- addrs
- repo
- spr
- announceAddresses
- table
- codex
properties: properties:
id: id:
$ref: "#/components/schemas/PeerId" $ref: "#/components/schemas/PeerId"
@ -146,9 +174,12 @@ components:
SalesAvailability: SalesAvailability:
type: object type: object
required:
- totalSize
- duration
- minPricePerBytePerSecond
- totalCollateral
properties: properties:
id:
$ref: "#/components/schemas/Id"
totalSize: totalSize:
type: integer type: integer
format: int64 format: int64
@ -161,28 +192,42 @@ components:
totalCollateral: totalCollateral:
type: string type: string
description: Total collateral (in amount of tokens) that can be used for matching requests description: Total collateral (in amount of tokens) that can be used for matching requests
enabled:
type: boolean
description: Enable the ability to receive sales on this availability.
default: true
until:
type: integer
description: Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions.
default: 0
SalesAvailabilityREAD: SalesAvailabilityREAD:
required:
- id
- totalRemainingCollateral
allOf: allOf:
- $ref: "#/components/schemas/SalesAvailability" - $ref: "#/components/schemas/SalesAvailability"
- type: object - type: object
properties: properties:
id:
$ref: "#/components/schemas/Id"
readonly: true
freeSize: freeSize:
type: integer type: integer
format: int64 format: int64
description: Unused size of availability's storage in bytes description: Unused size of availability's storage in bytes as decimal string
readOnly: true
SalesAvailabilityCREATE: totalRemainingCollateral:
allOf: type: string
- $ref: "#/components/schemas/SalesAvailability" description: Total collateral effective (in amount of tokens) that can be used for matching requests
- required: readOnly: true
- totalSize
- minPricePerBytePerSecond
- totalCollateral
- duration
Slot: Slot:
type: object type: object
required:
- id
- request
- slotIndex
properties: properties:
id: id:
$ref: "#/components/schemas/SlotId" $ref: "#/components/schemas/SlotId"
@ -195,9 +240,11 @@ components:
SlotAgent: SlotAgent:
type: object type: object
required:
- state
- requestId
- slotIndex
properties: properties:
id:
$ref: "#/components/schemas/SlotId"
slotIndex: slotIndex:
type: integer type: integer
format: int64 format: int64
@ -228,6 +275,13 @@ components:
Reservation: Reservation:
type: object type: object
required:
- id
- availabilityId
- size
- requestId
- slotIndex
- validUntil
properties: properties:
id: id:
$ref: "#/components/schemas/Id" $ref: "#/components/schemas/Id"
@ -243,6 +297,9 @@ components:
type: integer type: integer
format: int64 format: int64
description: Slot Index number description: Slot Index number
validUntil:
type: integer
description: Timestamp after which the reservation will no longer be valid.
StorageRequestCreation: StorageRequestCreation:
type: object type: object
@ -270,8 +327,7 @@ components:
default: 1 default: 1
minimum: 1 minimum: 1
collateralPerByte: collateralPerByte:
type: string $ref: "#/components/schemas/CollateralPerByte"
description: Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots
expiry: expiry:
type: integer type: integer
format: int64 format: int64
@ -279,7 +335,13 @@ components:
StorageAsk: StorageAsk:
type: object type: object
required: required:
- slots
- slotSize
- duration
- proofProbability
- pricePerBytePerSecond - pricePerBytePerSecond
- collateralPerByte
- maxSlotLoss
properties: properties:
slots: slots:
description: Number of slots (eq. hosts) that the Request want to have the content spread over description: Number of slots (eq. hosts) that the Request want to have the content spread over
@ -288,13 +350,15 @@ components:
slotSize: slotSize:
type: integer type: integer
format: int64 format: int64
description: Amount of storage per slot (in bytes) as decimal string description: Amount of storage per slot in bytes
duration: duration:
$ref: "#/components/schemas/Duration" $ref: "#/components/schemas/Duration"
proofProbability: proofProbability:
$ref: "#/components/schemas/ProofProbability" $ref: "#/components/schemas/ProofProbability"
pricePerBytePerSecond: pricePerBytePerSecond:
$ref: "#/components/schemas/PricePerBytePerSecond" $ref: "#/components/schemas/PricePerBytePerSecond"
collateralPerByte:
$ref: "#/components/schemas/CollateralPerByte"
maxSlotLoss: maxSlotLoss:
type: integer type: integer
format: int64 format: int64
@ -302,6 +366,13 @@ components:
StorageRequest: StorageRequest:
type: object type: object
required:
- id
- client
- ask
- content
- expiry
- nonce
properties: properties:
id: id:
type: string type: string
@ -320,13 +391,16 @@ components:
Purchase: Purchase:
type: object type: object
required:
- state
- requestId
properties: properties:
state: state:
type: string type: string
description: Description of the Request's state description: Description of the Request's state
enum: enum:
- cancelled - cancelled
- error - errored
- failed - failed
- finished - finished
- pending - pending
@ -335,12 +409,17 @@ components:
- unknown - unknown
error: error:
type: string type: string
nullable: true
description: If Request failed, then here is presented the error message description: If Request failed, then here is presented the error message
request: request:
$ref: "#/components/schemas/StorageRequest" $ref: "#/components/schemas/StorageRequest"
requestId:
$ref: "#/components/schemas/Id"
DataList: DataList:
type: object type: object
required:
- content
properties: properties:
content: content:
type: array type: array
@ -349,6 +428,9 @@ components:
DataItem: DataItem:
type: object type: object
required:
- cid
- manifest
properties: properties:
cid: cid:
$ref: "#/components/schemas/Cid" $ref: "#/components/schemas/Cid"
@ -357,6 +439,11 @@ components:
ManifestItem: ManifestItem:
type: object type: object
required:
- treeCid
- datasetSize
- blockSize
- protected
properties: properties:
treeCid: treeCid:
$ref: "#/components/schemas/Cid" $ref: "#/components/schemas/Cid"
@ -384,6 +471,11 @@ components:
Space: Space:
type: object type: object
required:
- totalBlocks
- quotaMaxBytes
- quotaUsedBytes
- quotaReservedBytes
properties: properties:
totalBlocks: totalBlocks:
description: "Number of blocks stored by the node" description: "Number of blocks stored by the node"
@ -502,6 +594,8 @@ paths:
text/plain: text/plain:
schema: schema:
type: string type: string
"422":
description: The mimetype of the filename is invalid
"500": "500":
description: Well it was bad-bad and the upload did not work out description: Well it was bad-bad and the upload did not work out
@ -702,7 +796,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/SalesAvailabilityCREATE" $ref: "#/components/schemas/SalesAvailability"
responses: responses:
"201": "201":
description: Created storage availability description: Created storage availability
@ -713,7 +807,7 @@ paths:
"400": "400":
description: Invalid data input description: Invalid data input
"422": "422":
description: Not enough node's storage quota available description: Not enough node's storage quota available or the provided parameters did not pass validation
"500": "500":
description: Error reserving availability description: Error reserving availability
"503": "503":
@ -746,7 +840,7 @@ paths:
"404": "404":
description: Availability not found description: Availability not found
"422": "422":
description: Not enough node's storage quota available description: The provided parameters did not pass validation
"500": "500":
description: Error reserving availability description: Error reserving availability
"503": "503":
@ -809,6 +903,8 @@ paths:
type: string type: string
"400": "400":
description: Invalid or missing Request ID description: Invalid or missing Request ID
"422":
description: The storage request parameters are not valid
"404": "404":
description: Request ID not found description: Request ID not found
"503": "503":
@ -866,7 +962,7 @@ paths:
"200": "200":
description: Node's SPR description: Node's SPR
content: content:
plain/text: text/plain:
schema: schema:
$ref: "#/components/schemas/SPR" $ref: "#/components/schemas/SPR"
application/json: application/json:
@ -884,7 +980,7 @@ paths:
"200": "200":
description: Node's Peer ID description: Node's Peer ID
content: content:
plain/text: text/plain:
schema: schema:
$ref: "#/components/schemas/PeerId" $ref: "#/components/schemas/PeerId"
application/json: application/json:

View File

@ -47,7 +47,6 @@ from codex_api_client.models.purchase import Purchase
from codex_api_client.models.reservation import Reservation from codex_api_client.models.reservation import Reservation
from codex_api_client.models.spr_read import SPRRead from codex_api_client.models.spr_read import SPRRead
from codex_api_client.models.sales_availability import SalesAvailability from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.models.slot import Slot from codex_api_client.models.slot import Slot
from codex_api_client.models.slot_agent import SlotAgent from codex_api_client.models.slot_agent import SlotAgent

View File

@ -1666,6 +1666,7 @@ class DataApi:
_response_types_map: Dict[str, Optional[str]] = { _response_types_map: Dict[str, Optional[str]] = {
'200': "str", '200': "str",
'422': None,
'500': None, '500': None,
} }
response_data = self.api_client.call_api( response_data = self.api_client.call_api(
@ -1741,6 +1742,7 @@ class DataApi:
_response_types_map: Dict[str, Optional[str]] = { _response_types_map: Dict[str, Optional[str]] = {
'200': "str", '200': "str",
'422': None,
'500': None, '500': None,
} }
response_data = self.api_client.call_api( response_data = self.api_client.call_api(
@ -1816,6 +1818,7 @@ class DataApi:
_response_types_map: Dict[str, Optional[str]] = { _response_types_map: Dict[str, Optional[str]] = {
'200': "str", '200': "str",
'422': None,
'500': None, '500': None,
} }
response_data = self.api_client.call_api( response_data = self.api_client.call_api(

View File

@ -22,7 +22,6 @@ from typing_extensions import Annotated
from codex_api_client.models.purchase import Purchase from codex_api_client.models.purchase import Purchase
from codex_api_client.models.reservation import Reservation from codex_api_client.models.reservation import Reservation
from codex_api_client.models.sales_availability import SalesAvailability from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.models.slot import Slot from codex_api_client.models.slot import Slot
from codex_api_client.models.slot_agent import SlotAgent from codex_api_client.models.slot_agent import SlotAgent
@ -105,6 +104,7 @@ class MarketplaceApi:
_response_types_map: Dict[str, Optional[str]] = { _response_types_map: Dict[str, Optional[str]] = {
'200': "str", '200': "str",
'400': None, '400': None,
'422': None,
'404': None, '404': None,
'503': None, '503': None,
} }
@ -178,6 +178,7 @@ class MarketplaceApi:
_response_types_map: Dict[str, Optional[str]] = { _response_types_map: Dict[str, Optional[str]] = {
'200': "str", '200': "str",
'400': None, '400': None,
'422': None,
'404': None, '404': None,
'503': None, '503': None,
} }
@ -251,6 +252,7 @@ class MarketplaceApi:
_response_types_map: Dict[str, Optional[str]] = { _response_types_map: Dict[str, Optional[str]] = {
'200': "str", '200': "str",
'400': None, '400': None,
'422': None,
'404': None, '404': None,
'503': None, '503': None,
} }
@ -1885,7 +1887,7 @@ class MarketplaceApi:
@validate_call @validate_call
def offer_storage( def offer_storage(
self, self,
sales_availability_create: Optional[SalesAvailabilityCREATE] = None, sales_availability: Optional[SalesAvailability] = None,
_request_timeout: Union[ _request_timeout: Union[
None, None,
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)],
@ -1902,8 +1904,8 @@ class MarketplaceApi:
"""Offers storage for sale """Offers storage for sale
:param sales_availability_create: :param sales_availability:
:type sales_availability_create: SalesAvailabilityCREATE :type sales_availability: SalesAvailability
:param _request_timeout: timeout setting for this request. If one :param _request_timeout: timeout setting for this request. If one
number provided, it will be total request number provided, it will be total request
timeout. It can also be a pair (tuple) of timeout. It can also be a pair (tuple) of
@ -1927,7 +1929,7 @@ class MarketplaceApi:
""" # noqa: E501 """ # noqa: E501
_param = self._offer_storage_serialize( _param = self._offer_storage_serialize(
sales_availability_create=sales_availability_create, sales_availability=sales_availability,
_request_auth=_request_auth, _request_auth=_request_auth,
_content_type=_content_type, _content_type=_content_type,
_headers=_headers, _headers=_headers,
@ -1955,7 +1957,7 @@ class MarketplaceApi:
@validate_call @validate_call
def offer_storage_with_http_info( def offer_storage_with_http_info(
self, self,
sales_availability_create: Optional[SalesAvailabilityCREATE] = None, sales_availability: Optional[SalesAvailability] = None,
_request_timeout: Union[ _request_timeout: Union[
None, None,
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)],
@ -1972,8 +1974,8 @@ class MarketplaceApi:
"""Offers storage for sale """Offers storage for sale
:param sales_availability_create: :param sales_availability:
:type sales_availability_create: SalesAvailabilityCREATE :type sales_availability: SalesAvailability
:param _request_timeout: timeout setting for this request. If one :param _request_timeout: timeout setting for this request. If one
number provided, it will be total request number provided, it will be total request
timeout. It can also be a pair (tuple) of timeout. It can also be a pair (tuple) of
@ -1997,7 +1999,7 @@ class MarketplaceApi:
""" # noqa: E501 """ # noqa: E501
_param = self._offer_storage_serialize( _param = self._offer_storage_serialize(
sales_availability_create=sales_availability_create, sales_availability=sales_availability,
_request_auth=_request_auth, _request_auth=_request_auth,
_content_type=_content_type, _content_type=_content_type,
_headers=_headers, _headers=_headers,
@ -2025,7 +2027,7 @@ class MarketplaceApi:
@validate_call @validate_call
def offer_storage_without_preload_content( def offer_storage_without_preload_content(
self, self,
sales_availability_create: Optional[SalesAvailabilityCREATE] = None, sales_availability: Optional[SalesAvailability] = None,
_request_timeout: Union[ _request_timeout: Union[
None, None,
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)],
@ -2042,8 +2044,8 @@ class MarketplaceApi:
"""Offers storage for sale """Offers storage for sale
:param sales_availability_create: :param sales_availability:
:type sales_availability_create: SalesAvailabilityCREATE :type sales_availability: SalesAvailability
:param _request_timeout: timeout setting for this request. If one :param _request_timeout: timeout setting for this request. If one
number provided, it will be total request number provided, it will be total request
timeout. It can also be a pair (tuple) of timeout. It can also be a pair (tuple) of
@ -2067,7 +2069,7 @@ class MarketplaceApi:
""" # noqa: E501 """ # noqa: E501
_param = self._offer_storage_serialize( _param = self._offer_storage_serialize(
sales_availability_create=sales_availability_create, sales_availability=sales_availability,
_request_auth=_request_auth, _request_auth=_request_auth,
_content_type=_content_type, _content_type=_content_type,
_headers=_headers, _headers=_headers,
@ -2090,7 +2092,7 @@ class MarketplaceApi:
def _offer_storage_serialize( def _offer_storage_serialize(
self, self,
sales_availability_create, sales_availability,
_request_auth, _request_auth,
_content_type, _content_type,
_headers, _headers,
@ -2116,8 +2118,8 @@ class MarketplaceApi:
# process the header parameters # process the header parameters
# process the form parameters # process the form parameters
# process the body parameter # process the body parameter
if sales_availability_create is not None: if sales_availability is not None:
_body_params = sales_availability_create _body_params = sales_availability
# set the HTTP header `Accept` # set the HTTP header `Accept`

View File

@ -527,7 +527,7 @@ class NodeApi:
if 'Accept' not in _header_params: if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept( _header_params['Accept'] = self.api_client.select_header_accept(
[ [
'plain/text', 'text/plain',
'application/json' 'application/json'
] ]
) )
@ -773,7 +773,7 @@ class NodeApi:
if 'Accept' not in _header_params: if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept( _header_params['Accept'] = self.api_client.select_header_accept(
[ [
'plain/text', 'text/plain',
'application/json' 'application/json'
] ]
) )

View File

@ -27,7 +27,6 @@ from codex_api_client.models.purchase import Purchase
from codex_api_client.models.reservation import Reservation from codex_api_client.models.reservation import Reservation
from codex_api_client.models.spr_read import SPRRead from codex_api_client.models.spr_read import SPRRead
from codex_api_client.models.sales_availability import SalesAvailability from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.models.slot import Slot from codex_api_client.models.slot import Slot
from codex_api_client.models.slot_agent import SlotAgent from codex_api_client.models.slot_agent import SlotAgent

View File

@ -28,7 +28,8 @@ class CodexVersion(BaseModel):
""" # noqa: E501 """ # noqa: E501
version: Optional[StrictStr] = None version: Optional[StrictStr] = None
revision: Optional[StrictStr] = None revision: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["version", "revision"] contracts: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["version", "revision", "contracts"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -82,7 +83,8 @@ class CodexVersion(BaseModel):
_obj = cls.model_validate({ _obj = cls.model_validate({
"version": obj.get("version"), "version": obj.get("version"),
"revision": obj.get("revision") "revision": obj.get("revision"),
"contracts": obj.get("contracts")
}) })
return _obj return _obj

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -26,7 +26,7 @@ class Content(BaseModel):
""" """
Parameters specifying the content Parameters specifying the content
""" # noqa: E501 """ # noqa: E501
cid: Optional[StrictStr] = Field(default=None, description="Content Identifier as specified at https://github.com/multiformats/cid") cid: StrictStr = Field(description="Content Identifier as specified at https://github.com/multiformats/cid")
__properties: ClassVar[List[str]] = ["cid"] __properties: ClassVar[List[str]] = ["cid"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from codex_api_client.models.manifest_item import ManifestItem from codex_api_client.models.manifest_item import ManifestItem
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,8 +27,8 @@ class DataItem(BaseModel):
""" """
DataItem DataItem
""" # noqa: E501 """ # noqa: E501
cid: Optional[StrictStr] = Field(default=None, description="Content Identifier as specified at https://github.com/multiformats/cid") cid: StrictStr = Field(description="Content Identifier as specified at https://github.com/multiformats/cid")
manifest: Optional[ManifestItem] = None manifest: ManifestItem
__properties: ClassVar[List[str]] = ["cid", "manifest"] __properties: ClassVar[List[str]] = ["cid", "manifest"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from codex_api_client.models.data_item import DataItem from codex_api_client.models.data_item import DataItem
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,7 +27,7 @@ class DataList(BaseModel):
""" """
DataList DataList
""" # noqa: E501 """ # noqa: E501
content: Optional[List[DataItem]] = None content: List[DataItem]
__properties: ClassVar[List[str]] = ["content"] __properties: ClassVar[List[str]] = ["content"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from codex_api_client.models.codex_version import CodexVersion from codex_api_client.models.codex_version import CodexVersion
from codex_api_client.models.peers_table import PeersTable from codex_api_client.models.peers_table import PeersTable
from typing import Optional, Set from typing import Optional, Set
@ -28,13 +28,13 @@ class DebugInfo(BaseModel):
""" """
DebugInfo DebugInfo
""" # noqa: E501 """ # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/") id: StrictStr = Field(description="Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/")
addrs: Optional[List[StrictStr]] = None addrs: List[StrictStr]
repo: Optional[StrictStr] = Field(default=None, description="Path of the data repository where all nodes data are stored") repo: StrictStr = Field(description="Path of the data repository where all nodes data are stored")
spr: Optional[StrictStr] = Field(default=None, description="Signed Peer Record (libp2p)") spr: StrictStr = Field(description="Signed Peer Record (libp2p)")
announce_addresses: Optional[List[StrictStr]] = Field(default=None, alias="announceAddresses") announce_addresses: List[StrictStr] = Field(alias="announceAddresses")
table: Optional[PeersTable] = None table: PeersTable
codex: Optional[CodexVersion] = None codex: CodexVersion
__properties: ClassVar[List[str]] = ["id", "addrs", "repo", "spr", "announceAddresses", "table", "codex"] __properties: ClassVar[List[str]] = ["id", "addrs", "repo", "spr", "announceAddresses", "table", "codex"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -26,10 +26,10 @@ class ManifestItem(BaseModel):
""" """
ManifestItem ManifestItem
""" # noqa: E501 """ # noqa: E501
tree_cid: Optional[StrictStr] = Field(default=None, description="Content Identifier as specified at https://github.com/multiformats/cid", alias="treeCid") tree_cid: StrictStr = Field(description="Content Identifier as specified at https://github.com/multiformats/cid", alias="treeCid")
dataset_size: Optional[StrictInt] = Field(default=None, description="Length of original content in bytes", alias="datasetSize") dataset_size: StrictInt = Field(description="Length of original content in bytes", alias="datasetSize")
block_size: Optional[StrictInt] = Field(default=None, description="Size of blocks", alias="blockSize") block_size: StrictInt = Field(description="Size of blocks", alias="blockSize")
protected: Optional[StrictBool] = Field(default=None, description="Indicates if content is protected by erasure-coding") protected: StrictBool = Field(description="Indicates if content is protected by erasure-coding")
filename: Optional[StrictStr] = Field(default=None, description="The original name of the uploaded content (optional)") filename: Optional[StrictStr] = Field(default=None, description="The original name of the uploaded content (optional)")
mimetype: Optional[StrictStr] = Field(default=None, description="The original mimetype of the uploaded content (optional)") mimetype: Optional[StrictStr] = Field(default=None, description="The original mimetype of the uploaded content (optional)")
__properties: ClassVar[List[str]] = ["treeCid", "datasetSize", "blockSize", "protected", "filename", "mimetype"] __properties: ClassVar[List[str]] = ["treeCid", "datasetSize", "blockSize", "protected", "filename", "mimetype"]

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -26,11 +26,11 @@ class Node(BaseModel):
""" """
Node Node
""" # noqa: E501 """ # noqa: E501
node_id: Optional[StrictStr] = Field(default=None, alias="nodeId") node_id: StrictStr = Field(alias="nodeId")
peer_id: Optional[StrictStr] = Field(default=None, alias="peerId") peer_id: StrictStr = Field(alias="peerId")
record: Optional[StrictStr] = None record: StrictStr
address: Optional[StrictStr] = None address: StrictStr
seen: Optional[StrictBool] = None seen: StrictBool
__properties: ClassVar[List[str]] = ["nodeId", "peerId", "record", "address", "seen"] __properties: ClassVar[List[str]] = ["nodeId", "peerId", "record", "address", "seen"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from codex_api_client.models.node import Node from codex_api_client.models.node import Node
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,8 +27,8 @@ class PeersTable(BaseModel):
""" """
PeersTable PeersTable
""" # noqa: E501 """ # noqa: E501
local_node: Optional[Node] = Field(default=None, alias="localNode") local_node: Node = Field(alias="localNode")
nodes: Optional[List[Node]] = None nodes: List[Node]
__properties: ClassVar[List[str]] = ["localNode", "nodes"] __properties: ClassVar[List[str]] = ["localNode", "nodes"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from codex_api_client.models.storage_request import StorageRequest from codex_api_client.models.storage_request import StorageRequest
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,19 +28,17 @@ class Purchase(BaseModel):
""" """
Purchase Purchase
""" # noqa: E501 """ # noqa: E501
state: Optional[StrictStr] = Field(default=None, description="Description of the Request's state") state: StrictStr = Field(description="Description of the Request's state")
error: Optional[StrictStr] = Field(default=None, description="If Request failed, then here is presented the error message") error: Optional[StrictStr] = Field(default=None, description="If Request failed, then here is presented the error message")
request: Optional[StorageRequest] = None request: Optional[StorageRequest] = None
__properties: ClassVar[List[str]] = ["state", "error", "request"] request_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="requestId")
__properties: ClassVar[List[str]] = ["state", "error", "request", "requestId"]
@field_validator('state') @field_validator('state')
def state_validate_enum(cls, value): def state_validate_enum(cls, value):
"""Validates the enum""" """Validates the enum"""
if value is None: if value not in set(['cancelled', 'errored', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown']):
return value raise ValueError("must be one of enum values ('cancelled', 'errored', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown')")
if value not in set(['cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown']):
raise ValueError("must be one of enum values ('cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown')")
return value return value
model_config = ConfigDict( model_config = ConfigDict(
@ -84,6 +83,11 @@ class Purchase(BaseModel):
# override the default output from pydantic by calling `to_dict()` of request # override the default output from pydantic by calling `to_dict()` of request
if self.request: if self.request:
_dict['request'] = self.request.to_dict() _dict['request'] = self.request.to_dict()
# set to None if error (nullable) is None
# and model_fields_set contains the field
if self.error is None and "error" in self.model_fields_set:
_dict['error'] = None
return _dict return _dict
@classmethod @classmethod
@ -98,7 +102,8 @@ class Purchase(BaseModel):
_obj = cls.model_validate({ _obj = cls.model_validate({
"state": obj.get("state"), "state": obj.get("state"),
"error": obj.get("error"), "error": obj.get("error"),
"request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None "request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None,
"requestId": obj.get("requestId")
}) })
return _obj return _obj

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated from typing_extensions import Annotated
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,12 +27,13 @@ class Reservation(BaseModel):
""" """
Reservation Reservation
""" # noqa: E501 """ # noqa: E501
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, 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.")
availability_id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.", alias="availabilityId") availability_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="availabilityId")
size: Optional[StrictInt] = Field(default=None, description="Size of the slot in bytes") size: StrictInt = Field(description="Size of the slot in bytes")
request_id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.", alias="requestId") request_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="requestId")
slot_index: Optional[StrictInt] = Field(default=None, description="Slot Index number", alias="slotIndex") slot_index: StrictInt = Field(description="Slot Index number", alias="slotIndex")
__properties: ClassVar[List[str]] = ["id", "availabilityId", "size", "requestId", "slotIndex"] valid_until: StrictInt = Field(description="Timestamp after which the reservation will no longer be valid.", alias="validUntil")
__properties: ClassVar[List[str]] = ["id", "availabilityId", "size", "requestId", "slotIndex", "validUntil"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -89,7 +90,8 @@ class Reservation(BaseModel):
"availabilityId": obj.get("availabilityId"), "availabilityId": obj.get("availabilityId"),
"size": obj.get("size"), "size": obj.get("size"),
"requestId": obj.get("requestId"), "requestId": obj.get("requestId"),
"slotIndex": obj.get("slotIndex") "slotIndex": obj.get("slotIndex"),
"validUntil": obj.get("validUntil")
}) })
return _obj return _obj

View File

@ -17,9 +17,8 @@ import pprint
import re # noqa: F401 import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,12 +26,13 @@ class SalesAvailability(BaseModel):
""" """
SalesAvailability SalesAvailability
""" # noqa: E501 """ # noqa: E501
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.") total_size: StrictInt = Field(description="Total size of availability's storage in bytes", alias="totalSize")
total_size: Optional[StrictInt] = Field(default=None, description="Total size of availability's storage in bytes", alias="totalSize") duration: StrictInt = Field(description="The duration of the request in seconds")
duration: Optional[StrictInt] = Field(default=None, description="The duration of the request in seconds") min_price_per_byte_per_second: StrictStr = Field(description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond")
min_price_per_byte_per_second: Optional[StrictStr] = Field(default=None, description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond") total_collateral: StrictStr = Field(description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
total_collateral: Optional[StrictStr] = Field(default=None, description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral") enabled: Optional[StrictBool] = Field(default=True, description="Enable the ability to receive sales on this availability.")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral"] 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.")
__properties: ClassVar[List[str]] = ["totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "enabled", "until"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -85,11 +85,12 @@ class SalesAvailability(BaseModel):
return cls.model_validate(obj) return cls.model_validate(obj)
_obj = cls.model_validate({ _obj = cls.model_validate({
"id": obj.get("id"),
"totalSize": obj.get("totalSize"), "totalSize": obj.get("totalSize"),
"duration": obj.get("duration"), "duration": obj.get("duration"),
"minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"), "minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"totalCollateral": obj.get("totalCollateral") "totalCollateral": obj.get("totalCollateral"),
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
"until": obj.get("until") if obj.get("until") is not None else 0
}) })
return _obj return _obj

View File

@ -17,7 +17,7 @@ import pprint
import re # noqa: F401 import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated from typing_extensions import Annotated
from typing import Optional, Set from typing import Optional, Set
@ -27,13 +27,16 @@ class SalesAvailabilityREAD(BaseModel):
""" """
SalesAvailabilityREAD SalesAvailabilityREAD
""" # noqa: E501 """ # noqa: E501
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.") total_size: StrictInt = Field(description="Total size of availability's storage in bytes", alias="totalSize")
total_size: Optional[StrictInt] = Field(default=None, description="Total size of availability's storage in bytes", alias="totalSize") duration: StrictInt = Field(description="The duration of the request in seconds")
duration: Optional[StrictInt] = Field(default=None, description="The duration of the request in seconds") min_price_per_byte_per_second: StrictStr = Field(description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond")
min_price_per_byte_per_second: Optional[StrictStr] = Field(default=None, description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond") total_collateral: StrictStr = Field(description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
total_collateral: Optional[StrictStr] = Field(default=None, description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral") enabled: Optional[StrictBool] = Field(default=True, description="Enable the ability to receive sales on this availability.")
free_size: Optional[StrictInt] = Field(default=None, description="Unused size of availability's storage in bytes", alias="freeSize") 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.")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "freeSize"] 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")
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"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -65,8 +68,12 @@ class SalesAvailabilityREAD(BaseModel):
* `None` is only added to the output dict for nullable fields that * `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None` were set at model initialization. Other fields with value `None`
are ignored. are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
""" """
excluded_fields: Set[str] = set([ excluded_fields: Set[str] = set([
"free_size",
"total_remaining_collateral",
]) ])
_dict = self.model_dump( _dict = self.model_dump(
@ -86,12 +93,15 @@ class SalesAvailabilityREAD(BaseModel):
return cls.model_validate(obj) return cls.model_validate(obj)
_obj = cls.model_validate({ _obj = cls.model_validate({
"id": obj.get("id"),
"totalSize": obj.get("totalSize"), "totalSize": obj.get("totalSize"),
"duration": obj.get("duration"), "duration": obj.get("duration"),
"minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"), "minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"totalCollateral": obj.get("totalCollateral"), "totalCollateral": obj.get("totalCollateral"),
"freeSize": obj.get("freeSize") "enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
"until": obj.get("until") if obj.get("until") is not None else 0,
"id": obj.get("id"),
"freeSize": obj.get("freeSize"),
"totalRemainingCollateral": obj.get("totalRemainingCollateral")
}) })
return _obj return _obj

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from codex_api_client.models.storage_request import StorageRequest from codex_api_client.models.storage_request import StorageRequest
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -27,9 +27,9 @@ class Slot(BaseModel):
""" """
Slot Slot
""" # noqa: E501 """ # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Keccak hash of the abi encoded tuple (RequestId, slot index)") id: StrictStr = Field(description="Keccak hash of the abi encoded tuple (RequestId, slot index)")
request: Optional[StorageRequest] = None request: StorageRequest
slot_index: Optional[StrictInt] = Field(default=None, description="Slot Index number", alias="slotIndex") slot_index: StrictInt = Field(description="Slot Index number", alias="slotIndex")
__properties: ClassVar[List[str]] = ["id", "request", "slotIndex"] __properties: ClassVar[List[str]] = ["id", "request", "slotIndex"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -29,20 +29,16 @@ class SlotAgent(BaseModel):
""" """
SlotAgent SlotAgent
""" # noqa: E501 """ # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Keccak hash of the abi encoded tuple (RequestId, slot index)") slot_index: StrictInt = Field(description="Slot Index number", alias="slotIndex")
slot_index: Optional[StrictInt] = Field(default=None, description="Slot Index number", alias="slotIndex") request_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="requestId")
request_id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.", alias="requestId")
request: Optional[StorageRequest] = None request: Optional[StorageRequest] = None
reservation: Optional[Reservation] = None reservation: Optional[Reservation] = None
state: Optional[StrictStr] = Field(default=None, description="Description of the slot's") state: StrictStr = Field(description="Description of the slot's")
__properties: ClassVar[List[str]] = ["id", "slotIndex", "requestId", "request", "reservation", "state"] __properties: ClassVar[List[str]] = ["slotIndex", "requestId", "request", "reservation", "state"]
@field_validator('state') @field_validator('state')
def state_validate_enum(cls, value): def state_validate_enum(cls, value):
"""Validates the enum""" """Validates the enum"""
if value is None:
return value
if value not in set(['SaleCancelled', 'SaleDownloading', 'SaleErrored', 'SaleFailed', 'SaleFilled', 'SaleFilling', 'SaleFinished', 'SaleIgnored', 'SaleInitialProving', 'SalePayout', 'SalePreparing', 'SaleProving', 'SaleUnknown']): if value not in set(['SaleCancelled', 'SaleDownloading', 'SaleErrored', 'SaleFailed', 'SaleFilled', 'SaleFilling', 'SaleFinished', 'SaleIgnored', 'SaleInitialProving', 'SalePayout', 'SalePreparing', 'SaleProving', 'SaleUnknown']):
raise ValueError("must be one of enum values ('SaleCancelled', 'SaleDownloading', 'SaleErrored', 'SaleFailed', 'SaleFilled', 'SaleFilling', 'SaleFinished', 'SaleIgnored', 'SaleInitialProving', 'SalePayout', 'SalePreparing', 'SaleProving', 'SaleUnknown')") raise ValueError("must be one of enum values ('SaleCancelled', 'SaleDownloading', 'SaleErrored', 'SaleFailed', 'SaleFilled', 'SaleFilling', 'SaleFinished', 'SaleIgnored', 'SaleInitialProving', 'SalePayout', 'SalePreparing', 'SaleProving', 'SaleUnknown')")
return value return value
@ -104,7 +100,6 @@ class SlotAgent(BaseModel):
return cls.model_validate(obj) return cls.model_validate(obj)
_obj = cls.model_validate({ _obj = cls.model_validate({
"id": obj.get("id"),
"slotIndex": obj.get("slotIndex"), "slotIndex": obj.get("slotIndex"),
"requestId": obj.get("requestId"), "requestId": obj.get("requestId"),
"request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None, "request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None,

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -26,10 +26,10 @@ class Space(BaseModel):
""" """
Space Space
""" # noqa: E501 """ # noqa: E501
total_blocks: Optional[StrictInt] = Field(default=None, description="Number of blocks stored by the node", alias="totalBlocks") total_blocks: StrictInt = Field(description="Number of blocks stored by the node", alias="totalBlocks")
quota_max_bytes: Optional[StrictInt] = Field(default=None, description="Maximum storage space (in bytes) available for the node in Codex's local repository.", alias="quotaMaxBytes") quota_max_bytes: StrictInt = Field(description="Maximum storage space (in bytes) available for the node in Codex's local repository.", alias="quotaMaxBytes")
quota_used_bytes: Optional[StrictInt] = Field(default=None, description="Amount of storage space (in bytes) currently used for storing files in Codex's local repository.", alias="quotaUsedBytes") quota_used_bytes: StrictInt = Field(description="Amount of storage space (in bytes) currently used for storing files in Codex's local repository.", alias="quotaUsedBytes")
quota_reserved_bytes: Optional[StrictInt] = Field(default=None, description="Amount of storage reserved (in bytes) in the Codex's local repository for future use when storage requests will be picked up and hosted by the node using node's availabilities. This does not include the storage currently in use.", alias="quotaReservedBytes") quota_reserved_bytes: StrictInt = Field(description="Amount of storage reserved (in bytes) in the Codex's local repository for future use when storage requests will be picked up and hosted by the node using node's availabilities. This does not include the storage currently in use.", alias="quotaReservedBytes")
__properties: ClassVar[List[str]] = ["totalBlocks", "quotaMaxBytes", "quotaUsedBytes", "quotaReservedBytes"] __properties: ClassVar[List[str]] = ["totalBlocks", "quotaMaxBytes", "quotaUsedBytes", "quotaReservedBytes"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -26,7 +26,7 @@ class SPRRead(BaseModel):
""" """
SPRRead SPRRead
""" # noqa: E501 """ # noqa: E501
spr: Optional[StrictStr] = Field(default=None, description="Signed Peer Record (libp2p)") spr: StrictStr = Field(description="Signed Peer Record (libp2p)")
__properties: ClassVar[List[str]] = ["spr"] __properties: ClassVar[List[str]] = ["spr"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from typing import Optional, Set from typing import Optional, Set
from typing_extensions import Self from typing_extensions import Self
@ -26,13 +26,14 @@ class StorageAsk(BaseModel):
""" """
StorageAsk StorageAsk
""" # noqa: E501 """ # noqa: E501
slots: Optional[StrictInt] = Field(default=None, description="Number of slots (eq. hosts) that the Request want to have the content spread over") slots: StrictInt = Field(description="Number of slots (eq. hosts) that the Request want to have the content spread over")
slot_size: Optional[StrictInt] = Field(default=None, description="Amount of storage per slot (in bytes) as decimal string", alias="slotSize") slot_size: StrictInt = Field(description="Amount of storage per slot in bytes", alias="slotSize")
duration: Optional[StrictInt] = Field(default=None, description="The duration of the request in seconds") duration: StrictInt = Field(description="The duration of the request in seconds")
proof_probability: Optional[StrictStr] = Field(default=None, description="How often storage proofs are required as decimal string", alias="proofProbability") proof_probability: StrictStr = Field(description="How often storage proofs are required as decimal string", alias="proofProbability")
price_per_byte_per_second: StrictStr = Field(description="The amount of tokens paid per byte per second per slot to hosts the client is willing to pay", alias="pricePerBytePerSecond") price_per_byte_per_second: StrictStr = Field(description="The amount of tokens paid per byte per second per slot to hosts the client is willing to pay", alias="pricePerBytePerSecond")
max_slot_loss: Optional[StrictInt] = Field(default=None, description="Max slots that can be lost without data considered to be lost", alias="maxSlotLoss") collateral_per_byte: StrictStr = Field(description="Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots", alias="collateralPerByte")
__properties: ClassVar[List[str]] = ["slots", "slotSize", "duration", "proofProbability", "pricePerBytePerSecond", "maxSlotLoss"] max_slot_loss: StrictInt = Field(description="Max slots that can be lost without data considered to be lost", alias="maxSlotLoss")
__properties: ClassVar[List[str]] = ["slots", "slotSize", "duration", "proofProbability", "pricePerBytePerSecond", "collateralPerByte", "maxSlotLoss"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -90,6 +91,7 @@ class StorageAsk(BaseModel):
"duration": obj.get("duration"), "duration": obj.get("duration"),
"proofProbability": obj.get("proofProbability"), "proofProbability": obj.get("proofProbability"),
"pricePerBytePerSecond": obj.get("pricePerBytePerSecond"), "pricePerBytePerSecond": obj.get("pricePerBytePerSecond"),
"collateralPerByte": obj.get("collateralPerByte"),
"maxSlotLoss": obj.get("maxSlotLoss") "maxSlotLoss": obj.get("maxSlotLoss")
}) })
return _obj return _obj

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional from typing import Any, ClassVar, Dict, List
from codex_api_client.models.content import Content from codex_api_client.models.content import Content
from codex_api_client.models.storage_ask import StorageAsk from codex_api_client.models.storage_ask import StorageAsk
from typing import Optional, Set from typing import Optional, Set
@ -28,12 +28,12 @@ class StorageRequest(BaseModel):
""" """
StorageRequest StorageRequest
""" # noqa: E501 """ # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Request ID") id: StrictStr = Field(description="Request ID")
client: Optional[StrictStr] = Field(default=None, description="Address of Ethereum address") client: StrictStr = Field(description="Address of Ethereum address")
ask: Optional[StorageAsk] = None ask: StorageAsk
content: Optional[Content] = None content: Content
expiry: Optional[StrictInt] = Field(default=None, description="A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data.") expiry: StrictInt = Field(description="A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data.")
nonce: Optional[StrictStr] = Field(default=None, description="Random data") nonce: StrictStr = Field(description="Random data")
__properties: ClassVar[List[str]] = ["id", "client", "ask", "content", "expiry", "nonce"] __properties: ClassVar[List[str]] = ["id", "client", "ask", "content", "expiry", "nonce"]
model_config = ConfigDict( model_config = ConfigDict(

View File

@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**version** | **str** | | [optional] **version** | **str** | | [optional]
**revision** | **str** | | [optional] **revision** | **str** | | [optional]
**contracts** | **str** | | [optional]
## Example ## Example

View File

@ -6,7 +6,7 @@ Parameters specifying the content
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid | [optional] **cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid |
## Example ## Example

View File

@ -482,6 +482,7 @@ No authorization required
| Status code | Description | Response headers | | Status code | Description | Response headers |
|-------------|-------------|------------------| |-------------|-------------|------------------|
**200** | CID of uploaded file | - | **200** | CID of uploaded file | - |
**422** | The mimetype of the filename is invalid | - |
**500** | Well it was bad-bad and the upload did not work out | - | **500** | Well it was bad-bad and the upload did not work out | - |
[[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) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -5,8 +5,8 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid | [optional] **cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid |
**manifest** | [**ManifestItem**](ManifestItem.md) | | [optional] **manifest** | [**ManifestItem**](ManifestItem.md) | |
## Example ## Example

View File

@ -5,7 +5,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**content** | [**List[DataItem]**](DataItem.md) | | [optional] **content** | [**List[DataItem]**](DataItem.md) | |
## Example ## Example

View File

@ -5,13 +5,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/ | [optional] **id** | **str** | Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/ |
**addrs** | **List[str]** | | [optional] **addrs** | **List[str]** | |
**repo** | **str** | Path of the data repository where all nodes data are stored | [optional] **repo** | **str** | Path of the data repository where all nodes data are stored |
**spr** | **str** | Signed Peer Record (libp2p) | [optional] **spr** | **str** | Signed Peer Record (libp2p) |
**announce_addresses** | **List[str]** | | [optional] **announce_addresses** | **List[str]** | |
**table** | [**PeersTable**](PeersTable.md) | | [optional] **table** | [**PeersTable**](PeersTable.md) | |
**codex** | [**CodexVersion**](CodexVersion.md) | | [optional] **codex** | [**CodexVersion**](CodexVersion.md) | |
## Example ## Example

View File

@ -5,10 +5,10 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**tree_cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid | [optional] **tree_cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid |
**dataset_size** | **int** | Length of original content in bytes | [optional] **dataset_size** | **int** | Length of original content in bytes |
**block_size** | **int** | Size of blocks | [optional] **block_size** | **int** | Size of blocks |
**protected** | **bool** | Indicates if content is protected by erasure-coding | [optional] **protected** | **bool** | Indicates if content is protected by erasure-coding |
**filename** | **str** | The original name of the uploaded content (optional) | [optional] **filename** | **str** | The original name of the uploaded content (optional) | [optional]
**mimetype** | **str** | The original mimetype of the uploaded content (optional) | [optional] **mimetype** | **str** | The original mimetype of the uploaded content (optional) | [optional]

View File

@ -81,6 +81,7 @@ No authorization required
|-------------|-------------|------------------| |-------------|-------------|------------------|
**200** | Returns the Request ID as decimal string | - | **200** | Returns the Request ID as decimal string | - |
**400** | Invalid or missing Request ID | - | **400** | Invalid or missing Request ID | - |
**422** | The storage request parameters are not valid | - |
**404** | Request ID not found | - | **404** | Request ID not found | - |
**503** | Persistence is not enabled | - | **503** | Persistence is not enabled | - |
@ -486,7 +487,7 @@ No authorization required
[[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) [[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)
# **offer_storage** # **offer_storage**
> SalesAvailabilityREAD offer_storage(sales_availability_create=sales_availability_create) > SalesAvailabilityREAD offer_storage(sales_availability=sales_availability)
Offers storage for sale Offers storage for sale
@ -495,7 +496,7 @@ Offers storage for sale
```python ```python
import codex_api_client import codex_api_client
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.rest import ApiException from codex_api_client.rest import ApiException
from pprint import pprint from pprint import pprint
@ -511,11 +512,11 @@ 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.MarketplaceApi(api_client) api_instance = codex_api_client.MarketplaceApi(api_client)
sales_availability_create = codex_api_client.SalesAvailabilityCREATE() # SalesAvailabilityCREATE | (optional) sales_availability = codex_api_client.SalesAvailability() # SalesAvailability | (optional)
try: try:
# Offers storage for sale # Offers storage for sale
api_response = api_instance.offer_storage(sales_availability_create=sales_availability_create) api_response = api_instance.offer_storage(sales_availability=sales_availability)
print("The response of MarketplaceApi->offer_storage:\n") print("The response of MarketplaceApi->offer_storage:\n")
pprint(api_response) pprint(api_response)
except Exception as e: except Exception as e:
@ -529,7 +530,7 @@ with codex_api_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**sales_availability_create** | [**SalesAvailabilityCREATE**](SalesAvailabilityCREATE.md)| | [optional] **sales_availability** | [**SalesAvailability**](SalesAvailability.md)| | [optional]
### Return type ### Return type
@ -550,7 +551,7 @@ No authorization required
|-------------|-------------|------------------| |-------------|-------------|------------------|
**201** | Created storage availability | - | **201** | Created storage availability | - |
**400** | Invalid data input | - | **400** | Invalid data input | - |
**422** | Not enough node's storage quota available | - | **422** | Not enough node's storage quota available or the provided parameters did not pass validation | - |
**500** | Error reserving availability | - | **500** | Error reserving availability | - |
**503** | Persistence is not enabled | - | **503** | Persistence is not enabled | - |
@ -623,7 +624,7 @@ No authorization required
**204** | Availability successfully updated | - | **204** | Availability successfully updated | - |
**400** | Invalid data input | - | **400** | Invalid data input | - |
**404** | Availability not found | - | **404** | Availability not found | - |
**422** | Not enough node's storage quota available | - | **422** | The provided parameters did not pass validation | - |
**500** | Error reserving availability | - | **500** | Error reserving availability | - |
**503** | Persistence is not enabled | - | **503** | Persistence is not enabled | - |

View File

@ -5,11 +5,11 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**node_id** | **str** | | [optional] **node_id** | **str** | |
**peer_id** | **str** | | [optional] **peer_id** | **str** | |
**record** | **str** | | [optional] **record** | **str** | |
**address** | **str** | | [optional] **address** | **str** | |
**seen** | **bool** | | [optional] **seen** | **bool** | |
## Example ## Example

View File

@ -128,7 +128,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: plain/text, application/json - **Accept**: text/plain, application/json
### HTTP response details ### HTTP response details
@ -189,7 +189,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: plain/text, application/json - **Accept**: text/plain, application/json
### HTTP response details ### HTTP response details

View File

@ -5,8 +5,8 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**local_node** | [**Node**](Node.md) | | [optional] **local_node** | [**Node**](Node.md) | |
**nodes** | [**List[Node]**](Node.md) | | [optional] **nodes** | [**List[Node]**](Node.md) | |
## Example ## Example

View File

@ -5,9 +5,10 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**state** | **str** | Description of the Request's state | [optional] **state** | **str** | Description of the Request's state |
**error** | **str** | If Request failed, then here is presented the error message | [optional] **error** | **str** | If Request failed, then here is presented the error message | [optional]
**request** | [**StorageRequest**](StorageRequest.md) | | [optional] **request** | [**StorageRequest**](StorageRequest.md) | | [optional]
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. |
## Example ## Example

View File

@ -5,11 +5,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **id** | **str** | 32bits identifier encoded in hex-decimal string. |
**availability_id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **availability_id** | **str** | 32bits identifier encoded in hex-decimal string. |
**size** | **int** | Size of the slot in bytes | [optional] **size** | **int** | Size of the slot in bytes |
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **request_id** | **str** | 32bits identifier encoded in hex-decimal string. |
**slot_index** | **int** | Slot Index number | [optional] **slot_index** | **int** | Slot Index number |
**valid_until** | **int** | Timestamp after which the reservation will no longer be valid. |
## Example ## Example

View File

@ -5,7 +5,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**spr** | **str** | Signed Peer Record (libp2p) | [optional] **spr** | **str** | Signed Peer Record (libp2p) |
## Example ## Example

View File

@ -5,11 +5,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **total_size** | **int** | Total size of availability's storage in bytes |
**total_size** | **int** | Total size of availability's storage in bytes | [optional] **duration** | **int** | The duration of the request in seconds |
**duration** | **int** | The duration of the request in seconds | [optional] **min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string |
**min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string | [optional] **total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests |
**total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests | [optional] **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]
## Example ## Example

View File

@ -5,12 +5,15 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **total_size** | **int** | Total size of availability's storage in bytes |
**total_size** | **int** | Total size of availability's storage in bytes | [optional] **duration** | **int** | The duration of the request in seconds |
**duration** | **int** | The duration of the request in seconds | [optional] **min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string |
**min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string | [optional] **total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests |
**total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests | [optional] **enabled** | **bool** | Enable the ability to receive sales on this availability. | [optional] [default to True]
**free_size** | **int** | Unused size of availability's storage in bytes | [optional] **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. |
**free_size** | **int** | Unused size of availability's storage in bytes as decimal string | [optional] [readonly]
**total_remaining_collateral** | **str** | Total collateral effective (in amount of tokens) that can be used for matching requests | [readonly]
## Example ## Example

View File

@ -5,9 +5,9 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | Keccak hash of the abi encoded tuple (RequestId, slot index) | [optional] **id** | **str** | Keccak hash of the abi encoded tuple (RequestId, slot index) |
**request** | [**StorageRequest**](StorageRequest.md) | | [optional] **request** | [**StorageRequest**](StorageRequest.md) | |
**slot_index** | **int** | Slot Index number | [optional] **slot_index** | **int** | Slot Index number |
## Example ## Example

View File

@ -5,12 +5,11 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | Keccak hash of the abi encoded tuple (RequestId, slot index) | [optional] **slot_index** | **int** | Slot Index number |
**slot_index** | **int** | Slot Index number | [optional] **request_id** | **str** | 32bits identifier encoded in hex-decimal string. |
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**request** | [**StorageRequest**](StorageRequest.md) | | [optional] **request** | [**StorageRequest**](StorageRequest.md) | | [optional]
**reservation** | [**Reservation**](Reservation.md) | | [optional] **reservation** | [**Reservation**](Reservation.md) | | [optional]
**state** | **str** | Description of the slot's | [optional] **state** | **str** | Description of the slot's |
## Example ## Example

View File

@ -5,10 +5,10 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**total_blocks** | **int** | Number of blocks stored by the node | [optional] **total_blocks** | **int** | Number of blocks stored by the node |
**quota_max_bytes** | **int** | Maximum storage space (in bytes) available for the node in Codex's local repository. | [optional] **quota_max_bytes** | **int** | Maximum storage space (in bytes) available for the node in Codex's local repository. |
**quota_used_bytes** | **int** | Amount of storage space (in bytes) currently used for storing files in Codex's local repository. | [optional] **quota_used_bytes** | **int** | Amount of storage space (in bytes) currently used for storing files in Codex's local repository. |
**quota_reserved_bytes** | **int** | Amount of storage reserved (in bytes) in the Codex's local repository for future use when storage requests will be picked up and hosted by the node using node's availabilities. This does not include the storage currently in use. | [optional] **quota_reserved_bytes** | **int** | Amount of storage reserved (in bytes) in the Codex's local repository for future use when storage requests will be picked up and hosted by the node using node's availabilities. This does not include the storage currently in use. |
## Example ## Example

View File

@ -5,12 +5,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**slots** | **int** | Number of slots (eq. hosts) that the Request want to have the content spread over | [optional] **slots** | **int** | Number of slots (eq. hosts) that the Request want to have the content spread over |
**slot_size** | **int** | Amount of storage per slot (in bytes) as decimal string | [optional] **slot_size** | **int** | Amount of storage per slot in bytes |
**duration** | **int** | The duration of the request in seconds | [optional] **duration** | **int** | The duration of the request in seconds |
**proof_probability** | **str** | How often storage proofs are required as decimal string | [optional] **proof_probability** | **str** | How often storage proofs are required as decimal string |
**price_per_byte_per_second** | **str** | The amount of tokens paid per byte per second per slot to hosts the client is willing to pay | **price_per_byte_per_second** | **str** | The amount of tokens paid per byte per second per slot to hosts the client is willing to pay |
**max_slot_loss** | **int** | Max slots that can be lost without data considered to be lost | [optional] **collateral_per_byte** | **str** | Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots |
**max_slot_loss** | **int** | Max slots that can be lost without data considered to be lost |
## Example ## Example

View File

@ -5,12 +5,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **str** | Request ID | [optional] **id** | **str** | Request ID |
**client** | **str** | Address of Ethereum address | [optional] **client** | **str** | Address of Ethereum address |
**ask** | [**StorageAsk**](StorageAsk.md) | | [optional] **ask** | [**StorageAsk**](StorageAsk.md) | |
**content** | [**Content**](Content.md) | | [optional] **content** | [**Content**](Content.md) | |
**expiry** | **int** | A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data. | [optional] **expiry** | **int** | A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data. |
**nonce** | **str** | Random data | [optional] **nonce** | **str** | Random data |
## Example ## Example