@modrinth/api-client 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -278,7 +278,6 @@ export declare abstract class AbstractWebSocketClient {
278
278
  protected readonly MAX_RECONNECT_ATTEMPTS = 10;
279
279
  protected readonly RECONNECT_BASE_DELAY = 1000;
280
280
  protected readonly RECONNECT_MAX_DELAY = 30000;
281
- protected readonly AUTHENTICATION_TIMEOUT = 30000;
282
281
  constructor(client: {
283
282
  archon: {
284
283
  servers_v0: {
@@ -293,7 +292,6 @@ export declare abstract class AbstractWebSocketClient {
293
292
  safeConnect(serverId: string, options?: {
294
293
  force?: boolean;
295
294
  }): Promise<void>;
296
- protected waitForAuthentication(serverId: string): Promise<void>;
297
295
  on<E extends Archon.Websocket.v0.WSEventType>(serverId: string, eventType: E, handler: WebSocketEventHandler<Extract<Archon.Websocket.v0.WSEvent, {
298
296
  event: E;
299
297
  }>>): () => void;
@@ -545,20 +543,13 @@ export declare namespace Archon {
545
543
  name: string | null;
546
544
  environment?: Labrinth.Projects.v3.Environment | null;
547
545
  };
548
- export type AddonStatus = 'pending' | 'installed' | {
549
- failed: {
550
- error: string;
551
- };
552
- };
553
546
  export type Addon = {
554
547
  id: string;
555
548
  filename: string;
556
549
  filesize: number;
557
- btime?: string;
558
550
  disabled: boolean;
559
551
  kind: AddonKind;
560
552
  from_modpack: boolean;
561
- status: AddonStatus;
562
553
  pack_client_retained: boolean;
563
554
  pack_client_depends: boolean;
564
555
  has_update: string | null;
@@ -573,10 +564,6 @@ export declare namespace Archon {
573
564
  modloader_version: string | null;
574
565
  game_version: string | null;
575
566
  modpack: ModpackFields | null;
576
- installing?: 'loader' | 'modpack';
577
- error?: {
578
- message: string;
579
- };
580
567
  addons: Addon[] | null;
581
568
  };
582
569
  export type AddAddonRequest = {
@@ -1135,69 +1122,7 @@ export declare namespace Archon {
1135
1122
  world_id: string;
1136
1123
  spec: Archon.Content.v1.Addons;
1137
1124
  };
1138
- export type WorldContentPlatform = 'forge' | 'neoforge' | 'fabric' | 'quilt' | 'paper' | 'purpur' | 'vanilla';
1139
- export type WorldContentPlatformData = {
1140
- platform: WorldContentPlatform;
1141
- game_version: string;
1142
- platform_version: string | null;
1143
- };
1144
- export type WorldContentModpackSource = 'CurseForge' | {
1145
- Modrinth: {
1146
- version_id: string;
1147
- project_id: string;
1148
- mrpack_sha1: string | null;
1149
- };
1150
- } | {
1151
- LocalMrPackFile: {
1152
- path: string;
1153
- name: string;
1154
- description: string | null;
1155
- version_name: string | null;
1156
- };
1157
- };
1158
- export type WorldContentModpack = {
1159
- spec: WorldContentModpackSource;
1160
- downloads: number | null;
1161
- followers: number | null;
1162
- icon_url: string | null;
1163
- owner: Archon.Content.v1.ContentOwner | null;
1164
- title: string | null;
1165
- description: string | null;
1166
- version_number: string | null;
1167
- date_published: string | null;
1168
- environment: Labrinth.Projects.v3.Environment | null;
1169
- has_update: string | null;
1170
- };
1171
- export type WorldContentItem = {
1172
- parent_directory: string;
1173
- file_sha1: string | null;
1174
- filename: string;
1175
- btime?: string;
1176
- from_modpack: boolean;
1177
- version_id: string | null;
1178
- project_id: string | null;
1179
- pack_client_retained: boolean;
1180
- pack_client_depends: boolean;
1181
- status: Archon.Content.v1.AddonStatus;
1182
- filesize: number | null;
1183
- name: string | null;
1184
- version: Archon.Content.v1.AddonVersion | null;
1185
- owner: Archon.Content.v1.ContentOwner | null;
1186
- has_update: string | null;
1187
- icon_url: string | null;
1188
- };
1189
- export type WorldContentUpdateEvent = {
1190
- type: 'world.content.update';
1191
- world_id: string;
1192
- platform_data: WorldContentPlatformData | null;
1193
- linked_modpack: WorldContentModpack | null;
1194
- installing?: 'loader' | 'modpack';
1195
- error?: {
1196
- message: string;
1197
- };
1198
- content: WorldContentItem[];
1199
- };
1200
- export type SyncEvent = ProtocolResetEvent | ProtocolInvalidEvent | ProtocolErrorEvent | BackupNewEvent | BackupPatchEvent | BackupDeleteEvent | BackupOperationStartEvent | BackupOperationDoneEvent | ServerPatchEvent | ServerNetworkPatchEvent | ServerTransferEvent | UsersPatchEvent | WorldPatchEvent | WorldStartupPatchEvent | WorldContentAddonPatchEvent | WorldContentBaseUpdateEvent | WorldContentUpdateEvent;
1125
+ export type SyncEvent = ProtocolResetEvent | ProtocolInvalidEvent | ProtocolErrorEvent | BackupNewEvent | BackupPatchEvent | BackupDeleteEvent | BackupOperationStartEvent | BackupOperationDoneEvent | ServerPatchEvent | ServerNetworkPatchEvent | ServerTransferEvent | UsersPatchEvent | WorldPatchEvent | WorldStartupPatchEvent | WorldContentAddonPatchEvent | WorldContentBaseUpdateEvent;
1201
1126
  }
1202
1127
  }
1203
1128
  export namespace Websocket {
@@ -1276,42 +1201,6 @@ export declare namespace Archon {
1276
1201
  project_id: string;
1277
1202
  version_id: string;
1278
1203
  };
1279
- export type InstallProgressFileKey = {
1280
- type: 'file';
1281
- install_type: 'install' | 'update';
1282
- project_id: string;
1283
- version_id: string;
1284
- parent_directory: string;
1285
- source_filename: string | null;
1286
- target_filename?: string | null;
1287
- };
1288
- export type InstallProgressModrinthModpackKey = {
1289
- type: 'modrinth_modpack';
1290
- project_id: string;
1291
- version_id: string;
1292
- };
1293
- export type InstallProgressLocalModpackKey = {
1294
- type: 'local_modpack';
1295
- filename: string;
1296
- };
1297
- export type InstallProgressPlatformKey = {
1298
- type: 'platform';
1299
- platform: 'forge' | 'neoforge' | 'fabric' | 'quilt' | 'paper' | 'purpur' | 'vanilla';
1300
- platform_version: string;
1301
- game_version: string;
1302
- };
1303
- export type InstallProgressKey = InstallProgressFileKey | InstallProgressModrinthModpackKey | InstallProgressLocalModpackKey | InstallProgressPlatformKey;
1304
- export type InstallProgressItem = {
1305
- world_id: string;
1306
- key: InstallProgressKey;
1307
- id: string;
1308
- progress: number | null;
1309
- error: string | null;
1310
- };
1311
- export type WSInstallProgressEvent = {
1312
- event: 'install-progress';
1313
- items: InstallProgressItem[];
1314
- };
1315
1204
  export type FilesystemOpKind = 'unarchive';
1316
1205
  export type FilesystemOpState = 'queued' | 'ongoing' | 'done' | 'cancelled' | 'failure-corrupted' | 'failure-invalid-path';
1317
1206
  export type FilesystemOperation = {
@@ -1367,7 +1256,7 @@ export declare namespace Archon {
1367
1256
  event: 'command';
1368
1257
  cmd: string;
1369
1258
  };
1370
- export type WSEvent = WSBackupProgressEvent | WSLogEvent | WSLog4jEvent | WSStatsEvent | WSPowerStateEvent | WSStateEvent | WSAuthExpiringEvent | WSAuthIncorrectEvent | WSAuthOkEvent | WSInstallationResultEvent | WSUptimeEvent | WSNewModEvent | WSInstallProgressEvent | WSFilesystemOpsEvent;
1259
+ export type WSEvent = WSBackupProgressEvent | WSLogEvent | WSLog4jEvent | WSStatsEvent | WSPowerStateEvent | WSStateEvent | WSAuthExpiringEvent | WSAuthIncorrectEvent | WSAuthOkEvent | WSInstallationResultEvent | WSUptimeEvent | WSNewModEvent | WSFilesystemOpsEvent;
1371
1260
  export type WSEventType = WSEvent['event'];
1372
1261
  }
1373
1262
  }
@@ -7516,7 +7405,6 @@ export declare class VerboseLoggingFeature extends AbstractFeature {
7516
7405
  export declare interface WebSocketConnection {
7517
7406
  serverId: string;
7518
7407
  socket: WebSocket;
7519
- authenticated: boolean;
7520
7408
  reconnectAttempts: number;
7521
7409
  reconnectTimer?: ReturnType<typeof setTimeout>;
7522
7410
  isReconnecting: boolean;