You've already forked AstralRinth
forked from didirus/AstralRinth
7877 lines
253 KiB
TypeScript
7877 lines
253 KiB
TypeScript
/**
|
|
* This file was auto-generated by openapi-typescript.
|
|
* Do not make direct changes to the file.
|
|
*/
|
|
|
|
export interface paths {
|
|
"/search": {
|
|
get: operations["searchProjects"];
|
|
};
|
|
"/project/{id|slug}": {
|
|
get: operations["getProject"];
|
|
delete: operations["deleteProject"];
|
|
patch: operations["modifyProject"];
|
|
};
|
|
"/projects": {
|
|
get: operations["getProjects"];
|
|
};
|
|
"/project": {
|
|
post: operations["createProject"];
|
|
};
|
|
"/project/{id|slug}/check": {
|
|
get: operations["checkProjectValidity"];
|
|
};
|
|
"/project/{id|slug}/gallery": {
|
|
/** Modrinth allows you to upload files of up to 5MiB to a project's gallery. */
|
|
post: operations["addGalleryImage"];
|
|
delete: operations["deleteGalleryImage"];
|
|
patch: operations["modifyGalleryImage"];
|
|
};
|
|
"/project/{id|slug}/dependencies": {
|
|
get: operations["getDependencies"];
|
|
};
|
|
"/project/{id|slug}/follow": {
|
|
post: operations["followProject"];
|
|
delete: operations["unfollowProject"];
|
|
};
|
|
"/project/{id|slug}/version": {
|
|
get: operations["getProjectVersions"];
|
|
};
|
|
"/version/{id}": {
|
|
get: operations["getVersion"];
|
|
delete: operations["deleteVersion"];
|
|
patch: operations["modifyVersion"];
|
|
};
|
|
"/version": {
|
|
/** Project files are attached. `.mrpack` and `.jar` files are accepted. */
|
|
post: operations["createVersion"];
|
|
};
|
|
"/versions": {
|
|
get: operations["getVersions"];
|
|
};
|
|
"/version/{id}/file": {
|
|
/** Project files are attached. `.mrpack` and `.jar` files are accepted. */
|
|
post: operations["addFilesToVersion"];
|
|
};
|
|
"/version_file/{hash}": {
|
|
get: operations["versionFromHash"];
|
|
delete: operations["deleteFileFromHash"];
|
|
};
|
|
"/version_file/{hash}/update": {
|
|
post: operations["getLatestVersionFromHash"];
|
|
};
|
|
"/version_files": {
|
|
/** This is the same as [`/version_file/{hash}`](#operation/versionFromHash) except it accepts multiple hashes. */
|
|
post: operations["versionsFromHashes"];
|
|
};
|
|
"/version_files/update": {
|
|
/** This is the same as [`/version_file/{hash}/update`](#operation/getLatestVersionFromHash) except it accepts multiple hashes. */
|
|
post: operations["getLatestVersionsFromHashes"];
|
|
};
|
|
"/user/{id|username}": {
|
|
get: operations["getUser"];
|
|
delete: operations["deleteUser"];
|
|
patch: operations["modifyUser"];
|
|
};
|
|
"/user": {
|
|
get: operations["getUserFromAuth"];
|
|
};
|
|
"/users": {
|
|
get: operations["getUsers"];
|
|
};
|
|
"/user/{id|username}/icon": {
|
|
/** By default, Modrinth uses a user's GitHub icon. This route allows it to be changed to a custom one. The new avatar may be up to 2MiB in size. */
|
|
patch: operations["changeUserIcon"];
|
|
};
|
|
"/user/{id|username}/projects": {
|
|
get: operations["getUserProjects"];
|
|
};
|
|
"/user/{id|username}/notifications": {
|
|
/** Notifications can be project updates or team invites */
|
|
get: operations["getNotifications"];
|
|
};
|
|
"/user/{id|username}/follows": {
|
|
get: operations["getFollowedProjects"];
|
|
};
|
|
"/report": {
|
|
get: operations["getReports"];
|
|
/** Bring a project, user, or version to the attention of the moderators by reporting it. You must be logged in to report anything. */
|
|
post: operations["submitReport"];
|
|
};
|
|
"/project/{id|slug}/members": {
|
|
get: operations["getProjectTeamMembers"];
|
|
};
|
|
"/team/{id}/members": {
|
|
get: operations["getTeamMembers"];
|
|
post: operations["addTeamMember"];
|
|
};
|
|
"/team/{id}/join": {
|
|
post: operations["joinTeam"];
|
|
};
|
|
"/team/{team_id}/members/{user_id}": {
|
|
delete: operations["deleteTeamMember"];
|
|
patch: operations["modifyTeamMember"];
|
|
};
|
|
"/team/{id}/owner": {
|
|
post: operations["transferTeamOwnership"];
|
|
};
|
|
"/tag/category": {
|
|
/** Gets an array of categories, their icons, and applicable project types */
|
|
get: operations["categoryList"];
|
|
};
|
|
"/tag/loader": {
|
|
/** Gets an array of loaders, their icons, and supported project types */
|
|
get: operations["loaderList"];
|
|
};
|
|
"/tag/game_version": {
|
|
/** Gets an array of game versions and information about them */
|
|
get: operations["versionList"];
|
|
};
|
|
"/tag/license": {
|
|
/** Gets an array of licenses and information about them */
|
|
get: operations["licenseList"];
|
|
};
|
|
"/tag/donation_platform": {
|
|
/** Gets an array of donation platforms and information about them */
|
|
get: operations["donationPlatformList"];
|
|
};
|
|
"/tag/report_type": {
|
|
/** Gets an array of valid report types */
|
|
get: operations["reportTypeList"];
|
|
};
|
|
"/moderation/projects": {
|
|
get: operations["getModerationProjects"];
|
|
};
|
|
}
|
|
|
|
export interface components {
|
|
schemas: {
|
|
BaseVersion: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type: "required" | "optional" | "incompatible" | "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
};
|
|
EditableVersion: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type: "required" | "optional" | "incompatible" | "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & {
|
|
/**
|
|
* @description The hash format and the hash of the new primary file
|
|
* @example [
|
|
* "sha1",
|
|
* "aaaabbbbccccddddeeeeffffgggghhhhiiiijjjj"
|
|
* ]
|
|
*/
|
|
primary_file?: string[];
|
|
};
|
|
CreatableVersion: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type: "required" | "optional" | "incompatible" | "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
file_parts: string[];
|
|
/** @description The multipart field name of the primary file */
|
|
primary_file?: string;
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
Version: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type: "required" | "optional" | "incompatible" | "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
BaseProject: {
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
};
|
|
ServerRenderedProject: {
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
};
|
|
ProjectResult: ({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) & {
|
|
/**
|
|
* @description The ID of the project
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The username of the project's author
|
|
* @example my_user
|
|
*/
|
|
author: string;
|
|
/**
|
|
* @description A list of the minecraft versions supported by the project
|
|
* @example [
|
|
* "1.8",
|
|
* "1.8.9"
|
|
* ]
|
|
*/
|
|
versions: string[];
|
|
/** @description The total number of users following the project */
|
|
follows: number;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was created
|
|
*/
|
|
date_created: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last modified
|
|
*/
|
|
date_modified: string;
|
|
/**
|
|
* @description The latest version of minecraft that this project supports
|
|
* @example 1.8.9
|
|
*/
|
|
latest_version?: string;
|
|
/**
|
|
* @description The license of the project
|
|
* @example mit
|
|
*/
|
|
license: string;
|
|
/**
|
|
* @description All gallery images attached to the project
|
|
* @example [
|
|
* "https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png",
|
|
* "https://cdn.modrinth.com/data/AABBCCDD/images/c21776867afb6046fdc3c21dbcf5cc50ae27a236.png"
|
|
* ]
|
|
*/
|
|
gallery?: string[];
|
|
};
|
|
NonSearchProject: {
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
};
|
|
ModifiableProject: ({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) & {
|
|
/**
|
|
* @description The license ID of a project, retrieved from the license tag route
|
|
* @example lgpl-3
|
|
*/
|
|
license_id?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
license_url?: string | null;
|
|
};
|
|
EditableProject: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) & {
|
|
/**
|
|
* @description The license ID of a project, retrieved from the license tag route
|
|
* @example lgpl-3
|
|
*/
|
|
license_id?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
license_url?: string | null;
|
|
}) & {
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status?:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The title of the moderators' message for the project */
|
|
moderation_message?: string | null;
|
|
/** @description The body of the moderators' message for the project */
|
|
moderation_message_body?: string | null;
|
|
};
|
|
CreatableProject: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) & {
|
|
/**
|
|
* @description The license ID of a project, retrieved from the license tag route
|
|
* @example lgpl-3
|
|
*/
|
|
license_id?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
license_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @example modpack
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description A list of initial versions to upload with the created project (required unless `is_draft` is true) */
|
|
initial_versions?: ({
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & {
|
|
/**
|
|
* @description The hash format and the hash of the new primary file
|
|
* @example [
|
|
* "sha1",
|
|
* "aaaabbbbccccddddeeeeffffgggghhhhiiiijjjj"
|
|
* ]
|
|
*/
|
|
primary_file?: string[];
|
|
})[];
|
|
/**
|
|
* @description Whether the project should be saved as a draft instead of being sent to moderation for review
|
|
* @example true
|
|
*/
|
|
is_draft?: boolean;
|
|
gallery_items?: ({
|
|
/** @description The name of the multipart item where the gallery media is located */
|
|
item?: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
} | null)[];
|
|
} & {
|
|
slug: unknown;
|
|
title: unknown;
|
|
description: unknown;
|
|
body: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
license_id: unknown;
|
|
});
|
|
Project: ({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
});
|
|
ProjectDependencyList: {
|
|
/** @description Projects that the project depends upon */
|
|
projects?: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
}))[];
|
|
/** @description Versions that the project depends upon */
|
|
versions?: ({
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
}))[];
|
|
};
|
|
SearchResults: {
|
|
/** @description The list of results */
|
|
hits: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) & {
|
|
/**
|
|
* @description The ID of the project
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The username of the project's author
|
|
* @example my_user
|
|
*/
|
|
author: string;
|
|
/**
|
|
* @description A list of the minecraft versions supported by the project
|
|
* @example [
|
|
* "1.8",
|
|
* "1.8.9"
|
|
* ]
|
|
*/
|
|
versions: string[];
|
|
/** @description The total number of users following the project */
|
|
follows: number;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was created
|
|
*/
|
|
date_created: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last modified
|
|
*/
|
|
date_modified: string;
|
|
/**
|
|
* @description The latest version of minecraft that this project supports
|
|
* @example 1.8.9
|
|
*/
|
|
latest_version?: string;
|
|
/**
|
|
* @description The license of the project
|
|
* @example mit
|
|
*/
|
|
license: string;
|
|
/**
|
|
* @description All gallery images attached to the project
|
|
* @example [
|
|
* "https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png",
|
|
* "https://cdn.modrinth.com/data/AABBCCDD/images/c21776867afb6046fdc3c21dbcf5cc50ae27a236.png"
|
|
* ]
|
|
*/
|
|
gallery?: string[];
|
|
})[];
|
|
/**
|
|
* @description The number of results that were skipped by the query
|
|
* @example 0
|
|
*/
|
|
offset: number;
|
|
/**
|
|
* @description The number of results that were returned by the query
|
|
* @example 10
|
|
*/
|
|
limit: number;
|
|
/**
|
|
* @description The total number of results that match the query
|
|
* @example 10
|
|
*/
|
|
total_hits: number;
|
|
};
|
|
EditableUser: {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
};
|
|
User: {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
};
|
|
Notification: {
|
|
/**
|
|
* @description The id of the notification
|
|
* @example UUVVWWXX
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The id of the user who received the notification
|
|
* @example EEFFGGHH
|
|
*/
|
|
user_id: string;
|
|
/**
|
|
* @description The type of notification
|
|
* @example project_update
|
|
* @enum {string}
|
|
*/
|
|
type?: "project_update" | "team_invite";
|
|
/**
|
|
* @description The title of the notification
|
|
* @example **My Project** has been updated!
|
|
*/
|
|
title: string;
|
|
/**
|
|
* @description The body text of the notification
|
|
* @example The project, My Project, has released a new version: 1.0.0
|
|
*/
|
|
text: string;
|
|
/**
|
|
* @description A link to the related project or version
|
|
* @example mod/AABBCCDD/version/IIJJKKLL
|
|
*/
|
|
link: string;
|
|
/**
|
|
* @description Whether the notification has been read or not
|
|
* @example false
|
|
*/
|
|
read: boolean;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the notification was created
|
|
*/
|
|
created: string;
|
|
/** @description A list of actions that can be performed */
|
|
actions: ({ [key: string]: unknown } | null)[];
|
|
};
|
|
CreatableReport: {
|
|
/**
|
|
* @description The type of the report being sent
|
|
* @example copyright
|
|
*/
|
|
report_type: string;
|
|
/**
|
|
* @description The ID of the item (project, version, or user) being reported
|
|
* @example EEFFGGHH
|
|
*/
|
|
item_id: string;
|
|
/**
|
|
* @description The type of the item being reported
|
|
* @example project
|
|
* @enum {string}
|
|
*/
|
|
item_type: "project" | "user" | "version";
|
|
/**
|
|
* @description The extended explanation of the report
|
|
* @example This is a reupload of my mod, AABBCCDD!
|
|
*/
|
|
body: string;
|
|
};
|
|
Report: {
|
|
/**
|
|
* @description The type of the report being sent
|
|
* @example copyright
|
|
*/
|
|
report_type: string;
|
|
/**
|
|
* @description The ID of the item (project, version, or user) being reported
|
|
* @example EEFFGGHH
|
|
*/
|
|
item_id: string;
|
|
/**
|
|
* @description The type of the item being reported
|
|
* @example project
|
|
* @enum {string}
|
|
*/
|
|
item_type: "project" | "user" | "version";
|
|
/**
|
|
* @description The extended explanation of the report
|
|
* @example This is a reupload of my mod, AABBCCDD!
|
|
*/
|
|
body: string;
|
|
} & {
|
|
/**
|
|
* @description The ID of the user who reported the item
|
|
* @example UUVVWWXX
|
|
*/
|
|
reporter: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the report was created
|
|
*/
|
|
created: string;
|
|
};
|
|
TeamMember: {
|
|
/**
|
|
* @description The ID of the team this team member is a member of
|
|
* @example MMNNOOPP
|
|
*/
|
|
team_id: string;
|
|
user: {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
};
|
|
/**
|
|
* @description The user's role on the team
|
|
* @example Member
|
|
*/
|
|
role: string;
|
|
/**
|
|
* Format: bitflag
|
|
* @description The user's permissions in bitflag format (requires authorization to view)
|
|
*
|
|
* In order from first to eighth bit, the bits are:
|
|
* - UPLOAD_VERSION
|
|
* - DELETE_VERSION
|
|
* - EDIT_DETAILS
|
|
* - EDIT_BODY
|
|
* - MANAGE_INVITES
|
|
* - REMOVE_MEMBER
|
|
* - EDIT_MEMBER
|
|
* - DELETE_PROJECT
|
|
*
|
|
* @example 127
|
|
*/
|
|
permissions?: number;
|
|
/**
|
|
* @description Whether or not the user has accepted to be on the team (requires authorization to view)
|
|
* @example true
|
|
*/
|
|
accepted: boolean;
|
|
};
|
|
CategoryTag: {
|
|
/**
|
|
* @description The SVG icon of a category
|
|
* @example <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"/></svg>
|
|
*/
|
|
icon: string;
|
|
/**
|
|
* @description The name of the category
|
|
* @example adventure
|
|
*/
|
|
name: string;
|
|
/**
|
|
* @description The project type this category is applicable to
|
|
* @example mod
|
|
*/
|
|
project_type: string;
|
|
};
|
|
LoaderTag: {
|
|
/**
|
|
* @description The SVG icon of a loader
|
|
* @example <svg viewBox="0 0 276 288" fill="none" stroke="currentColor" stroke-width="23" stroke-linecap="round" stroke-linejoin="round"><g transform="matrix(1,0,0,1,-3302.43,-67.3276)"><g transform="matrix(0.564163,0,0,1.70346,1629.87,0)"><g transform="matrix(1.97801,-0.0501803,0.151517,0.655089,1678.7,-354.14)"><g><path d="M820.011,761.092C798.277,738.875 754.809,694.442 734.36,673.389C729.774,668.668 723.992,663.75 708.535,674.369C688.629,688.043 700.073,696.251 703.288,699.785C711.508,708.824 787.411,788.803 800.523,803.818C802.95,806.597 780.243,781.318 793.957,764.065C799.444,757.163 811.985,752.043 820.011,761.092C826.534,768.447 830.658,779.178 816.559,790.826C791.91,811.191 714.618,873.211 689.659,893.792C677.105,904.144 661.053,896.143 653.827,887.719C646.269,878.908 623.211,853.212 602.539,829.646C596.999,823.332 598.393,810.031 604.753,804.545C639.873,774.253 696.704,730.787 716.673,713.831"/></g></g></g></g></svg>
|
|
*/
|
|
icon: string;
|
|
/**
|
|
* @description The name of the loader
|
|
* @example fabric
|
|
*/
|
|
name: string;
|
|
/**
|
|
* @description The project types that this loader is applicable to
|
|
* @example [
|
|
* "mod",
|
|
* "modpack"
|
|
* ]
|
|
*/
|
|
supported_project_types: string[];
|
|
};
|
|
GameVersionTag: {
|
|
/**
|
|
* @description The name/number of the game version
|
|
* @example 1.18.1
|
|
*/
|
|
version: string;
|
|
/**
|
|
* @description The type of the game version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type: "release" | "snapshot" | "alpha" | "beta";
|
|
/**
|
|
* Format: date-time
|
|
* @description The date of the game version release
|
|
*/
|
|
date: string;
|
|
/**
|
|
* @description Whether or not this is a major version, used for Featured Versions
|
|
* @example true
|
|
*/
|
|
major: boolean;
|
|
};
|
|
LicenseTag: {
|
|
/**
|
|
* @description The short identifier of the license
|
|
* @example lgpl-3
|
|
*/
|
|
short: string;
|
|
/**
|
|
* @description The full name of the license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name: string;
|
|
};
|
|
DonationPlatformTag: {
|
|
/**
|
|
* @description The short identifier of the donation platform
|
|
* @example bmac
|
|
*/
|
|
short: string;
|
|
/**
|
|
* @description The full name of the donation platform
|
|
* @example Buy Me a Coffee
|
|
*/
|
|
name: string;
|
|
};
|
|
InvalidInputError: {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
AuthError: {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
parameters: {
|
|
/** @description The ID or slug of the project */
|
|
ProjectIdentifier: string;
|
|
/** @description The ID or username of the user */
|
|
UserIdentifier: string;
|
|
/** @description The ID of the version */
|
|
VersionIdentifier: string;
|
|
/** @description The ID of the team */
|
|
TeamIdentifier: string;
|
|
/** @description The algorithm of the hash */
|
|
AlgorithmIdentifier: "sha1" | "sha512";
|
|
/** @description The hash of the file, considering its byte content, and encoded in hexadecimal */
|
|
FileHashIdentifier: string;
|
|
};
|
|
}
|
|
|
|
export interface operations {
|
|
searchProjects: {
|
|
parameters: {
|
|
query: {
|
|
/** The query to search for */
|
|
query?: string;
|
|
/** The recommended way of filtering search results. [Learn more about using facets.](/docs/tutorials/api_search) */
|
|
facets?: string[][];
|
|
/** The sorting method used for sorting search results */
|
|
index?: "relevance" | "downloads" | "follows" | "newest" | "updated";
|
|
/** The offset into the search. Skips this number of results */
|
|
offset?: number;
|
|
/** The number of results returned by the search */
|
|
limit?: number;
|
|
/** A list of filters relating to the properties of a project. Use filters when there isn't an available facet for your needs. [More information](https://docs.meilisearch.com/reference/features/filtering.html) */
|
|
filters?: string;
|
|
/** @deprecated A list of filters relating to the versions of a project. Use of facets for filtering by version is recommended */
|
|
version?: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Search results */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/** @description The list of results */
|
|
hits: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) & {
|
|
/**
|
|
* @description The ID of the project
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The username of the project's author
|
|
* @example my_user
|
|
*/
|
|
author: string;
|
|
/**
|
|
* @description A list of the minecraft versions supported by the project
|
|
* @example [
|
|
* "1.8",
|
|
* "1.8.9"
|
|
* ]
|
|
*/
|
|
versions: string[];
|
|
/** @description The total number of users following the project */
|
|
follows: number;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was created
|
|
*/
|
|
date_created: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last modified
|
|
*/
|
|
date_modified: string;
|
|
/**
|
|
* @description The latest version of minecraft that this project supports
|
|
* @example 1.8.9
|
|
*/
|
|
latest_version?: string;
|
|
/**
|
|
* @description The license of the project
|
|
* @example mit
|
|
*/
|
|
license: string;
|
|
/**
|
|
* @description All gallery images attached to the project
|
|
* @example [
|
|
* "https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png",
|
|
* "https://cdn.modrinth.com/data/AABBCCDD/images/c21776867afb6046fdc3c21dbcf5cc50ae27a236.png"
|
|
* ]
|
|
*/
|
|
gallery?: string[];
|
|
})[];
|
|
/**
|
|
* @description The number of results that were skipped by the query
|
|
* @example 0
|
|
*/
|
|
offset: number;
|
|
/**
|
|
* @description The number of results that were returned by the query
|
|
* @example 10
|
|
*/
|
|
limit: number;
|
|
/**
|
|
* @description The total number of results that match the query
|
|
* @example 10
|
|
*/
|
|
total_hits: number;
|
|
};
|
|
};
|
|
};
|
|
/** Invalid request */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getProject: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": ({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
});
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
};
|
|
deleteProject: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Project deleted successfully */
|
|
204: never;
|
|
/** The requested project was not found */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No valid authorization to delete this project */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
modifyProject: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Project modified successfully */
|
|
204: never;
|
|
/** No authorization to edit this project */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
/** Modified project fields */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) & {
|
|
/**
|
|
* @description The license ID of a project, retrieved from the license tag route
|
|
* @example lgpl-3
|
|
*/
|
|
license_id?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
license_url?: string | null;
|
|
}) & {
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status?:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The title of the moderators' message for the project */
|
|
moderation_message?: string | null;
|
|
/** @description The body of the moderators' message for the project */
|
|
moderation_message_body?: string | null;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getProjects: {
|
|
parameters: {
|
|
query: {
|
|
/** The IDs of the projects */
|
|
ids: string[];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
createProject: {
|
|
responses: {
|
|
/** Project successfully created */
|
|
200: {
|
|
content: {
|
|
"application/json": ({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
});
|
|
};
|
|
};
|
|
/** Invalid request */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to create a project */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** New project */
|
|
requestBody: {
|
|
content: {
|
|
"multipart/form-data": {
|
|
data: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) & {
|
|
/**
|
|
* @description The license ID of a project, retrieved from the license tag route
|
|
* @example lgpl-3
|
|
*/
|
|
license_id?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
license_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @example modpack
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description A list of initial versions to upload with the created project (required unless `is_draft` is true) */
|
|
initial_versions?: ({
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & {
|
|
/**
|
|
* @description The hash format and the hash of the new primary file
|
|
* @example [
|
|
* "sha1",
|
|
* "aaaabbbbccccddddeeeeffffgggghhhhiiiijjjj"
|
|
* ]
|
|
*/
|
|
primary_file?: string[];
|
|
})[];
|
|
/**
|
|
* @description Whether the project should be saved as a draft instead of being sent to moderation for review
|
|
* @example true
|
|
*/
|
|
is_draft?: boolean;
|
|
gallery_items?: ({
|
|
/** @description The name of the multipart item where the gallery media is located */
|
|
item?: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
} | null)[];
|
|
} & {
|
|
slug: unknown;
|
|
title: unknown;
|
|
description: unknown;
|
|
body: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
license_id: unknown;
|
|
});
|
|
/**
|
|
* Format: binary
|
|
* @description Project icon file
|
|
* @enum {string}
|
|
*/
|
|
icon?:
|
|
| "*.png"
|
|
| "*.jpg"
|
|
| "*.jpeg"
|
|
| "*.bmp"
|
|
| "*.gif"
|
|
| "*.webp"
|
|
| "*.svg"
|
|
| "*.svgz"
|
|
| "*.rgb";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
checkProjectValidity: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/** @example AABBCCDD */
|
|
id?: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested project was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
/** Modrinth allows you to upload files of up to 5MiB to a project's gallery. */
|
|
addGalleryImage: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
query: {
|
|
/** Image extension */
|
|
ext:
|
|
| "png"
|
|
| "jpg"
|
|
| "jpeg"
|
|
| "bmp"
|
|
| "gif"
|
|
| "webp"
|
|
| "svg"
|
|
| "svgz"
|
|
| "rgb";
|
|
/** Whether an image is featured */
|
|
featured: boolean;
|
|
/** Title of the image */
|
|
title?: string;
|
|
/** Description of the image */
|
|
description?: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Gallery image successfully created */
|
|
204: never;
|
|
/** Invalid request */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to create a gallery image */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
/** New gallery image */
|
|
requestBody: {
|
|
content: {
|
|
"image/*": string;
|
|
};
|
|
};
|
|
};
|
|
deleteGalleryImage: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
query: {
|
|
/** URL link of the image to delete */
|
|
url: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Gallery image deleted successfully */
|
|
204: never;
|
|
/** Invalid URL or project specified */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to delete this gallery image */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
modifyGalleryImage: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
query: {
|
|
/** URL link of the image to modify */
|
|
url: string;
|
|
/** Whether the image is featured */
|
|
featured: boolean;
|
|
/** New title of the image */
|
|
title?: string;
|
|
/** New description of the image */
|
|
description?: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Gallery image modified successfully */
|
|
204: never;
|
|
/** No authorization to edit this gallery image */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
};
|
|
getDependencies: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/** @description Projects that the project depends upon */
|
|
projects?: (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
}))[];
|
|
/** @description Versions that the project depends upon */
|
|
versions?: ({
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
};
|
|
followProject: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
204: never;
|
|
/** You are already following the specified project or the requested project was not found */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to follow a project */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
unfollowProject: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
204: never;
|
|
/** You are not following the specified project or the requested project was not found */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to unfollow a project */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getProjectVersions: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
query: {
|
|
/** The types of loaders to filter for */
|
|
loaders?: string[];
|
|
/** The game versions to filter for */
|
|
game_versions?: string[];
|
|
/** Allows to filter for featured or non-featured versions only */
|
|
featured?: boolean;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": ({
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
};
|
|
getVersion: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the version */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
/** The requested version was not found or no authorization to see this version */
|
|
404: unknown;
|
|
};
|
|
};
|
|
deleteVersion: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the version */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Version deleted successfully */
|
|
204: never;
|
|
/** No authorization to delete this version */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested version was not found or no authorization to see this version */
|
|
404: unknown;
|
|
};
|
|
};
|
|
modifyVersion: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the version */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Version modified successfully */
|
|
204: never;
|
|
/** No authorization to edit this version */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested version was not found or no authorization to see this version */
|
|
404: unknown;
|
|
};
|
|
/** Modified version fields */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & {
|
|
/**
|
|
* @description The hash format and the hash of the new primary file
|
|
* @example [
|
|
* "sha1",
|
|
* "aaaabbbbccccddddeeeeffffgggghhhhiiiijjjj"
|
|
* ]
|
|
*/
|
|
primary_file?: string[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Project files are attached. `.mrpack` and `.jar` files are accepted. */
|
|
createVersion: {
|
|
responses: {
|
|
/** Version successfully created */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
/** Invalid request */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to create this version */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** New version */
|
|
requestBody: {
|
|
content: {
|
|
"multipart/form-data": {
|
|
data: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
file_parts: string[];
|
|
/** @description The multipart field name of the primary file */
|
|
primary_file?: string;
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getVersions: {
|
|
parameters: {
|
|
query: {
|
|
/** The IDs of the versions */
|
|
ids: string[];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": ({
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Project files are attached. `.mrpack` and `.jar` files are accepted. */
|
|
addFilesToVersion: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the version */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Version modified successfully */
|
|
204: never;
|
|
/** No authorization to modify this version */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested version was not found or no authorization to see this version */
|
|
404: unknown;
|
|
};
|
|
/** New version files */
|
|
requestBody: {
|
|
content: {
|
|
"multipart/form-data": {
|
|
/** @enum {object} */
|
|
data?: {};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
versionFromHash: {
|
|
parameters: {
|
|
path: {
|
|
/** The hash of the file, considering its byte content, and encoded in hexadecimal */
|
|
hash: string;
|
|
};
|
|
query: {
|
|
/** The algorithm of the hash */
|
|
algorithm: "sha1" | "sha512";
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
/** The requested version file was not found or no authorization to see this version */
|
|
404: unknown;
|
|
};
|
|
};
|
|
deleteFileFromHash: {
|
|
parameters: {
|
|
path: {
|
|
/** The hash of the file, considering its byte content, and encoded in hexadecimal */
|
|
hash: string;
|
|
};
|
|
query: {
|
|
/** The algorithm of the hash */
|
|
algorithm: "sha1" | "sha512";
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
204: never;
|
|
/** No authorization to delete this version */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested version was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
getLatestVersionFromHash: {
|
|
parameters: {
|
|
path: {
|
|
/** The hash of the file, considering its byte content, and encoded in hexadecimal */
|
|
hash: string;
|
|
};
|
|
query: {
|
|
/** The algorithm of the hash */
|
|
algorithm: "sha1" | "sha512";
|
|
};
|
|
};
|
|
responses: {
|
|
/** Latest version retrieved successfully */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
/** Input is invalid */
|
|
400: unknown;
|
|
/** The requested version was not found or no authorization to see this version */
|
|
404: unknown;
|
|
};
|
|
/** Parameters of the updated version requested */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
loaders: string[];
|
|
/**
|
|
* @example [
|
|
* "1.18",
|
|
* "1.18.1"
|
|
* ]
|
|
*/
|
|
game_versions: string[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** This is the same as [`/version_file/{hash}`](#operation/versionFromHash) except it accepts multiple hashes. */
|
|
versionsFromHashes: {
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
your_hash_here?: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
};
|
|
/** Input is invalid */
|
|
400: unknown;
|
|
};
|
|
/** Hashes and algorithm of the versions requested */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @example [
|
|
* "ea0f38408102e4d2efd53c2cc11b88b711996b48d8922f76ea6abf731219c5bd1efe39ddf9cce77c54d49a62ff10fb685c00d2e4c524ab99d20f6296677ab2c4",
|
|
* "925a5c4899affa4098d997dfa4a4cb52c636d539e94bc489d1fa034218cb96819a70eb8b01647a39316a59fcfe223c1a8c05ed2e2ae5f4c1e75fa48f6af1c960"
|
|
* ]
|
|
*/
|
|
hashes: string[];
|
|
/**
|
|
* @example sha512
|
|
* @enum {string}
|
|
*/
|
|
algorithm: "sha1" | "sha512";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** This is the same as [`/version_file/{hash}/update`](#operation/getLatestVersionFromHash) except it accepts multiple hashes. */
|
|
getLatestVersionsFromHashes: {
|
|
responses: {
|
|
/** Latest versions retrieved successfully */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
your_hash_here?: {
|
|
/**
|
|
* @description The name of this version
|
|
* @example Version 1.0.0
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The version number. Ideally will follow semantic versioning
|
|
* @example 1.0.0
|
|
*/
|
|
version_number?: string;
|
|
/**
|
|
* @description The changelog for this version
|
|
* @example List of changes in this version: ...
|
|
*/
|
|
changelog?: string | null;
|
|
/** @description A list of specific versions of projects that this version depends on */
|
|
dependencies?: ({
|
|
/**
|
|
* @description The ID of the version that this version depends on
|
|
* @example IIJJKKLL
|
|
*/
|
|
version_id?: string | null;
|
|
/**
|
|
* @description The ID of the project that this version depends on
|
|
* @example QQRRSSTT
|
|
*/
|
|
project_id?: string | null;
|
|
/**
|
|
* @description The type of dependency that this version has
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
dependency_type:
|
|
| "required"
|
|
| "optional"
|
|
| "incompatible"
|
|
| "embedded";
|
|
} | null)[];
|
|
/**
|
|
* @description A list of versions of Minecraft that this version supports
|
|
* @example [
|
|
* "1.16.5",
|
|
* "1.17.1"
|
|
* ]
|
|
*/
|
|
game_versions?: string[];
|
|
/**
|
|
* @description The release channel for this version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type?: "release" | "beta" | "alpha";
|
|
/**
|
|
* @description The mod loaders that this version supports
|
|
* @example [
|
|
* "fabric",
|
|
* "forge"
|
|
* ]
|
|
*/
|
|
loaders?: string[];
|
|
/**
|
|
* @description Whether the version is featured or not
|
|
* @example true
|
|
*/
|
|
featured?: boolean;
|
|
} & ({
|
|
/**
|
|
* @description The ID of the version, encoded as a base62 string
|
|
* @example IIJJKKLL
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the project this version is for
|
|
* @example AABBCCDD
|
|
*/
|
|
project_id: string;
|
|
/**
|
|
* @description The ID of the author who published this version
|
|
* @example EEFFGGHH
|
|
*/
|
|
author_id: string;
|
|
/** Format: date-time */
|
|
date_published: string;
|
|
/** @description The number of times this version has been downloaded */
|
|
downloads: number;
|
|
/**
|
|
* @deprecated
|
|
* @description A link to the changelog for this version
|
|
* @example null
|
|
*/
|
|
changelog_url?: string | null;
|
|
/** @description A list of files available for download for this version */
|
|
files: {
|
|
/** @description A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash. */
|
|
hashes: {
|
|
/** @example 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f */
|
|
sha512?: string;
|
|
/** @example c84dd4b3580c02b79958a0590afd5783d80ef504 */
|
|
sha1?: string;
|
|
};
|
|
/**
|
|
* @description A direct link to the file
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description The name of the file
|
|
* @example my_file.jar
|
|
*/
|
|
filename: string;
|
|
/** @example false */
|
|
primary: boolean;
|
|
/**
|
|
* @description The size of the file in bytes
|
|
* @example 1097270
|
|
*/
|
|
size: number;
|
|
}[];
|
|
} & {
|
|
name: unknown;
|
|
version_number: unknown;
|
|
game_versions: unknown;
|
|
version_type: unknown;
|
|
loaders: unknown;
|
|
featured: unknown;
|
|
});
|
|
};
|
|
};
|
|
};
|
|
/** Input is invalid */
|
|
400: unknown;
|
|
};
|
|
/** Parameters of the updated version requested */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @example [
|
|
* "ea0f38408102e4d2efd53c2cc11b88b711996b48d8922f76ea6abf731219c5bd1efe39ddf9cce77c54d49a62ff10fb685c00d2e4c524ab99d20f6296677ab2c4",
|
|
* "925a5c4899affa4098d997dfa4a4cb52c636d539e94bc489d1fa034218cb96819a70eb8b01647a39316a59fcfe223c1a8c05ed2e2ae5f4c1e75fa48f6af1c960"
|
|
* ]
|
|
*/
|
|
hashes: string[];
|
|
/**
|
|
* @example sha512
|
|
* @enum {string}
|
|
*/
|
|
algorithm: "sha1" | "sha512";
|
|
/**
|
|
* @example [
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
loaders: string[];
|
|
/**
|
|
* @example [
|
|
* "1.18",
|
|
* "1.18.1"
|
|
* ]
|
|
*/
|
|
game_versions: string[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getUser: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
};
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
deleteUser: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** User deleted successfully */
|
|
204: never;
|
|
/** No authorization to delete this user */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
modifyUser: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** User modified successfully */
|
|
204: never;
|
|
/** No authorization to modify this user */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
/** Modified user fields */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getUserFromAuth: {
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
};
|
|
};
|
|
};
|
|
/** No authorization token given */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getUsers: {
|
|
parameters: {
|
|
query: {
|
|
/** The IDs of the users */
|
|
ids: string[];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": ({
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
})[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** By default, Modrinth uses a user's GitHub icon. This route allows it to be changed to a custom one. The new avatar may be up to 2MiB in size. */
|
|
changeUserIcon: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Avatar changed successfully */
|
|
204: never;
|
|
/** Invalid format for new icon */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
requestBody: {
|
|
content: {
|
|
"multipart/form-data": {};
|
|
};
|
|
};
|
|
};
|
|
getUserProjects: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
/** Notifications can be project updates or team invites */
|
|
getNotifications: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The id of the notification
|
|
* @example UUVVWWXX
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The id of the user who received the notification
|
|
* @example EEFFGGHH
|
|
*/
|
|
user_id: string;
|
|
/**
|
|
* @description The type of notification
|
|
* @example project_update
|
|
* @enum {string}
|
|
*/
|
|
type?: "project_update" | "team_invite";
|
|
/**
|
|
* @description The title of the notification
|
|
* @example **My Project** has been updated!
|
|
*/
|
|
title: string;
|
|
/**
|
|
* @description The body text of the notification
|
|
* @example The project, My Project, has released a new version: 1.0.0
|
|
*/
|
|
text: string;
|
|
/**
|
|
* @description A link to the related project or version
|
|
* @example mod/AABBCCDD/version/IIJJKKLL
|
|
*/
|
|
link: string;
|
|
/**
|
|
* @description Whether the notification has been read or not
|
|
* @example false
|
|
*/
|
|
read: boolean;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the notification was created
|
|
*/
|
|
created: string;
|
|
/** @description A list of actions that can be performed */
|
|
actions: ({ [key: string]: unknown } | null)[];
|
|
}[];
|
|
};
|
|
};
|
|
/** No authorization to get this user's notifications */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
getFollowedProjects: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
/** No authorization to get this user's followed projects */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested user was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
getReports: {
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": ({
|
|
/**
|
|
* @description The type of the report being sent
|
|
* @example copyright
|
|
*/
|
|
report_type: string;
|
|
/**
|
|
* @description The ID of the item (project, version, or user) being reported
|
|
* @example EEFFGGHH
|
|
*/
|
|
item_id: string;
|
|
/**
|
|
* @description The type of the item being reported
|
|
* @example project
|
|
* @enum {string}
|
|
*/
|
|
item_type: "project" | "user" | "version";
|
|
/**
|
|
* @description The extended explanation of the report
|
|
* @example This is a reupload of my mod, AABBCCDD!
|
|
*/
|
|
body: string;
|
|
} & {
|
|
/**
|
|
* @description The ID of the user who reported the item
|
|
* @example UUVVWWXX
|
|
*/
|
|
reporter: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the report was created
|
|
*/
|
|
created: string;
|
|
})[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Bring a project, user, or version to the attention of the moderators by reporting it. You must be logged in to report anything. */
|
|
submitReport: {
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The type of the report being sent
|
|
* @example copyright
|
|
*/
|
|
report_type: string;
|
|
/**
|
|
* @description The ID of the item (project, version, or user) being reported
|
|
* @example EEFFGGHH
|
|
*/
|
|
item_id: string;
|
|
/**
|
|
* @description The type of the item being reported
|
|
* @example project
|
|
* @enum {string}
|
|
*/
|
|
item_type: "project" | "user" | "version";
|
|
/**
|
|
* @description The extended explanation of the report
|
|
* @example This is a reupload of my mod, AABBCCDD!
|
|
*/
|
|
body: string;
|
|
} & {
|
|
/**
|
|
* @description The ID of the user who reported the item
|
|
* @example UUVVWWXX
|
|
*/
|
|
reporter: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the report was created
|
|
*/
|
|
created: string;
|
|
};
|
|
};
|
|
};
|
|
/** Invalid request */
|
|
400: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example invalid_input
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Error while parsing multipart payload
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** No authorization to submit a report */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** The report to be sent */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The type of the report being sent
|
|
* @example copyright
|
|
*/
|
|
report_type: string;
|
|
/**
|
|
* @description The ID of the item (project, version, or user) being reported
|
|
* @example EEFFGGHH
|
|
*/
|
|
item_id: string;
|
|
/**
|
|
* @description The type of the item being reported
|
|
* @example project
|
|
* @enum {string}
|
|
*/
|
|
item_type: "project" | "user" | "version";
|
|
/**
|
|
* @description The extended explanation of the report
|
|
* @example This is a reupload of my mod, AABBCCDD!
|
|
*/
|
|
body: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getProjectTeamMembers: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID or slug of the project */
|
|
"id|slug": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The ID of the team this team member is a member of
|
|
* @example MMNNOOPP
|
|
*/
|
|
team_id: string;
|
|
user: {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
};
|
|
/**
|
|
* @description The user's role on the team
|
|
* @example Member
|
|
*/
|
|
role: string;
|
|
/**
|
|
* Format: bitflag
|
|
* @description The user's permissions in bitflag format (requires authorization to view)
|
|
*
|
|
* In order from first to eighth bit, the bits are:
|
|
* - UPLOAD_VERSION
|
|
* - DELETE_VERSION
|
|
* - EDIT_DETAILS
|
|
* - EDIT_BODY
|
|
* - MANAGE_INVITES
|
|
* - REMOVE_MEMBER
|
|
* - EDIT_MEMBER
|
|
* - DELETE_PROJECT
|
|
*
|
|
* @example 127
|
|
*/
|
|
permissions?: number;
|
|
/**
|
|
* @description Whether or not the user has accepted to be on the team (requires authorization to view)
|
|
* @example true
|
|
*/
|
|
accepted: boolean;
|
|
}[];
|
|
};
|
|
};
|
|
/** The requested project was not found or no authorization to see this project */
|
|
404: unknown;
|
|
};
|
|
};
|
|
getTeamMembers: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the team */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Expected response to a valid request */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The ID of the team this team member is a member of
|
|
* @example MMNNOOPP
|
|
*/
|
|
team_id: string;
|
|
user: {
|
|
/**
|
|
* @description The user's username
|
|
* @example my_user
|
|
*/
|
|
username: string;
|
|
/**
|
|
* @description The user's display name
|
|
* @example My User
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
* Format: email
|
|
* @description The user's email (only your own is ever displayed)
|
|
*/
|
|
email?: string | null;
|
|
/**
|
|
* @description A description of the user
|
|
* @example My short biography
|
|
*/
|
|
bio?: string;
|
|
} & {
|
|
/**
|
|
* @description The user's id
|
|
* @example EEFFGGHH
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The user's github id
|
|
* @example 11223344
|
|
*/
|
|
github_id: number;
|
|
/**
|
|
* @description The user's avatar url
|
|
* @example https://avatars.githubusercontent.com/u/11223344?v=1
|
|
*/
|
|
avatar_url: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The time at which the user was created
|
|
*/
|
|
created: string;
|
|
/**
|
|
* @description The user's role
|
|
* @example developer
|
|
* @enum {string}
|
|
*/
|
|
role: "admin" | "moderator" | "developer";
|
|
};
|
|
/**
|
|
* @description The user's role on the team
|
|
* @example Member
|
|
*/
|
|
role: string;
|
|
/**
|
|
* Format: bitflag
|
|
* @description The user's permissions in bitflag format (requires authorization to view)
|
|
*
|
|
* In order from first to eighth bit, the bits are:
|
|
* - UPLOAD_VERSION
|
|
* - DELETE_VERSION
|
|
* - EDIT_DETAILS
|
|
* - EDIT_BODY
|
|
* - MANAGE_INVITES
|
|
* - REMOVE_MEMBER
|
|
* - EDIT_MEMBER
|
|
* - DELETE_PROJECT
|
|
*
|
|
* @example 127
|
|
*/
|
|
permissions?: number;
|
|
/**
|
|
* @description Whether or not the user has accepted to be on the team (requires authorization to view)
|
|
* @example true
|
|
*/
|
|
accepted: boolean;
|
|
}[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
addTeamMember: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the team */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** User has been successfully invited to the team */
|
|
204: never;
|
|
/** No authorization to modify this team */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested team was not found */
|
|
404: unknown;
|
|
};
|
|
/** User to be added (must be the ID, usernames cannot be used here) */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/** @example EEFFGGHH */
|
|
user_id: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
joinTeam: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the team */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Team has successfully been joined */
|
|
204: never;
|
|
/** No authorization to join this team */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested team was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
deleteTeamMember: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the team */
|
|
id: string;
|
|
/** The ID or username of the user */
|
|
"id|username": string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** User has been removed from the team successfully */
|
|
204: never;
|
|
/** No authorization to remove this member from the team */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested team was not found */
|
|
404: unknown;
|
|
};
|
|
};
|
|
modifyTeamMember: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the team */
|
|
id: string;
|
|
/** The ID of the user to modify */
|
|
user_id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Roles/permissions have been updated successfully */
|
|
204: never;
|
|
/** No authorization to change this member's roles/permissions */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested team was not found */
|
|
404: unknown;
|
|
};
|
|
/** Contents to be modified */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/** @example Contributor */
|
|
role?: string;
|
|
/**
|
|
* Format: bitflag
|
|
* @description The user's permissions in bitflag format
|
|
*
|
|
* In order from first to eighth bit, the bits are:
|
|
* - UPLOAD_VERSION
|
|
* - DELETE_VERSION
|
|
* - EDIT_DETAILS
|
|
* - EDIT_BODY
|
|
* - MANAGE_INVITES
|
|
* - REMOVE_MEMBER
|
|
* - EDIT_MEMBER
|
|
* - DELETE_PROJECT
|
|
*
|
|
* @example 127
|
|
*/
|
|
permissions?: number;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
transferTeamOwnership: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the team */
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** Ownership has successfully been transferred */
|
|
204: never;
|
|
/** No authorization to transfer ownership of this team */
|
|
401: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name of the error
|
|
* @example unauthorized
|
|
*/
|
|
error: string;
|
|
/**
|
|
* @description The contents of the error
|
|
* @example Authentication Error: Invalid Authentication Credentials
|
|
*/
|
|
description: string;
|
|
};
|
|
};
|
|
};
|
|
/** The requested team was not found */
|
|
404: unknown;
|
|
};
|
|
/** New owner's ID */
|
|
requestBody: {
|
|
content: {
|
|
"application/json": {
|
|
/** @example EEFFGGHH */
|
|
user_id: string;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Gets an array of categories, their icons, and applicable project types */
|
|
categoryList: {
|
|
responses: {
|
|
/** List of categories */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The SVG icon of a category
|
|
* @example <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"/></svg>
|
|
*/
|
|
icon: string;
|
|
/**
|
|
* @description The name of the category
|
|
* @example adventure
|
|
*/
|
|
name: string;
|
|
/**
|
|
* @description The project type this category is applicable to
|
|
* @example mod
|
|
*/
|
|
project_type: string;
|
|
}[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Gets an array of loaders, their icons, and supported project types */
|
|
loaderList: {
|
|
responses: {
|
|
/** List of loaders */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The SVG icon of a loader
|
|
* @example <svg viewBox="0 0 276 288" fill="none" stroke="currentColor" stroke-width="23" stroke-linecap="round" stroke-linejoin="round"><g transform="matrix(1,0,0,1,-3302.43,-67.3276)"><g transform="matrix(0.564163,0,0,1.70346,1629.87,0)"><g transform="matrix(1.97801,-0.0501803,0.151517,0.655089,1678.7,-354.14)"><g><path d="M820.011,761.092C798.277,738.875 754.809,694.442 734.36,673.389C729.774,668.668 723.992,663.75 708.535,674.369C688.629,688.043 700.073,696.251 703.288,699.785C711.508,708.824 787.411,788.803 800.523,803.818C802.95,806.597 780.243,781.318 793.957,764.065C799.444,757.163 811.985,752.043 820.011,761.092C826.534,768.447 830.658,779.178 816.559,790.826C791.91,811.191 714.618,873.211 689.659,893.792C677.105,904.144 661.053,896.143 653.827,887.719C646.269,878.908 623.211,853.212 602.539,829.646C596.999,823.332 598.393,810.031 604.753,804.545C639.873,774.253 696.704,730.787 716.673,713.831"/></g></g></g></g></svg>
|
|
*/
|
|
icon: string;
|
|
/**
|
|
* @description The name of the loader
|
|
* @example fabric
|
|
*/
|
|
name: string;
|
|
/**
|
|
* @description The project types that this loader is applicable to
|
|
* @example [
|
|
* "mod",
|
|
* "modpack"
|
|
* ]
|
|
*/
|
|
supported_project_types: string[];
|
|
}[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Gets an array of game versions and information about them */
|
|
versionList: {
|
|
responses: {
|
|
/** List of game versions */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The name/number of the game version
|
|
* @example 1.18.1
|
|
*/
|
|
version: string;
|
|
/**
|
|
* @description The type of the game version
|
|
* @example release
|
|
* @enum {string}
|
|
*/
|
|
version_type: "release" | "snapshot" | "alpha" | "beta";
|
|
/**
|
|
* Format: date-time
|
|
* @description The date of the game version release
|
|
*/
|
|
date: string;
|
|
/**
|
|
* @description Whether or not this is a major version, used for Featured Versions
|
|
* @example true
|
|
*/
|
|
major: boolean;
|
|
}[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Gets an array of licenses and information about them */
|
|
licenseList: {
|
|
responses: {
|
|
/** List of licenses */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The short identifier of the license
|
|
* @example lgpl-3
|
|
*/
|
|
short: string;
|
|
/**
|
|
* @description The full name of the license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name: string;
|
|
}[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Gets an array of donation platforms and information about them */
|
|
donationPlatformList: {
|
|
responses: {
|
|
/** List of donation platforms */
|
|
200: {
|
|
content: {
|
|
"application/json": {
|
|
/**
|
|
* @description The short identifier of the donation platform
|
|
* @example bmac
|
|
*/
|
|
short: string;
|
|
/**
|
|
* @description The full name of the donation platform
|
|
* @example Buy Me a Coffee
|
|
*/
|
|
name: string;
|
|
}[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Gets an array of valid report types */
|
|
reportTypeList: {
|
|
responses: {
|
|
/** List of report types */
|
|
200: {
|
|
content: {
|
|
"application/json": string[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
getModerationProjects: {
|
|
responses: {
|
|
/** List of report types */
|
|
200: {
|
|
content: {
|
|
"application/json": (({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description A long form description of the project
|
|
* @example A long body describing my project in detail
|
|
*/
|
|
body?: string;
|
|
/**
|
|
* @description An optional link to where to submit bugs or issues with the project
|
|
* @example https://github.com/my_user/my_project/issues
|
|
*/
|
|
issues_url?: string | null;
|
|
/**
|
|
* @description An optional link to the source code of the project
|
|
* @example https://github.com/my_user/my_project
|
|
*/
|
|
source_url?: string | null;
|
|
/**
|
|
* @description An optional link to the project's wiki page or other relevant information
|
|
* @example https://github.com/my_user/my_project/wiki
|
|
*/
|
|
wiki_url?: string | null;
|
|
/**
|
|
* @description An optional invite link to the project's discord
|
|
* @example https://discord.gg/AaBbCcDd
|
|
*/
|
|
discord_url?: string | null;
|
|
/** @description A list of donation links for the project */
|
|
donation_urls?: ({
|
|
/**
|
|
* @description The ID of the donation platform
|
|
* @example patreon
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The donation platform this link is to
|
|
* @example Patreon
|
|
*/
|
|
platform?: string;
|
|
/**
|
|
* @description The URL of the donation platform and user
|
|
* @example https://www.patreon.com/my_user
|
|
*/
|
|
url?: string;
|
|
} | null)[];
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The slug of a project, used for vanity URLs
|
|
* @example my_project
|
|
*/
|
|
slug?: string;
|
|
/**
|
|
* @description The title or name of the project
|
|
* @example My Project
|
|
*/
|
|
title?: string;
|
|
/**
|
|
* @description A short description of the project
|
|
* @example A short description
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* @description A list of the categories that the project is in
|
|
* @example [
|
|
* "technology",
|
|
* "adventure",
|
|
* "fabric"
|
|
* ]
|
|
*/
|
|
categories?: string[];
|
|
/**
|
|
* @description The client side support of the project
|
|
* @example required
|
|
* @enum {string}
|
|
*/
|
|
client_side?: "required" | "optional" | "unsupported";
|
|
/**
|
|
* @description The server side support of the project
|
|
* @example optional
|
|
* @enum {string}
|
|
*/
|
|
server_side?: "required" | "optional" | "unsupported";
|
|
} & {
|
|
/**
|
|
* @description The project type of the project
|
|
* @example mod
|
|
* @enum {string}
|
|
*/
|
|
project_type: "mod" | "modpack";
|
|
/** @description The total number of downloads of the project */
|
|
downloads: number;
|
|
/**
|
|
* @description The URL of the project's icon
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
|
|
*/
|
|
icon_url?: string | null;
|
|
}) &
|
|
({
|
|
/**
|
|
* @description The ID of the project, encoded as a base62 string
|
|
* @example AABBCCDD
|
|
*/
|
|
id: string;
|
|
/**
|
|
* @description The ID of the team that has ownership of this project
|
|
* @example MMNNOOPP
|
|
*/
|
|
team: string;
|
|
/**
|
|
* @deprecated
|
|
* @description The link to the long description of the project (only present for old projects)
|
|
* @default null
|
|
* @example null
|
|
*/
|
|
body_url?: string | null;
|
|
/**
|
|
* @description A message that a moderator sent regarding the project
|
|
* @example null
|
|
*/
|
|
moderator_message?: {
|
|
/** @description The message that a moderator has left for the project */
|
|
message?: string;
|
|
/** @description The longer body of the message that a moderator has left for the project */
|
|
body?: string | null;
|
|
} | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was published
|
|
*/
|
|
published: string;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date the project was last updated
|
|
*/
|
|
updated: string;
|
|
/** @description The total number of users following the project */
|
|
followers: number;
|
|
/**
|
|
* @description The status of the project
|
|
* @example approved
|
|
* @enum {string}
|
|
*/
|
|
status:
|
|
| "approved"
|
|
| "rejected"
|
|
| "draft"
|
|
| "unlisted"
|
|
| "archived"
|
|
| "processing"
|
|
| "unknown";
|
|
/** @description The license of the project */
|
|
license?: {
|
|
/**
|
|
* @description The license id of a project, retrieved from the licenses get route
|
|
* @example lgpl-3
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description The long name of a license
|
|
* @example GNU Lesser General Public License v3
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description The URL to this license
|
|
* @example https://cdn.modrinth.com/licenses/lgpl-3.txt
|
|
*/
|
|
url?: string | null;
|
|
};
|
|
/**
|
|
* @description A list of the version IDs of the project (will never be empty unless `draft` status)
|
|
* @example [
|
|
* "IIJJKKLL",
|
|
* "QQRRSSTT"
|
|
* ]
|
|
*/
|
|
versions?: string[];
|
|
/** @description A list of images that have been uploaded to the project's gallery */
|
|
gallery?: ({
|
|
/**
|
|
* @description The URL of the gallery image
|
|
* @example https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
|
|
*/
|
|
url: string;
|
|
/**
|
|
* @description Whether the image is featured in the gallery
|
|
* @example true
|
|
*/
|
|
featured: boolean;
|
|
/**
|
|
* @description The title of the gallery image
|
|
* @example My awesome screenshot!
|
|
*/
|
|
title?: string | null;
|
|
/**
|
|
* @description The description of the gallery image
|
|
* @example This awesome screenshot shows all of the blocks in my mod!
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
* Format: date-time
|
|
* @description The date and time the gallery image was created
|
|
*/
|
|
created: string;
|
|
} | null)[];
|
|
} & {
|
|
title: unknown;
|
|
description: unknown;
|
|
categories: unknown;
|
|
client_side: unknown;
|
|
server_side: unknown;
|
|
slug: unknown;
|
|
body: unknown;
|
|
}))[];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
export interface external {}
|