This commit is contained in:
@@ -3,14 +3,13 @@ use crate::util::{serialize_u64,deserialize_u64,response_ok};
|
|||||||
use crate::types::{ResponseError,MaybeGzippedBytes};
|
use crate::types::{ResponseError,MaybeGzippedBytes};
|
||||||
|
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub enum AssetType{
|
pub enum AssetType{
|
||||||
Audio,
|
Audio,
|
||||||
Decal,
|
Decal,
|
||||||
Model,
|
Model,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct CreateAssetRequest{
|
pub struct CreateAssetRequest{
|
||||||
pub assetType:AssetType,
|
pub assetType:AssetType,
|
||||||
pub creationContext:CreationContext,
|
pub creationContext:CreationContext,
|
||||||
@@ -56,7 +55,7 @@ impl std::fmt::Display for CreateError{
|
|||||||
impl std::error::Error for CreateError{}
|
impl std::error::Error for CreateError{}
|
||||||
|
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UpdateAssetRequest{
|
pub struct UpdateAssetRequest{
|
||||||
pub assetId:u64,
|
pub assetId:u64,
|
||||||
pub displayName:Option<String>,
|
pub displayName:Option<String>,
|
||||||
@@ -65,42 +64,41 @@ pub struct UpdateAssetRequest{
|
|||||||
|
|
||||||
//woo nested roblox stuff
|
//woo nested roblox stuff
|
||||||
#[derive(Clone,Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Clone,Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub enum Creator{
|
pub enum Creator{
|
||||||
userId(#[serde(deserialize_with="deserialize_u64",serialize_with="serialize_u64")]u64),
|
userId(#[serde(deserialize_with="deserialize_u64",serialize_with="serialize_u64")]u64),
|
||||||
groupId(#[serde(deserialize_with="deserialize_u64",serialize_with="serialize_u64")]u64),
|
groupId(#[serde(deserialize_with="deserialize_u64",serialize_with="serialize_u64")]u64),
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct CreationContext{
|
pub struct CreationContext{
|
||||||
pub creator:Creator,
|
pub creator:Creator,
|
||||||
pub expectedPrice:Option<u64>,
|
pub expectedPrice:Option<u64>,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub enum ModerationState{
|
pub enum ModerationState{
|
||||||
Reviewing,
|
Reviewing,
|
||||||
Rejected,
|
Rejected,
|
||||||
Approved,
|
Approved,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct ModerationResult{
|
pub struct ModerationResult{
|
||||||
pub moderationState:ModerationState,
|
pub moderationState:ModerationState,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct Preview{
|
pub struct Preview{
|
||||||
pub asset:String,
|
pub asset:String,
|
||||||
pub altText:String,
|
pub altText:String,
|
||||||
}
|
}
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UpdatePlaceRequest{
|
pub struct UpdatePlaceRequest{
|
||||||
pub universeId:u64,
|
pub universeId:u64,
|
||||||
pub placeId:u64,
|
pub placeId:u64,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UpdatePlaceResponse{
|
pub struct UpdatePlaceResponse{
|
||||||
pub versionNumber:u64,
|
pub versionNumber:u64,
|
||||||
}
|
}
|
||||||
@@ -146,7 +144,7 @@ pub struct GetAssetLatestRequest{
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetResponse{
|
pub struct AssetResponse{
|
||||||
//u64 wrapped in quotes wohoo!!
|
//u64 wrapped in quotes wohoo!!
|
||||||
#[serde(deserialize_with="deserialize_u64")]
|
#[serde(deserialize_with="deserialize_u64")]
|
||||||
@@ -166,7 +164,6 @@ pub struct AssetResponse{
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub previews:Vec<Preview>,
|
pub previews:Vec<Preview>,
|
||||||
}
|
}
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub struct GetAssetVersionRequest{
|
pub struct GetAssetVersionRequest{
|
||||||
pub asset_id:u64,
|
pub asset_id:u64,
|
||||||
pub version:u64,
|
pub version:u64,
|
||||||
@@ -197,13 +194,13 @@ impl AssetLocation{
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug,serde::Deserialize)]
|
#[derive(Debug,serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetMetadata{
|
pub struct AssetMetadata{
|
||||||
pub metadataType:u32,
|
pub metadataType:u32,
|
||||||
pub value:String,
|
pub value:String,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize)]
|
#[derive(Debug,serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetLocationInfo{
|
pub struct AssetLocationInfo{
|
||||||
pub location:Option<AssetLocation>,
|
pub location:Option<AssetLocation>,
|
||||||
pub requestId:String,
|
pub requestId:String,
|
||||||
@@ -219,7 +216,7 @@ pub struct AssetVersionsRequest{
|
|||||||
pub cursor:Option<String>,
|
pub cursor:Option<String>,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetVersion{
|
pub struct AssetVersion{
|
||||||
pub Id:u64,
|
pub Id:u64,
|
||||||
pub assetId:u64,
|
pub assetId:u64,
|
||||||
@@ -231,7 +228,7 @@ pub struct AssetVersion{
|
|||||||
pub isPublished:bool,
|
pub isPublished:bool,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize)]
|
#[derive(Debug,serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetVersionsResponse{
|
pub struct AssetVersionsResponse{
|
||||||
pub previousPageCursor:Option<String>,
|
pub previousPageCursor:Option<String>,
|
||||||
pub nextPageCursor:Option<String>,
|
pub nextPageCursor:Option<String>,
|
||||||
@@ -255,13 +252,12 @@ pub struct InventoryPageRequest{
|
|||||||
pub cursor:Option<String>,
|
pub cursor:Option<String>,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub struct InventoryItem{
|
pub struct InventoryItem{
|
||||||
pub id:u64,
|
pub id:u64,
|
||||||
pub name:String,
|
pub name:String,
|
||||||
}
|
}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct InventoryPageResponse{
|
pub struct InventoryPageResponse{
|
||||||
pub totalResults:u64,//up to 50
|
pub totalResults:u64,//up to 50
|
||||||
pub filteredKeyword:Option<String>,//""
|
pub filteredKeyword:Option<String>,//""
|
||||||
@@ -299,7 +295,7 @@ impl std::fmt::Display for OperationError{
|
|||||||
}
|
}
|
||||||
impl std::error::Error for OperationError{}
|
impl std::error::Error for OperationError{}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
struct RobloxOperation{
|
struct RobloxOperation{
|
||||||
pub path:Option<String>,
|
pub path:Option<String>,
|
||||||
pub metadata:Option<String>,
|
pub metadata:Option<String>,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ impl std::fmt::Display for PostError{
|
|||||||
impl std::error::Error for PostError{}
|
impl std::error::Error for PostError{}
|
||||||
|
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct CreateRequest{
|
pub struct CreateRequest{
|
||||||
pub name:String,
|
pub name:String,
|
||||||
pub description:String,
|
pub description:String,
|
||||||
@@ -43,7 +43,7 @@ impl std::fmt::Display for CreateError{
|
|||||||
}
|
}
|
||||||
impl std::error::Error for CreateError{}
|
impl std::error::Error for CreateError{}
|
||||||
|
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UploadRequest{
|
pub struct UploadRequest{
|
||||||
pub assetid:u64,
|
pub assetid:u64,
|
||||||
pub name:Option<String>,
|
pub name:Option<String>,
|
||||||
@@ -73,17 +73,15 @@ impl std::fmt::Display for UploadError{
|
|||||||
}
|
}
|
||||||
impl std::error::Error for UploadError{}
|
impl std::error::Error for UploadError{}
|
||||||
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
#[derive(Debug,serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UploadResponse{
|
pub struct UploadResponse{
|
||||||
pub AssetId:u64,
|
pub AssetId:u64,
|
||||||
pub AssetVersion:u64,
|
pub AssetVersion:u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub struct GetAssetDetailsRequest{
|
pub struct GetAssetDetailsRequest{
|
||||||
pub asset_id:u64,
|
pub asset_id:u64,
|
||||||
}
|
}
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub struct GetAssetRequest{
|
pub struct GetAssetRequest{
|
||||||
pub asset_id:u64,
|
pub asset_id:u64,
|
||||||
pub version:Option<u64>,
|
pub version:Option<u64>,
|
||||||
@@ -118,13 +116,13 @@ impl std::fmt::Display for GetAssetV2Error{
|
|||||||
impl std::error::Error for GetAssetV2Error{}
|
impl std::error::Error for GetAssetV2Error{}
|
||||||
|
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct GetAssetV2AssetMetadata{
|
pub struct GetAssetV2AssetMetadata{
|
||||||
pub metadataType:u32,
|
pub metadataType:u32,
|
||||||
pub value:String,
|
pub value:String,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct GetAssetV2Location{
|
pub struct GetAssetV2Location{
|
||||||
pub assetFormat:String,// "source"
|
pub assetFormat:String,// "source"
|
||||||
location:String,// this value is private so users cannot mutate it
|
location:String,// this value is private so users cannot mutate it
|
||||||
@@ -137,7 +135,7 @@ impl GetAssetV2Location{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct GetAssetV2Info{
|
pub struct GetAssetV2Info{
|
||||||
pub locations:Vec<GetAssetV2Location>,
|
pub locations:Vec<GetAssetV2Location>,
|
||||||
pub requestId:String,
|
pub requestId:String,
|
||||||
@@ -162,7 +160,7 @@ pub enum CreatorType{
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct Creator{
|
pub struct Creator{
|
||||||
pub Id:u64,
|
pub Id:u64,
|
||||||
pub Name:String,
|
pub Name:String,
|
||||||
@@ -173,7 +171,7 @@ pub struct Creator{
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetDetails{
|
pub struct AssetDetails{
|
||||||
pub TargetId:u64,
|
pub TargetId:u64,
|
||||||
pub ProductType:Option<String>,
|
pub ProductType:Option<String>,
|
||||||
@@ -209,7 +207,7 @@ pub struct AssetVersionsPageRequest{
|
|||||||
pub cursor:Option<String>,
|
pub cursor:Option<String>,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize,serde::Serialize)]
|
#[derive(serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetVersion{
|
pub struct AssetVersion{
|
||||||
pub Id:u64,
|
pub Id:u64,
|
||||||
pub assetId:u64,
|
pub assetId:u64,
|
||||||
@@ -221,7 +219,7 @@ pub struct AssetVersion{
|
|||||||
pub isPublished:bool,
|
pub isPublished:bool,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct AssetVersionsPageResponse{
|
pub struct AssetVersionsPageResponse{
|
||||||
pub previousPageCursor:Option<String>,
|
pub previousPageCursor:Option<String>,
|
||||||
pub nextPageCursor:Option<String>,
|
pub nextPageCursor:Option<String>,
|
||||||
@@ -257,13 +255,12 @@ pub struct CreationsPageRequest{
|
|||||||
pub cursor:Option<String>,
|
pub cursor:Option<String>,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize,serde::Serialize)]
|
#[derive(serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
|
||||||
pub struct CreationsItem{
|
pub struct CreationsItem{
|
||||||
pub id:u64,
|
pub id:u64,
|
||||||
pub name:String,
|
pub name:String,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize,serde::Serialize)]
|
#[derive(serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct CreationsPageResponse{
|
pub struct CreationsPageResponse{
|
||||||
pub totalResults:u64,//up to 50
|
pub totalResults:u64,//up to 50
|
||||||
pub filteredKeyword:Option<String>,//""
|
pub filteredKeyword:Option<String>,//""
|
||||||
@@ -282,14 +279,14 @@ pub struct UserInventoryPageRequest{
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(serde::Deserialize,serde::Serialize)]
|
#[derive(serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UserInventoryItemOwner{
|
pub struct UserInventoryItemOwner{
|
||||||
pub userId:u64,
|
pub userId:u64,
|
||||||
pub username:String,
|
pub username:String,
|
||||||
pub buildersClubMembershipType:String,
|
pub buildersClubMembershipType:String,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize,serde::Serialize)]
|
#[derive(serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UserInventoryItem{
|
pub struct UserInventoryItem{
|
||||||
pub userAssetId:u64,
|
pub userAssetId:u64,
|
||||||
pub assetId:u64,
|
pub assetId:u64,
|
||||||
@@ -301,7 +298,7 @@ pub struct UserInventoryItem{
|
|||||||
pub updated:chrono::DateTime<chrono::Utc>,
|
pub updated:chrono::DateTime<chrono::Utc>,
|
||||||
}
|
}
|
||||||
#[derive(serde::Deserialize,serde::Serialize)]
|
#[derive(serde::Deserialize,serde::Serialize)]
|
||||||
#[expect(nonstandard_style,dead_code)]
|
#[expect(nonstandard_style)]
|
||||||
pub struct UserInventoryPageResponse{
|
pub struct UserInventoryPageResponse{
|
||||||
pub previousPageCursor:Option<String>,
|
pub previousPageCursor:Option<String>,
|
||||||
pub nextPageCursor:Option<String>,
|
pub nextPageCursor:Option<String>,
|
||||||
|
|||||||
Reference in New Issue
Block a user