mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-22 00:11:02 -05:00
Made interface that represents file on CurseForge
This commit is contained in:
parent
3b9f28eb3a
commit
5358309a4e
1 changed files with 59 additions and 0 deletions
59
src/platforms/curseforge/curseforge-file.ts
Normal file
59
src/platforms/curseforge/curseforge-file.ts
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
import { FileInfo } from "@/utils/io";
|
||||||
|
import { CurseForgeVersionInit } from "./curseforge-version";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a file uploaded to a project on CurseForge.
|
||||||
|
*/
|
||||||
|
export interface CurseForgeFile {
|
||||||
|
/**
|
||||||
|
* The unique identifier for the file.
|
||||||
|
*/
|
||||||
|
id: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The display name of the file.
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The URL to download the file.
|
||||||
|
*/
|
||||||
|
url: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The unique identifier for the project that the file belongs to.
|
||||||
|
*/
|
||||||
|
project_id: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The unique identifier for the version that the file belongs to.
|
||||||
|
*/
|
||||||
|
version_id: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the information required to initialize a CurseForge version file.
|
||||||
|
*/
|
||||||
|
export interface CurseForgeFileInit {
|
||||||
|
/**
|
||||||
|
* The CurseForge version initialization data.
|
||||||
|
*/
|
||||||
|
version: CurseForgeVersionInit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The file path or `FileInfo` object for the file to be uploaded.
|
||||||
|
*/
|
||||||
|
file: string | FileInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A 2D array containing variants of supported game version IDs.
|
||||||
|
*/
|
||||||
|
game_versions: number[][];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parent CurseForge version, if any.
|
||||||
|
*
|
||||||
|
* If this field is not specified, the file will be treated as a standalone version.
|
||||||
|
*/
|
||||||
|
version_id?: number;
|
||||||
|
}
|
Loading…
Reference in a new issue