mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 01:03:50 +02:00
refactor: add type definitions for API responses
This commit is contained in:
50
src/types/common.d.ts
vendored
50
src/types/common.d.ts
vendored
@@ -13,4 +13,54 @@ export interface UnityPackage {
|
||||
unitySortNumber?: number;
|
||||
worldSignature?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// Base content types
|
||||
export interface BaseContent {
|
||||
id: string;
|
||||
name: string;
|
||||
authorId: string;
|
||||
authorName: string;
|
||||
description: string;
|
||||
imageUrl: string;
|
||||
thumbnailImageUrl: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
releaseStatus: string;
|
||||
tags: string[];
|
||||
featured: boolean;
|
||||
unityPackages: UnityPackage[];
|
||||
}
|
||||
|
||||
// Base Avatar - core avatar properties
|
||||
export interface BaseAvatar extends BaseContent {
|
||||
acknowledgements: string | null;
|
||||
pendingUpload: boolean;
|
||||
performance: {
|
||||
[platform: string]: string | number;
|
||||
};
|
||||
searchable: boolean;
|
||||
styles: {
|
||||
primary: string | null;
|
||||
secondary: string | null;
|
||||
};
|
||||
unityPackageUrl: string;
|
||||
unityPackageUrlObject: {
|
||||
unityPackageUrl: string;
|
||||
};
|
||||
version: number;
|
||||
}
|
||||
|
||||
// Base World - core world properties
|
||||
export interface BaseWorld extends BaseContent {
|
||||
capacity: number;
|
||||
recommendedCapacity: number;
|
||||
favorites: number;
|
||||
heat: number;
|
||||
popularity: number;
|
||||
previewYoutubeId: string | null;
|
||||
publicationDate: string;
|
||||
labsPublicationDate: string;
|
||||
organization: string;
|
||||
udonProducts: any[];
|
||||
}
|
||||
Reference in New Issue
Block a user