Generated API update (#1)

Co-authored-by: AuHau <6072250+AuHau@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2025-03-26 16:42:46 +01:00 committed by GitHub
parent b029e89b18
commit 3734425f52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 82 additions and 89 deletions

View File

@ -6,7 +6,7 @@ info:
description: "List of endpoints and interfaces available to Codex API users" description: "List of endpoints and interfaces available to Codex API users"
security: security:
- { } - {}
components: components:
schemas: schemas:
@ -50,9 +50,9 @@ components:
type: string type: string
description: Address of Ethereum address description: Address of Ethereum address
Reward: PricePerBytePerSecond:
type: string type: string
description: The maximum amount of tokens paid 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
Duration: Duration:
type: string type: string
@ -138,6 +138,10 @@ components:
description: Path of the data repository where all nodes data are stored description: Path of the data repository where all nodes data are stored
spr: spr:
$ref: "#/components/schemas/SPR" $ref: "#/components/schemas/SPR"
announceAddresses:
type: array
items:
$ref: "#/components/schemas/MultiAddress"
table: table:
$ref: "#/components/schemas/PeersTable" $ref: "#/components/schemas/PeersTable"
codex: codex:
@ -153,12 +157,12 @@ components:
description: Total size of availability's storage in bytes as decimal string description: Total size of availability's storage in bytes as decimal string
duration: duration:
$ref: "#/components/schemas/Duration" $ref: "#/components/schemas/Duration"
minPrice: minPricePerBytePerSecond:
type: string type: string
description: Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string 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
maxCollateral: totalCollateral:
type: string type: string
description: Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string description: Total collateral (in amount of tokens) that can be used for matching requests
SalesAvailabilityREAD: SalesAvailabilityREAD:
allOf: allOf:
@ -174,8 +178,8 @@ components:
- $ref: "#/components/schemas/SalesAvailability" - $ref: "#/components/schemas/SalesAvailability"
- required: - required:
- totalSize - totalSize
- minPrice - minPricePerBytePerSecond
- maxCollateral - totalCollateral
- duration - duration
Slot: Slot:
@ -239,16 +243,16 @@ components:
StorageRequestCreation: StorageRequestCreation:
type: object type: object
required: required:
- reward - pricePerBytePerSecond
- duration - duration
- proofProbability - proofProbability
- collateral - collateralPerByte
- expiry - expiry
properties: properties:
duration: duration:
$ref: "#/components/schemas/Duration" $ref: "#/components/schemas/Duration"
reward: pricePerBytePerSecond:
$ref: "#/components/schemas/Reward" $ref: "#/components/schemas/PricePerBytePerSecond"
proofProbability: proofProbability:
$ref: "#/components/schemas/ProofProbability" $ref: "#/components/schemas/ProofProbability"
nodes: nodes:
@ -259,16 +263,16 @@ components:
description: Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost description: Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost
type: integer type: integer
default: 0 default: 0
collateral: collateralPerByte:
type: string type: string
description: Number as decimal string that represents how much collateral is asked from hosts that wants to fill a slots 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: string type: string
description: Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself. description: Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.
StorageAsk: StorageAsk:
type: object type: object
required: required:
- reward - pricePerBytePerSecond
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
@ -280,8 +284,8 @@ components:
$ref: "#/components/schemas/Duration" $ref: "#/components/schemas/Duration"
proofProbability: proofProbability:
$ref: "#/components/schemas/ProofProbability" $ref: "#/components/schemas/ProofProbability"
reward: pricePerBytePerSecond:
$ref: "#/components/schemas/Reward" $ref: "#/components/schemas/PricePerBytePerSecond"
maxSlotLoss: maxSlotLoss:
type: integer type: integer
description: Max slots that can be lost without data considered to be lost description: Max slots that can be lost without data considered to be lost
@ -367,12 +371,6 @@ components:
nullable: true nullable: true
description: "The original mimetype of the uploaded content (optional)" description: "The original mimetype of the uploaded content (optional)"
example: image/png example: image/png
uploadedAt:
type: integer
format: int64
nullable: true
description: "The UTC upload timestamp in seconds"
example: 1729244192
Space: Space:
type: object type: object
@ -414,7 +412,7 @@ paths:
description: | description: |
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used 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. to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
tags: [ Node ] tags: [Node]
operationId: connectPeer operationId: connectPeer
parameters: parameters:
- in: path - in: path
@ -444,7 +442,7 @@ paths:
"/data": "/data":
get: get:
summary: "Lists manifest CIDs stored locally in node." summary: "Lists manifest CIDs stored locally in node."
tags: [ Data ] tags: [Data]
operationId: listData operationId: listData
responses: responses:
"200": "200":
@ -464,7 +462,7 @@ paths:
description: Well it was bad-bad description: Well it was bad-bad
post: post:
summary: "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." summary: "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."
tags: [ Data ] tags: [Data]
operationId: upload operationId: upload
parameters: parameters:
- name: content-type - name: content-type
@ -480,7 +478,7 @@ paths:
description: The content disposition used to send the filename. description: The content disposition used to send the filename.
schema: schema:
type: string type: string
example: "attachment; filename=\"codex.png\"" example: 'attachment; filename="codex.png"'
requestBody: requestBody:
content: content:
application/octet-stream: application/octet-stream:
@ -500,7 +498,7 @@ paths:
"/data/{cid}": "/data/{cid}":
get: get:
summary: "Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned." summary: "Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned."
tags: [ Data ] tags: [Data]
operationId: downloadLocal operationId: downloadLocal
parameters: parameters:
- in: path - in: path
@ -528,7 +526,7 @@ paths:
"/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."
tags: [ Data ] tags: [Data]
operationId: downloadNetwork operationId: downloadNetwork
parameters: parameters:
- in: path - in: path
@ -554,7 +552,7 @@ paths:
"/data/{cid}/network/stream": "/data/{cid}/network/stream":
get: get:
summary: "Download a file from the network in a streaming manner. If the file is not available locally, it will be retrieved from other nodes in the network if able." summary: "Download a file from the network in a streaming manner. If the file is not available locally, it will be retrieved from other nodes in the network if able."
tags: [ Data ] tags: [Data]
operationId: downloadNetworkStream operationId: downloadNetworkStream
parameters: parameters:
- in: path - in: path
@ -581,7 +579,7 @@ paths:
"/data/{cid}/network/manifest": "/data/{cid}/network/manifest":
get: get:
summary: "Download only the dataset manifest from the network to the local node if it's not available locally." summary: "Download only the dataset manifest from the network to the local node if it's not available locally."
tags: [ Data ] tags: [Data]
operationId: downloadNetworkManifest operationId: downloadNetworkManifest
parameters: parameters:
- in: path - in: path
@ -607,7 +605,7 @@ paths:
"/space": "/space":
get: get:
summary: "Gets a summary of the storage space allocation of the node." summary: "Gets a summary of the storage space allocation of the node."
tags: [ Data ] tags: [Data]
operationId: space operationId: space
responses: responses:
"200": "200":
@ -623,7 +621,7 @@ paths:
"/sales/slots": "/sales/slots":
get: get:
summary: "Returns active slots" summary: "Returns active slots"
tags: [ Marketplace ] tags: [Marketplace]
operationId: getActiveSlots operationId: getActiveSlots
responses: responses:
"200": "200":
@ -641,7 +639,7 @@ paths:
"/sales/slots/{slotId}": "/sales/slots/{slotId}":
get: get:
summary: "Returns active slot with id {slotId} for the host" summary: "Returns active slot with id {slotId} for the host"
tags: [ Marketplace ] tags: [Marketplace]
operationId: getActiveSlotById operationId: getActiveSlotById
parameters: parameters:
- in: path - in: path
@ -670,7 +668,7 @@ paths:
"/sales/availability": "/sales/availability":
get: get:
summary: "Returns storage that is for sale" summary: "Returns storage that is for sale"
tags: [ Marketplace ] tags: [Marketplace]
operationId: getAvailabilities operationId: getAvailabilities
responses: responses:
"200": "200":
@ -689,7 +687,7 @@ paths:
post: post:
summary: "Offers storage for sale" summary: "Offers storage for sale"
operationId: offerStorage operationId: offerStorage
tags: [ Marketplace ] tags: [Marketplace]
requestBody: requestBody:
content: content:
application/json: application/json:
@ -717,7 +715,7 @@ paths:
The new parameters will be only considered for new requests. The new parameters will be only considered for new requests.
Existing Requests linked to this Availability will continue as is. Existing Requests linked to this Availability will continue as is.
operationId: updateOfferedStorage operationId: updateOfferedStorage
tags: [ Marketplace ] tags: [Marketplace]
parameters: parameters:
- in: path - in: path
name: id name: id
@ -749,7 +747,7 @@ paths:
summary: "Get availability's reservations" summary: "Get availability's reservations"
description: Return's list of Reservations for ongoing Storage Requests that the node hosts. description: Return's list of Reservations for ongoing Storage Requests that the node hosts.
operationId: getReservations operationId: getReservations
tags: [ Marketplace ] tags: [Marketplace]
parameters: parameters:
- in: path - in: path
name: id name: id
@ -778,7 +776,7 @@ paths:
"/storage/request/{cid}": "/storage/request/{cid}":
post: post:
summary: "Creates a new Request for storage" summary: "Creates a new Request for storage"
tags: [ Marketplace ] tags: [Marketplace]
operationId: createStorageRequest operationId: createStorageRequest
parameters: parameters:
- in: path - in: path
@ -809,7 +807,7 @@ paths:
"/storage/purchases": "/storage/purchases":
get: get:
summary: "Returns list of purchase IDs" summary: "Returns list of purchase IDs"
tags: [ Marketplace ] tags: [Marketplace]
operationId: getPurchases operationId: getPurchases
responses: responses:
"200": "200":
@ -826,7 +824,7 @@ paths:
"/storage/purchases/{id}": "/storage/purchases/{id}":
get: get:
summary: "Returns purchase details" summary: "Returns purchase details"
tags: [ Marketplace ] tags: [Marketplace]
operationId: getPurchase operationId: getPurchase
parameters: parameters:
- in: path - in: path
@ -853,7 +851,7 @@ paths:
get: get:
summary: "Get Node's SPR" summary: "Get Node's SPR"
operationId: getSPR operationId: getSPR
tags: [ Node ] tags: [Node]
responses: responses:
"200": "200":
description: Node's SPR description: Node's SPR
@ -871,7 +869,7 @@ paths:
get: get:
summary: "Get Node's PeerID" summary: "Get Node's PeerID"
operationId: getPeerId operationId: getPeerId
tags: [ Node ] tags: [Node]
responses: responses:
"200": "200":
description: Node's Peer ID description: Node's Peer ID
@ -886,7 +884,7 @@ paths:
"/debug/chronicles/loglevel": "/debug/chronicles/loglevel":
post: post:
summary: "Set log level at run time" summary: "Set log level at run time"
tags: [ Debug ] tags: [Debug]
operationId: setDebugLogLevel operationId: setDebugLogLevel
parameters: parameters:
@ -908,7 +906,7 @@ paths:
get: get:
summary: "Gets node information" summary: "Gets node information"
operationId: getDebugInfo operationId: getDebugInfo
tags: [ Debug ] tags: [Debug]
responses: responses:
"200": "200":
description: Node's information description: Node's information

View File

@ -32,9 +32,10 @@ class DebugInfo(BaseModel):
addrs: Optional[List[StrictStr]] = None addrs: Optional[List[StrictStr]] = None
repo: Optional[StrictStr] = Field(default=None, description="Path of the data repository where all nodes data are stored") repo: Optional[StrictStr] = Field(default=None, description="Path of the data repository where all nodes data are stored")
spr: Optional[StrictStr] = Field(default=None, description="Signed Peer Record (libp2p)") spr: Optional[StrictStr] = Field(default=None, description="Signed Peer Record (libp2p)")
announce_addresses: Optional[List[StrictStr]] = Field(default=None, alias="announceAddresses")
table: Optional[PeersTable] = None table: Optional[PeersTable] = None
codex: Optional[CodexVersion] = None codex: Optional[CodexVersion] = None
__properties: ClassVar[List[str]] = ["id", "addrs", "repo", "spr", "table", "codex"] __properties: ClassVar[List[str]] = ["id", "addrs", "repo", "spr", "announceAddresses", "table", "codex"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -97,6 +98,7 @@ class DebugInfo(BaseModel):
"addrs": obj.get("addrs"), "addrs": obj.get("addrs"),
"repo": obj.get("repo"), "repo": obj.get("repo"),
"spr": obj.get("spr"), "spr": obj.get("spr"),
"announceAddresses": obj.get("announceAddresses"),
"table": PeersTable.from_dict(obj["table"]) if obj.get("table") is not None else None, "table": PeersTable.from_dict(obj["table"]) if obj.get("table") is not None else None,
"codex": CodexVersion.from_dict(obj["codex"]) if obj.get("codex") is not None else None "codex": CodexVersion.from_dict(obj["codex"]) if obj.get("codex") is not None else None
}) })

View File

@ -32,8 +32,7 @@ class ManifestItem(BaseModel):
protected: Optional[StrictBool] = Field(default=None, description="Indicates if content is protected by erasure-coding") protected: Optional[StrictBool] = Field(default=None, 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)")
uploaded_at: Optional[StrictInt] = Field(default=None, description="The UTC upload timestamp in seconds", alias="uploadedAt") __properties: ClassVar[List[str]] = ["treeCid", "datasetSize", "blockSize", "protected", "filename", "mimetype"]
__properties: ClassVar[List[str]] = ["treeCid", "datasetSize", "blockSize", "protected", "filename", "mimetype", "uploadedAt"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -84,11 +83,6 @@ class ManifestItem(BaseModel):
if self.mimetype is None and "mimetype" in self.model_fields_set: if self.mimetype is None and "mimetype" in self.model_fields_set:
_dict['mimetype'] = None _dict['mimetype'] = None
# set to None if uploaded_at (nullable) is None
# and model_fields_set contains the field
if self.uploaded_at is None and "uploaded_at" in self.model_fields_set:
_dict['uploadedAt'] = None
return _dict return _dict
@classmethod @classmethod
@ -106,8 +100,7 @@ class ManifestItem(BaseModel):
"blockSize": obj.get("blockSize"), "blockSize": obj.get("blockSize"),
"protected": obj.get("protected"), "protected": obj.get("protected"),
"filename": obj.get("filename"), "filename": obj.get("filename"),
"mimetype": obj.get("mimetype"), "mimetype": obj.get("mimetype")
"uploadedAt": obj.get("uploadedAt")
}) })
return _obj return _obj

View File

@ -30,9 +30,9 @@ class SalesAvailability(BaseModel):
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: 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: Optional[StrictStr] = Field(default=None, description="Total size of availability's storage in bytes as decimal string", alias="totalSize") total_size: Optional[StrictStr] = Field(default=None, description="Total size of availability's storage in bytes as decimal string", alias="totalSize")
duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string") duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string")
min_price: Optional[StrictStr] = Field(default=None, description="Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string", alias="minPrice") 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")
max_collateral: Optional[StrictStr] = Field(default=None, description="Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string", alias="maxCollateral") total_collateral: Optional[StrictStr] = Field(default=None, description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPrice", "maxCollateral"] __properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -88,8 +88,8 @@ class SalesAvailability(BaseModel):
"id": obj.get("id"), "id": obj.get("id"),
"totalSize": obj.get("totalSize"), "totalSize": obj.get("totalSize"),
"duration": obj.get("duration"), "duration": obj.get("duration"),
"minPrice": obj.get("minPrice"), "minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"maxCollateral": obj.get("maxCollateral") "totalCollateral": obj.get("totalCollateral")
}) })
return _obj return _obj

View File

@ -30,9 +30,9 @@ class SalesAvailabilityCREATE(BaseModel):
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: 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: StrictStr = Field(description="Total size of availability's storage in bytes as decimal string", alias="totalSize") total_size: StrictStr = Field(description="Total size of availability's storage in bytes as decimal string", alias="totalSize")
duration: StrictStr = Field(description="The duration of the request in seconds as decimal string") duration: StrictStr = Field(description="The duration of the request in seconds as decimal string")
min_price: StrictStr = Field(description="Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string", alias="minPrice") 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")
max_collateral: StrictStr = Field(description="Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string", alias="maxCollateral") total_collateral: StrictStr = Field(description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPrice", "maxCollateral"] __properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -88,8 +88,8 @@ class SalesAvailabilityCREATE(BaseModel):
"id": obj.get("id"), "id": obj.get("id"),
"totalSize": obj.get("totalSize"), "totalSize": obj.get("totalSize"),
"duration": obj.get("duration"), "duration": obj.get("duration"),
"minPrice": obj.get("minPrice"), "minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"maxCollateral": obj.get("maxCollateral") "totalCollateral": obj.get("totalCollateral")
}) })
return _obj return _obj

View File

@ -30,10 +30,10 @@ class SalesAvailabilityREAD(BaseModel):
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: 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: Optional[StrictStr] = Field(default=None, description="Total size of availability's storage in bytes as decimal string", alias="totalSize") total_size: Optional[StrictStr] = Field(default=None, description="Total size of availability's storage in bytes as decimal string", alias="totalSize")
duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string") duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string")
min_price: Optional[StrictStr] = Field(default=None, description="Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string", alias="minPrice") 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")
max_collateral: Optional[StrictStr] = Field(default=None, description="Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string", alias="maxCollateral") total_collateral: Optional[StrictStr] = Field(default=None, description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
free_size: Optional[StrictStr] = Field(default=None, description="Unused size of availability's storage in bytes as decimal string", alias="freeSize") free_size: Optional[StrictStr] = Field(default=None, description="Unused size of availability's storage in bytes as decimal string", alias="freeSize")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPrice", "maxCollateral", "freeSize"] __properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "freeSize"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -89,8 +89,8 @@ class SalesAvailabilityREAD(BaseModel):
"id": obj.get("id"), "id": obj.get("id"),
"totalSize": obj.get("totalSize"), "totalSize": obj.get("totalSize"),
"duration": obj.get("duration"), "duration": obj.get("duration"),
"minPrice": obj.get("minPrice"), "minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"maxCollateral": obj.get("maxCollateral"), "totalCollateral": obj.get("totalCollateral"),
"freeSize": obj.get("freeSize") "freeSize": obj.get("freeSize")
}) })
return _obj return _obj

View File

@ -30,9 +30,9 @@ class StorageAsk(BaseModel):
slot_size: Optional[StrictStr] = Field(default=None, description="Amount of storage per slot (in bytes) as decimal string", alias="slotSize") slot_size: Optional[StrictStr] = Field(default=None, description="Amount of storage per slot (in bytes) as decimal string", alias="slotSize")
duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string") duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string")
proof_probability: Optional[StrictStr] = Field(default=None, description="How often storage proofs are required as decimal string", alias="proofProbability") proof_probability: Optional[StrictStr] = Field(default=None, description="How often storage proofs are required as decimal string", alias="proofProbability")
reward: StrictStr = Field(description="The maximum amount of tokens paid per second per slot to hosts the client is willing to pay") 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") max_slot_loss: Optional[StrictInt] = Field(default=None, description="Max slots that can be lost without data considered to be lost", alias="maxSlotLoss")
__properties: ClassVar[List[str]] = ["slots", "slotSize", "duration", "proofProbability", "reward", "maxSlotLoss"] __properties: ClassVar[List[str]] = ["slots", "slotSize", "duration", "proofProbability", "pricePerBytePerSecond", "maxSlotLoss"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -89,7 +89,7 @@ class StorageAsk(BaseModel):
"slotSize": obj.get("slotSize"), "slotSize": obj.get("slotSize"),
"duration": obj.get("duration"), "duration": obj.get("duration"),
"proofProbability": obj.get("proofProbability"), "proofProbability": obj.get("proofProbability"),
"reward": obj.get("reward"), "pricePerBytePerSecond": obj.get("pricePerBytePerSecond"),
"maxSlotLoss": obj.get("maxSlotLoss") "maxSlotLoss": obj.get("maxSlotLoss")
}) })
return _obj return _obj

View File

@ -27,13 +27,13 @@ class StorageRequestCreation(BaseModel):
StorageRequestCreation StorageRequestCreation
""" # noqa: E501 """ # noqa: E501
duration: StrictStr = Field(description="The duration of the request in seconds as decimal string") duration: StrictStr = Field(description="The duration of the request in seconds as decimal string")
reward: StrictStr = Field(description="The maximum amount of tokens paid per second per slot to hosts the client is willing to pay") 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")
proof_probability: StrictStr = Field(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")
nodes: Optional[StrictInt] = Field(default=1, description="Minimal number of nodes the content should be stored on") nodes: Optional[StrictInt] = Field(default=1, description="Minimal number of nodes the content should be stored on")
tolerance: Optional[StrictInt] = Field(default=0, description="Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost") tolerance: Optional[StrictInt] = Field(default=0, description="Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost")
collateral: StrictStr = Field(description="Number as decimal string that represents how much collateral is asked from hosts that wants to fill a slots") 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")
expiry: StrictStr = Field(description="Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.") expiry: StrictStr = Field(description="Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.")
__properties: ClassVar[List[str]] = ["duration", "reward", "proofProbability", "nodes", "tolerance", "collateral", "expiry"] __properties: ClassVar[List[str]] = ["duration", "pricePerBytePerSecond", "proofProbability", "nodes", "tolerance", "collateralPerByte", "expiry"]
model_config = ConfigDict( model_config = ConfigDict(
populate_by_name=True, populate_by_name=True,
@ -87,11 +87,11 @@ class StorageRequestCreation(BaseModel):
_obj = cls.model_validate({ _obj = cls.model_validate({
"duration": obj.get("duration"), "duration": obj.get("duration"),
"reward": obj.get("reward"), "pricePerBytePerSecond": obj.get("pricePerBytePerSecond"),
"proofProbability": obj.get("proofProbability"), "proofProbability": obj.get("proofProbability"),
"nodes": obj.get("nodes") if obj.get("nodes") is not None else 1, "nodes": obj.get("nodes") if obj.get("nodes") is not None else 1,
"tolerance": obj.get("tolerance") if obj.get("tolerance") is not None else 0, "tolerance": obj.get("tolerance") if obj.get("tolerance") is not None else 0,
"collateral": obj.get("collateral"), "collateralPerByte": obj.get("collateralPerByte"),
"expiry": obj.get("expiry") "expiry": obj.get("expiry")
}) })
return _obj return _obj

View File

@ -9,6 +9,7 @@ Name | Type | Description | Notes
**addrs** | **List[str]** | | [optional] **addrs** | **List[str]** | | [optional]
**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 | [optional]
**spr** | **str** | Signed Peer Record (libp2p) | [optional] **spr** | **str** | Signed Peer Record (libp2p) | [optional]
**announce_addresses** | **List[str]** | | [optional]
**table** | [**PeersTable**](PeersTable.md) | | [optional] **table** | [**PeersTable**](PeersTable.md) | | [optional]
**codex** | [**CodexVersion**](CodexVersion.md) | | [optional] **codex** | [**CodexVersion**](CodexVersion.md) | | [optional]

View File

@ -11,7 +11,6 @@ Name | Type | Description | Notes
**protected** | **bool** | Indicates if content is protected by erasure-coding | [optional] **protected** | **bool** | Indicates if content is protected by erasure-coding | [optional]
**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]
**uploaded_at** | **int** | The UTC upload timestamp in seconds | [optional]
## Example ## Example

View File

@ -8,8 +8,8 @@ Name | Type | Description | Notes
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | [optional] **total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | [optional]
**duration** | **str** | The duration of the request in seconds as decimal string | [optional] **duration** | **str** | The duration of the request in seconds as decimal string | [optional]
**min_price** | **str** | Minimal price paid (in amount of tokens) for the whole hosted request&#39;s slot for the request&#39;s duration as decimal string | [optional] **min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request&#39;s slot for the request&#39;s duration as decimal string | [optional]
**max_collateral** | **str** | Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string | [optional] **total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests | [optional]
## Example ## Example

View File

@ -8,8 +8,8 @@ Name | Type | Description | Notes
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | **total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string |
**duration** | **str** | The duration of the request in seconds as decimal string | **duration** | **str** | The duration of the request in seconds as decimal string |
**min_price** | **str** | Minimal price paid (in amount of tokens) for the whole hosted request&#39;s slot for the request&#39;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&#39;s slot for the request&#39;s duration as decimal string |
**max_collateral** | **str** | Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string | **total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests |
## Example ## Example

View File

@ -8,8 +8,8 @@ Name | Type | Description | Notes
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional] **id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | [optional] **total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | [optional]
**duration** | **str** | The duration of the request in seconds as decimal string | [optional] **duration** | **str** | The duration of the request in seconds as decimal string | [optional]
**min_price** | **str** | Minimal price paid (in amount of tokens) for the whole hosted request&#39;s slot for the request&#39;s duration as decimal string | [optional] **min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request&#39;s slot for the request&#39;s duration as decimal string | [optional]
**max_collateral** | **str** | Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string | [optional] **total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests | [optional]
**free_size** | **str** | Unused size of availability&#39;s storage in bytes as decimal string | [optional] **free_size** | **str** | Unused size of availability&#39;s storage in bytes as decimal string | [optional]
## Example ## Example

View File

@ -9,7 +9,7 @@ Name | Type | Description | Notes
**slot_size** | **str** | Amount of storage per slot (in bytes) as decimal string | [optional] **slot_size** | **str** | Amount of storage per slot (in bytes) as decimal string | [optional]
**duration** | **str** | The duration of the request in seconds as decimal string | [optional] **duration** | **str** | The duration of the request in seconds as decimal string | [optional]
**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 | [optional]
**reward** | **str** | The maximum amount of tokens paid 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] **max_slot_loss** | **int** | Max slots that can be lost without data considered to be lost | [optional]
## Example ## Example

View File

@ -6,11 +6,11 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**duration** | **str** | The duration of the request in seconds as decimal string | **duration** | **str** | The duration of the request in seconds as decimal string |
**reward** | **str** | The maximum amount of tokens paid 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 |
**proof_probability** | **str** | How often storage proofs are required as decimal string | **proof_probability** | **str** | How often storage proofs are required as decimal string |
**nodes** | **int** | Minimal number of nodes the content should be stored on | [optional] [default to 1] **nodes** | **int** | Minimal number of nodes the content should be stored on | [optional] [default to 1]
**tolerance** | **int** | Additional number of nodes on top of the &#x60;nodes&#x60; property that can be lost before pronouncing the content lost | [optional] [default to 0] **tolerance** | **int** | Additional number of nodes on top of the &#x60;nodes&#x60; property that can be lost before pronouncing the content lost | [optional] [default to 0]
**collateral** | **str** | Number as decimal string that represents how much collateral is asked from hosts that wants to fill a slots | **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 |
**expiry** | **str** | Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request&#39;s duration itself. | **expiry** | **str** | Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request&#39;s duration itself. |
## Example ## Example