document interfaces
All checks were successful
Actions / Build and Push Documentation (push) Successful in 14s

This commit is contained in:
cswimr 2025-02-09 16:37:21 -06:00
parent 9c216c1a86
commit 8c332fe75c
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087

View file

@ -14,12 +14,39 @@ import * as semver from "semver";
* The structure of a Packwiz metafile.
*/
export interface Metafile {
/**
* A human-readable name for the file.
*/
name: string;
/**
* The name that the file should have when downloaded.
*/
filename: string;
/**
* Whether the file is for the client or server.
* Consuming applications should respect this!
*/
side: Side;
/**
* The provider to use to download / update the file.
* All consuming applications should be doing with this is downloading the file.
* Updates are handled by Packwiz itself.
*/
provider: UrlProvider;
/**
* Whether the file is optional.
* If true, the end user should be prompted to download the file.
*/
isOptional: boolean;
/**
* Whether the file is the default for the mod.
* If this is true, but isOptional is also true, the end user should be asked if they want to download the file.
*/
isDefault: boolean;
/**
* The description of the file.
* This should be shown to end users.
*/
description?: string;
}
@ -126,9 +153,21 @@ export class IndexFileEntry {
* Represents the structure of a Packwiz index file, as well as providing its location.
*/
export interface PackwizIndex {
/**
* The location of the index file. This can be a local file path or a remote URL.
*/
location: Resource;
/**
* The hash of the index file.
*/
hash: string;
/**
* The hash format of the index file.
*/
hashFormat: HashFormat;
/**
* The files listed in the index file.
*/
files: IndexFileEntry[];
}
@ -137,11 +176,29 @@ export interface PackwizIndex {
* If any of these are not undefined, applications using this information should install the specific version of the modlaoder listed.
*/
export interface PackwizVersions {
/**
* The Minecraft version that the pack is for.
*/
minecraft: string;
/**
* The version of [Fabric](https://fabricmc.net/) that the pack targets.
*/
fabric?: string;
/**
* The version of [Forge](https://files.minecraftforge.net/) that the pack targets.
*/
forge?: string;
/**
* The version of [NeoForge](https://neoforged.net/) that the pack targets.
*/
neoforge?: string;
/**
* The version of [Quilt](https://quiltmc.org/) that the pack targets.
*/
quilt?: string;
/**
* The version of [LiteLoader](https://www.liteloader.com/) that the pack targets.
*/
liteloader?: string;
}