Generated API update (#3)

Co-authored-by: AuHau <6072250+AuHau@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2025-03-31 18:47:51 +02:00 committed by GitHub
parent cb896ee083
commit 9dd754e2d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 5 deletions

View File

@ -263,10 +263,12 @@ components:
description: Minimal number of nodes the content should be stored on
type: integer
default: 3
minimum: 3
tolerance:
description: Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost
type: integer
default: 1
minimum: 1
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
@ -282,8 +284,10 @@ components:
slots:
description: Number of slots (eq. hosts) that the Request want to have the content spread over
type: integer
format: int64
slotSize:
type: string
type: integer
format: int64
description: Amount of storage per slot (in bytes) as decimal string
duration:
$ref: "#/components/schemas/Duration"
@ -293,6 +297,7 @@ components:
$ref: "#/components/schemas/PricePerBytePerSecond"
maxSlotLoss:
type: integer
format: int64
description: Max slots that can be lost without data considered to be lost
StorageRequest:

View File

@ -27,7 +27,7 @@ class StorageAsk(BaseModel):
StorageAsk
""" # noqa: E501
slots: Optional[StrictInt] = Field(default=None, description="Number of slots (eq. hosts) that the Request want to have the content spread over")
slot_size: Optional[StrictStr] = Field(default=None, description="Amount of storage per slot (in bytes) as decimal string", alias="slotSize")
slot_size: Optional[StrictInt] = Field(default=None, description="Amount of storage per slot (in bytes) as decimal string", alias="slotSize")
duration: Optional[StrictInt] = Field(default=None, 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")
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")

View File

@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@ -29,8 +30,8 @@ class StorageRequestCreation(BaseModel):
duration: StrictInt = Field(description="The duration of the request in seconds")
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")
nodes: Optional[StrictInt] = Field(default=3, description="Minimal number of nodes the content should be stored on")
tolerance: Optional[StrictInt] = Field(default=1, description="Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost")
nodes: Optional[Annotated[int, Field(strict=True, ge=3)]] = Field(default=3, description="Minimal number of nodes the content should be stored on")
tolerance: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost")
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: StrictInt = Field(description="Number 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", "pricePerBytePerSecond", "proofProbability", "nodes", "tolerance", "collateralPerByte", "expiry"]

View File

@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**slots** | **int** | Number of slots (eq. hosts) that the Request want to have the content spread over | [optional]
**slot_size** | **str** | Amount of storage per slot (in bytes) as decimal string | [optional]
**slot_size** | **int** | Amount of storage per slot (in bytes) as decimal string | [optional]
**duration** | **int** | The duration of the request in seconds | [optional]
**proof_probability** | **str** | How often storage proofs are required as decimal string | [optional]
**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 |