Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions packages/api-client/src/modules/archon/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,50 @@ export namespace Archon {
version_id: string
}

export type InstallProgressFileKey = {
type: 'file'
parent_directory: string
filename: string
install_type: 'install' | 'update'
}

export type InstallProgressModrinthModpackKey = {
type: 'modrinth_modpack'
project_id: string
version_id: string
}

export type InstallProgressLocalModpackKey = {
type: 'local_modpack'
filename: string
}

export type InstallProgressPlatformKey = {
type: 'platform'
platform: 'forge' | 'neoforge' | 'fabric' | 'quilt' | 'paper' | 'purpur' | 'vanilla'
platform_version: string
game_version: string
}

export type InstallProgressKey =
| InstallProgressFileKey
| InstallProgressModrinthModpackKey
| InstallProgressLocalModpackKey
| InstallProgressPlatformKey

export type InstallProgressItem = {
world_id: string
key: InstallProgressKey
id: string
progress: number | null
error: string | null
}

export type WSInstallProgressEvent = {
event: 'install-progress'
items: InstallProgressItem[]
}

export type FilesystemOpKind = 'unarchive'

export type FilesystemOpState =
Expand Down Expand Up @@ -1208,6 +1252,7 @@ export namespace Archon {
| WSInstallationResultEvent
| WSUptimeEvent
| WSNewModEvent
| WSInstallProgressEvent
| WSFilesystemOpsEvent

export type WSEventType = WSEvent['event']
Expand Down
Loading
Loading