fix: paper/purpur vers mismatch (#5687)

* fix: paper/purpur

* fix: use fill api

* fix: lint
This commit is contained in:
Calum H.
2026-03-27 17:24:16 +00:00
committed by GitHub
parent 87122cf9bd
commit e6b061f38c
8 changed files with 96 additions and 25 deletions

View File

@@ -14,18 +14,18 @@ import { LabrinthAffiliateInternalModule } from './labrinth/affiliate/internal'
import { LabrinthAuthInternalModule } from './labrinth/auth/internal'
import { LabrinthAuthV2Module } from './labrinth/auth/v2'
import { LabrinthBillingInternalModule } from './labrinth/billing/internal'
import { LabrinthCollectionsModule } from './labrinth/collections'
import { LabrinthGlobalsInternalModule } from './labrinth/globals/internal'
import { LabrinthLimitsV3Module } from './labrinth/limits/v3'
import { LabrinthNotificationsV2Module } from './labrinth/notifications/v2'
import { LabrinthOAuthInternalModule } from './labrinth/oauth/internal'
import { LabrinthCollectionsModule } from './labrinth/collections'
import { LabrinthOrganizationsV3Module } from './labrinth/organizations/v3'
import { LabrinthPatsV2Module } from './labrinth/pats/v2'
import { LabrinthLimitsV3Module } from './labrinth/limits/v3'
import { LabrinthPayoutV3Module } from './labrinth/payout/v3'
import { LabrinthPayoutsV3Module } from './labrinth/payouts/v3'
import { LabrinthReportsV3Module } from './labrinth/reports/v3'
import { LabrinthProjectsV2Module } from './labrinth/projects/v2'
import { LabrinthProjectsV3Module } from './labrinth/projects/v3'
import { LabrinthReportsV3Module } from './labrinth/reports/v3'
import { LabrinthServerPingInternalModule } from './labrinth/server-ping/internal'
import { LabrinthSessionsV2Module } from './labrinth/sessions/v2'
import { LabrinthStateModule } from './labrinth/state'

View File

@@ -3,11 +3,11 @@ export * from './auth/v2'
export * from './billing/internal'
export * from './collections'
export * from './globals/internal'
export * from './limits/v3'
export * from './notifications/v2'
export * from './oauth/internal'
export * from './organizations/v3'
export * from './pats/v2'
export * from './limits/v3'
export * from './payout/v3'
export * from './payouts/v3'
export * from './projects/v2'

View File

@@ -1,6 +1,11 @@
export namespace Paper {
export namespace Versions {
export namespace v3 {
export type Project = {
project: { id: string; name: string }
versions: Record<string, string[]>
}
export type VersionBuilds = {
builds: number[]
}

View File

@@ -12,6 +12,13 @@ export class PaperVersionsV3Module extends AbstractModule {
return 'paper_versions_v3'
}
/**
* Get the Paper project info including all supported Minecraft versions.
*/
public async getProject(): Promise<Paper.Versions.v3.Project> {
return $fetch<Paper.Versions.v3.Project>(`${BASE_URL}/projects/paper`)
}
/**
* Get available Paper builds for a Minecraft version.
*

View File

@@ -1,6 +1,11 @@
export namespace Purpur {
export namespace Versions {
export namespace v2 {
export type Project = {
project: string
versions: string[]
}
export type VersionBuilds = {
builds: {
all: string[]

View File

@@ -12,6 +12,13 @@ export class PurpurVersionsV2Module extends AbstractModule {
return 'purpur_versions_v2'
}
/**
* Get the Purpur project info including all supported Minecraft versions.
*/
public async getProject(): Promise<Purpur.Versions.v2.Project> {
return $fetch<Purpur.Versions.v2.Project>(`${BASE_URL}/purpur`)
}
/**
* Get available Purpur builds for a Minecraft version.
*