@modrinth/api-client 0.30.0 → 0.32.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 +7103 -28
- package/dist/index.js +1 -0
- package/dist/index.js.map +7 -0
- package/package.json +4 -2
- package/dist/core/abstract-client.d.ts +0 -163
- package/dist/core/abstract-feature.d.ts +0 -72
- package/dist/core/abstract-module.d.ts +0 -10
- package/dist/core/abstract-sync.d.ts +0 -61
- package/dist/core/abstract-upload-client.d.ts +0 -20
- package/dist/core/abstract-websocket.d.ts +0 -52
- package/dist/core/errors.d.ts +0 -48
- package/dist/features/auth.d.ts +0 -47
- package/dist/features/circuit-breaker.d.ts +0 -139
- package/dist/features/node-auth.d.ts +0 -58
- package/dist/features/panel-version.d.ts +0 -7
- package/dist/features/retry.d.ts +0 -87
- package/dist/features/verbose-logging.d.ts +0 -6
- package/dist/modules/archon/actions/v1.d.ts +0 -10
- package/dist/modules/archon/backups/v1.d.ts +0 -44
- package/dist/modules/archon/backups-queue/v1.d.ts +0 -25
- package/dist/modules/archon/content/v1.d.ts +0 -48
- package/dist/modules/archon/index.d.ts +0 -8
- package/dist/modules/archon/nodes/internal.d.ts +0 -10
- package/dist/modules/archon/notices/v0.d.ts +0 -38
- package/dist/modules/archon/options/v1.d.ts +0 -9
- package/dist/modules/archon/properties/v1.d.ts +0 -9
- package/dist/modules/archon/server-users/v1.d.ts +0 -30
- package/dist/modules/archon/servers/v0.d.ts +0 -122
- package/dist/modules/archon/servers/v1.d.ts +0 -30
- package/dist/modules/archon/transfers/internal.d.ts +0 -25
- package/dist/modules/archon/types.d.ts +0 -941
- package/dist/modules/index.d.ts +0 -181
- package/dist/modules/iso3166/index.d.ts +0 -24
- package/dist/modules/iso3166/types.d.ts +0 -21
- package/dist/modules/kyros/content/v1.d.ts +0 -23
- package/dist/modules/kyros/files/v0.d.ts +0 -123
- package/dist/modules/kyros/logs/v1.d.ts +0 -6
- package/dist/modules/kyros/types.d.ts +0 -44
- package/dist/modules/kyros/upload-sessions/v1.d.ts +0 -18
- package/dist/modules/labrinth/affiliate/internal.d.ts +0 -30
- package/dist/modules/labrinth/analytics/v3.d.ts +0 -56
- package/dist/modules/labrinth/attribution/internal.d.ts +0 -47
- package/dist/modules/labrinth/auth/internal.d.ts +0 -19
- package/dist/modules/labrinth/auth/v2.d.ts +0 -98
- package/dist/modules/labrinth/billing/internal.d.ts +0 -65
- package/dist/modules/labrinth/campaign/internal.d.ts +0 -10
- package/dist/modules/labrinth/collections.d.ts +0 -80
- package/dist/modules/labrinth/content/v3.d.ts +0 -6
- package/dist/modules/labrinth/external-projects/internal.d.ts +0 -9
- package/dist/modules/labrinth/friends/v3.d.ts +0 -23
- package/dist/modules/labrinth/globals/internal.d.ts +0 -11
- package/dist/modules/labrinth/images/v3.d.ts +0 -7
- package/dist/modules/labrinth/index.d.ts +0 -31
- package/dist/modules/labrinth/limits/v3.d.ts +0 -17
- package/dist/modules/labrinth/moderation/internal.d.ts +0 -12
- package/dist/modules/labrinth/notifications/v2.d.ts +0 -73
- package/dist/modules/labrinth/oauth/internal.d.ts +0 -97
- package/dist/modules/labrinth/organizations/v3.d.ts +0 -66
- package/dist/modules/labrinth/pats/v2.d.ts +0 -31
- package/dist/modules/labrinth/payout/v3.d.ts +0 -30
- package/dist/modules/labrinth/payouts/v3.d.ts +0 -15
- package/dist/modules/labrinth/projects/v2.d.ts +0 -169
- package/dist/modules/labrinth/projects/v3.d.ts +0 -110
- package/dist/modules/labrinth/reports/v3.d.ts +0 -81
- package/dist/modules/labrinth/server-ping/internal.d.ts +0 -10
- package/dist/modules/labrinth/sessions/v2.d.ts +0 -17
- package/dist/modules/labrinth/state/index.d.ts +0 -17
- package/dist/modules/labrinth/tags/v2.d.ts +0 -19
- package/dist/modules/labrinth/teams/v2.d.ts +0 -57
- package/dist/modules/labrinth/teams/v3.d.ts +0 -18
- package/dist/modules/labrinth/tech-review/internal.d.ts +0 -77
- package/dist/modules/labrinth/threads/v3.d.ts +0 -57
- package/dist/modules/labrinth/types.d.ts +0 -2118
- package/dist/modules/labrinth/users/v2.d.ts +0 -101
- package/dist/modules/labrinth/users/v3.d.ts +0 -37
- package/dist/modules/labrinth/versions/v2.d.ts +0 -75
- package/dist/modules/labrinth/versions/v3.d.ts +0 -123
- package/dist/modules/launcher-meta/types.d.ts +0 -25
- package/dist/modules/launcher-meta/v0.d.ts +0 -17
- package/dist/modules/mclogs/insights/v1.d.ts +0 -6
- package/dist/modules/mclogs/logs/v1.d.ts +0 -6
- package/dist/modules/mclogs/types.d.ts +0 -60
- package/dist/modules/paper/types.d.ts +0 -22
- package/dist/modules/paper/v3.d.ts +0 -19
- package/dist/modules/purpur/types.d.ts +0 -15
- package/dist/modules/purpur/v2.d.ts +0 -16
- package/dist/modules/types.d.ts +0 -8
- package/dist/platform/generic.d.ts +0 -28
- package/dist/platform/nuxt.d.ts +0 -88
- package/dist/platform/sync-generic.d.ts +0 -16
- package/dist/platform/tauri.d.ts +0 -35
- package/dist/platform/websocket-generic.d.ts +0 -16
- package/dist/platform/xhr-upload-client.d.ts +0 -15
- package/dist/state/node-auth.d.ts +0 -36
- package/dist/types/client.d.ts +0 -70
- package/dist/types/errors.d.ts +0 -43
- package/dist/types/index.d.ts +0 -10
- package/dist/types/request.d.ts +0 -124
- package/dist/types/upload.d.ts +0 -92
- package/dist/utils/fetch.d.ts +0 -4
- package/dist/utils/jwt-retry.d.ts +0 -5
- package/dist/utils/node-url.d.ts +0 -2
- package/dist/utils/pingtest.d.ts +0 -8
- package/dist/utils/sse.d.ts +0 -24
- package/dist/utils/types.d.ts +0 -2
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature';
|
|
2
|
-
import type { RequestContext } from '../types/request';
|
|
3
|
-
/**
|
|
4
|
-
* Node authentication credentials
|
|
5
|
-
*/
|
|
6
|
-
export interface NodeAuth {
|
|
7
|
-
/** Node instance URL (e.g., "node-xyz.modrinth.com/modrinth/v0/fs") */
|
|
8
|
-
url: string;
|
|
9
|
-
/** Base URL without path suffix (e.g., "node-xyz.modrinth.com") — used when available */
|
|
10
|
-
baseUrl?: string;
|
|
11
|
-
/** JWT token */
|
|
12
|
-
token: string;
|
|
13
|
-
}
|
|
14
|
-
export interface NodeAuthConfig extends FeatureConfig {
|
|
15
|
-
/**
|
|
16
|
-
* Get current node auth. Returns null if not authenticated.
|
|
17
|
-
*/
|
|
18
|
-
getAuth: () => NodeAuth | null;
|
|
19
|
-
/**
|
|
20
|
-
* Refresh the node authentication token.
|
|
21
|
-
*/
|
|
22
|
-
refreshAuth: () => Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Handles authentication for Kyros node fs requests:
|
|
26
|
-
* - Automatically injects Authorization header
|
|
27
|
-
* - Builds the correct URL from node instance
|
|
28
|
-
* - Handles 401 errors by refreshing and retrying (max 3 times)
|
|
29
|
-
*
|
|
30
|
-
* Only applies to requests with `useNodeAuth: true` in options.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* const nodeAuth = new NodeAuthFeature({
|
|
35
|
-
* getAuth: () => nodeAuthState.getAuth?.() ?? null,
|
|
36
|
-
* refreshAuth: async () => {
|
|
37
|
-
* if (nodeAuthState.refreshAuth) {
|
|
38
|
-
* await nodeAuthState.refreshAuth()
|
|
39
|
-
* }
|
|
40
|
-
* },
|
|
41
|
-
* })
|
|
42
|
-
* client.addFeature(nodeAuth)
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare class NodeAuthFeature extends AbstractFeature {
|
|
46
|
-
protected config: NodeAuthConfig;
|
|
47
|
-
private refreshPromise;
|
|
48
|
-
shouldApply(context: RequestContext): boolean;
|
|
49
|
-
private refreshAuthWithLock;
|
|
50
|
-
execute<T>(next: () => Promise<T>, context: RequestContext): Promise<T>;
|
|
51
|
-
private applyAuth;
|
|
52
|
-
private buildUrl;
|
|
53
|
-
/**
|
|
54
|
-
* Check if a JWT token is expired or about to expire
|
|
55
|
-
* Refreshes proactively if expiring within next 10 seconds
|
|
56
|
-
*/
|
|
57
|
-
private isTokenExpired;
|
|
58
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AbstractFeature } from '../core/abstract-feature';
|
|
2
|
-
import type { RequestContext } from '../types/request';
|
|
3
|
-
export declare const PANEL_VERSION = 1;
|
|
4
|
-
export declare class PanelVersionFeature extends AbstractFeature {
|
|
5
|
-
execute<T>(next: () => Promise<T>, context: RequestContext): Promise<T>;
|
|
6
|
-
shouldApply(context: RequestContext): boolean;
|
|
7
|
-
}
|
package/dist/features/retry.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature';
|
|
2
|
-
import type { RequestContext } from '../types/request';
|
|
3
|
-
/**
|
|
4
|
-
* Backoff strategy for retries
|
|
5
|
-
*/
|
|
6
|
-
export type BackoffStrategy = 'exponential' | 'linear' | 'constant';
|
|
7
|
-
/**
|
|
8
|
-
* Retry feature configuration
|
|
9
|
-
*/
|
|
10
|
-
export interface RetryConfig extends FeatureConfig {
|
|
11
|
-
/**
|
|
12
|
-
* Maximum number of retry attempts
|
|
13
|
-
* @default 3
|
|
14
|
-
*/
|
|
15
|
-
maxAttempts?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Backoff strategy to use
|
|
18
|
-
* @default 'exponential'
|
|
19
|
-
*/
|
|
20
|
-
backoffStrategy?: BackoffStrategy;
|
|
21
|
-
/**
|
|
22
|
-
* Initial delay in milliseconds before first retry
|
|
23
|
-
* @default 1000
|
|
24
|
-
*/
|
|
25
|
-
initialDelay?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Maximum delay in milliseconds between retries
|
|
28
|
-
* @default 15000
|
|
29
|
-
*/
|
|
30
|
-
maxDelay?: number;
|
|
31
|
-
/**
|
|
32
|
-
* HTTP status codes that should trigger a retry
|
|
33
|
-
* @default [408, 429, 500, 502, 503, 504]
|
|
34
|
-
*/
|
|
35
|
-
retryableStatusCodes?: number[];
|
|
36
|
-
/**
|
|
37
|
-
* Whether to retry on network errors (connection refused, timeout, etc.)
|
|
38
|
-
* @default true
|
|
39
|
-
*/
|
|
40
|
-
retryOnNetworkError?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Custom function to determine if an error should be retried
|
|
43
|
-
*/
|
|
44
|
-
shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Retry feature
|
|
48
|
-
*
|
|
49
|
-
* Automatically retries failed requests with configurable backoff strategy.
|
|
50
|
-
* Only retries errors that are likely to succeed on retry (e.g., timeout, 5xx errors).
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```typescript
|
|
54
|
-
* const retry = new RetryFeature({
|
|
55
|
-
* maxAttempts: 3,
|
|
56
|
-
* backoffStrategy: 'exponential',
|
|
57
|
-
* initialDelay: 1000,
|
|
58
|
-
* maxDelay: 15000
|
|
59
|
-
* })
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
export declare class RetryFeature extends AbstractFeature {
|
|
63
|
-
protected config: Required<RetryConfig>;
|
|
64
|
-
constructor(config?: RetryConfig);
|
|
65
|
-
execute<T>(next: () => Promise<T>, context: RequestContext): Promise<T>;
|
|
66
|
-
shouldApply(context: RequestContext): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Determine if an error should be retried
|
|
69
|
-
*/
|
|
70
|
-
private shouldRetryError;
|
|
71
|
-
/**
|
|
72
|
-
* Check if an error is a network error
|
|
73
|
-
*/
|
|
74
|
-
private isNetworkError;
|
|
75
|
-
/**
|
|
76
|
-
* Get max attempts for this request
|
|
77
|
-
*/
|
|
78
|
-
private getMaxAttempts;
|
|
79
|
-
/**
|
|
80
|
-
* Calculate delay before next retry based on backoff strategy
|
|
81
|
-
*/
|
|
82
|
-
private calculateDelay;
|
|
83
|
-
/**
|
|
84
|
-
* Sleep for a given duration
|
|
85
|
-
*/
|
|
86
|
-
private sleep;
|
|
87
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature';
|
|
2
|
-
import type { RequestContext } from '../types/request';
|
|
3
|
-
export type VerboseLoggingConfig = FeatureConfig;
|
|
4
|
-
export declare class VerboseLoggingFeature extends AbstractFeature {
|
|
5
|
-
execute<T>(next: () => Promise<T>, context: RequestContext): Promise<T>;
|
|
6
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonActionsV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get server action log entries.
|
|
7
|
-
* GET /v1/servers/:server_id/action-log
|
|
8
|
-
*/
|
|
9
|
-
list(serverId: string, options?: Archon.Actions.v1.ListActionLogOptions): Promise<Archon.Actions.v1.ActionLogResponse>;
|
|
10
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `client.archon.backups_queue_v1` (Backups Queue API) instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ArchonBackupsV1Module extends AbstractModule {
|
|
7
|
-
getModuleID(): string;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use `client.archon.backups_queue_v1.list` instead.
|
|
10
|
-
*/
|
|
11
|
-
/** GET /v1/servers/:server_id/worlds/:world_id/backups */
|
|
12
|
-
list(serverId: string, worldId: string): Promise<Archon.Backups.v1.Backup[]>;
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Use `client.archon.backups_queue_v1.list` instead.
|
|
15
|
-
*/
|
|
16
|
-
/** GET /v1/servers/:server_id/worlds/:world_id/backups/:backup_id */
|
|
17
|
-
get(serverId: string, worldId: string, backupId: string): Promise<Archon.Backups.v1.Backup>;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use `client.archon.backups_queue_v1.create` instead.
|
|
20
|
-
*/
|
|
21
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups */
|
|
22
|
-
create(serverId: string, worldId: string, request: Archon.Backups.v1.BackupRequest): Promise<Archon.Backups.v1.PostBackupResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Use `client.archon.backups_queue_v1.restore` instead.
|
|
25
|
-
*/
|
|
26
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups/:backup_id/restore */
|
|
27
|
-
restore(serverId: string, worldId: string, backupId: string): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated Use `client.archon.backups_queue_v1.delete` for backup deletion, or
|
|
30
|
-
* `client.archon.backups_queue_v1.cancelCreate` / `cancelRestore` for active operations.
|
|
31
|
-
*/
|
|
32
|
-
/** DELETE /v1/servers/:server_id/worlds/:world_id/backups/:backup_id */
|
|
33
|
-
delete(serverId: string, worldId: string, backupId: string): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use `client.archon.backups_queue_v1.retry` instead.
|
|
36
|
-
*/
|
|
37
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups/:backup_id/retry */
|
|
38
|
-
retry(serverId: string, worldId: string, backupId: string): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated Legacy backups only; no queue equivalent. Prefer renaming via other supported flows if available.
|
|
41
|
-
*/
|
|
42
|
-
/** PATCH /v1/servers/:server_id/worlds/:world_id/backups/:backup_id */
|
|
43
|
-
rename(serverId: string, worldId: string, backupId: string, request: Archon.Backups.v1.PatchBackup): Promise<void>;
|
|
44
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonBackupsQueueV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/** GET /v1/servers/:server_id/worlds/:world_id/backups-queue */
|
|
6
|
-
list(serverId: string, worldId: string): Promise<Archon.BackupsQueue.v1.BackupsQueueResponse>;
|
|
7
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue */
|
|
8
|
-
create(serverId: string, worldId: string, request: Archon.BackupsQueue.v1.BackupRequest): Promise<Archon.BackupsQueue.v1.PostBackupQueueResponse>;
|
|
9
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/history/create/:operation_id/ack */
|
|
10
|
-
ackCreate(serverId: string, worldId: string, operationId: number): Promise<void>;
|
|
11
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/history/create/:operation_id/cancel */
|
|
12
|
-
cancelCreate(serverId: string, worldId: string, operationId: number): Promise<void>;
|
|
13
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/history/restore/:operation_id/ack */
|
|
14
|
-
ackRestore(serverId: string, worldId: string, operationId: number): Promise<void>;
|
|
15
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/history/restore/:operation_id/cancel */
|
|
16
|
-
cancelRestore(serverId: string, worldId: string, operationId: number): Promise<void>;
|
|
17
|
-
/** DELETE /v1/servers/:server_id/worlds/:world_id/backups-queue/:backup_id */
|
|
18
|
-
delete(serverId: string, worldId: string, backupId: string): Promise<void>;
|
|
19
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/delete-many */
|
|
20
|
-
deleteMany(serverId: string, worldId: string, backupIds: string[]): Promise<void>;
|
|
21
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/:backup_id/restore */
|
|
22
|
-
restore(serverId: string, worldId: string, backupId: string, request: Archon.BackupsQueue.v1.BackupRequest): Promise<void>;
|
|
23
|
-
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/:backup_id/retry */
|
|
24
|
-
retry(serverId: string, worldId: string, backupId: string): Promise<void>;
|
|
25
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonContentV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/** GET /v1/:server_id/worlds/:world_id/addons */
|
|
6
|
-
getAddons(serverId: string, worldId: string, options?: {
|
|
7
|
-
from_modpack?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
addons?: boolean;
|
|
10
|
-
updates?: boolean;
|
|
11
|
-
}): Promise<Archon.Content.v1.Addons>;
|
|
12
|
-
/** POST /v1/:server_id/worlds/:world_id/addons */
|
|
13
|
-
addAddon(serverId: string, worldId: string, request: Archon.Content.v1.AddAddonRequest): Promise<void>;
|
|
14
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/install-many */
|
|
15
|
-
addAddons(serverId: string, worldId: string, addons: Archon.Content.v1.AddAddonRequest[]): Promise<void>;
|
|
16
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/delete */
|
|
17
|
-
deleteAddon(serverId: string, worldId: string, request: Archon.Content.v1.RemoveAddonRequest): Promise<void>;
|
|
18
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/disable */
|
|
19
|
-
disableAddon(serverId: string, worldId: string, request: Archon.Content.v1.RemoveAddonRequest): Promise<void>;
|
|
20
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/enable */
|
|
21
|
-
enableAddon(serverId: string, worldId: string, request: Archon.Content.v1.RemoveAddonRequest): Promise<void>;
|
|
22
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/delete-many */
|
|
23
|
-
deleteAddons(serverId: string, worldId: string, items: Archon.Content.v1.RemoveAddonRequest[]): Promise<void>;
|
|
24
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/disable-many */
|
|
25
|
-
disableAddons(serverId: string, worldId: string, items: Archon.Content.v1.RemoveAddonRequest[]): Promise<void>;
|
|
26
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/enable-many */
|
|
27
|
-
enableAddons(serverId: string, worldId: string, items: Archon.Content.v1.RemoveAddonRequest[]): Promise<void>;
|
|
28
|
-
/** POST /v1/:server_id/worlds/:world_id/content */
|
|
29
|
-
installContent(serverId: string, worldId: string, request: Archon.Content.v1.InstallWorldContent): Promise<void>;
|
|
30
|
-
/** POST /v1/:server_id/worlds/:world_id/content/repair */
|
|
31
|
-
repair(serverId: string, worldId: string): Promise<void>;
|
|
32
|
-
/** POST /v1/:server_id/worlds/:world_id/content/unlink-modpack */
|
|
33
|
-
unlinkModpack(serverId: string, worldId: string): Promise<void>;
|
|
34
|
-
/** GET /v1/:server_id/worlds/:world_id/addons/update?filename=... */
|
|
35
|
-
getAddonUpdate(serverId: string, worldId: string, filename: string): Promise<Archon.Content.v1.Addon>;
|
|
36
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/update */
|
|
37
|
-
updateAddon(serverId: string, worldId: string, request: Archon.Content.v1.UpdateAddonRequest): Promise<void>;
|
|
38
|
-
/** POST /v1/:server_id/worlds/:world_id/addons/update-many */
|
|
39
|
-
updateAddons(serverId: string, worldId: string, addons: Archon.Content.v1.UpdateAddonRequest[]): Promise<void>;
|
|
40
|
-
/** GET /v1/:server_id/worlds/:world_id/content/modpack/update */
|
|
41
|
-
getModpackUpdate(serverId: string, worldId: string): Promise<Archon.Content.v1.ModpackFields>;
|
|
42
|
-
/** POST /v1/:server_id/worlds/:world_id/content/modpack/update */
|
|
43
|
-
updateModpack(serverId: string, worldId: string): Promise<void>;
|
|
44
|
-
/** GET /v1/:server_id/worlds/:world_id/content/update-game-version?game_version=... */
|
|
45
|
-
getUpdateGameVersionPreview(serverId: string, worldId: string, gameVersion: string, signal?: AbortSignal): Promise<Archon.Content.v1.UpdateGameVersionPreview>;
|
|
46
|
-
/** POST /v1/:server_id/worlds/:world_id/content/update-game-version?game_version=... */
|
|
47
|
-
applyGameVersionUpdate(serverId: string, worldId: string, gameVersion: string): Promise<void>;
|
|
48
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonNodesInternalModule extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get node hostnames and region summary for admin tooling.
|
|
7
|
-
* GET /_internal/nodes/overview
|
|
8
|
-
*/
|
|
9
|
-
overview(): Promise<Archon.Nodes.Internal.Overview>;
|
|
10
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonNoticesV0Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get all server notices.
|
|
7
|
-
* GET /modrinth/v0/notices
|
|
8
|
-
*/
|
|
9
|
-
list(): Promise<Archon.Notices.v0.ListedNotice[]>;
|
|
10
|
-
/**
|
|
11
|
-
* Create a server notice.
|
|
12
|
-
* POST /modrinth/v0/notices
|
|
13
|
-
*/
|
|
14
|
-
create(request: Archon.Notices.v0.Announce): Promise<Archon.Notices.v0.PostNoticeResponseBody>;
|
|
15
|
-
/**
|
|
16
|
-
* Update a server notice.
|
|
17
|
-
* PATCH /modrinth/v0/notices/:id
|
|
18
|
-
*/
|
|
19
|
-
update(id: number, request: Archon.Notices.v0.AnnouncePatch): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Delete a server notice.
|
|
22
|
-
* DELETE /modrinth/v0/notices/:id
|
|
23
|
-
*/
|
|
24
|
-
delete(id: number): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Assign a notice to a server or node.
|
|
27
|
-
* PUT /modrinth/v0/notices/:id/assign?server=:serverId
|
|
28
|
-
* PUT /modrinth/v0/notices/:id/assign?node=:nodeId
|
|
29
|
-
*/
|
|
30
|
-
assign(id: number, target: Archon.Notices.v0.AssignmentTarget): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Unassign a notice from a server or node.
|
|
33
|
-
* PUT /modrinth/v0/notices/:id/unassign?server=:serverId
|
|
34
|
-
* PUT /modrinth/v0/notices/:id/unassign?node=:nodeId
|
|
35
|
-
*/
|
|
36
|
-
unassign(id: number, target: Archon.Notices.v0.AssignmentTarget): Promise<void>;
|
|
37
|
-
private assignmentTargetToParams;
|
|
38
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonOptionsV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/** GET /v1/servers/:server_id/worlds/:world_id/options/startup */
|
|
6
|
-
getStartup(serverId: string, worldId: string): Promise<Archon.Content.v1.RuntimeOptions>;
|
|
7
|
-
/** PATCH /v1/servers/:server_id/worlds/:world_id/options/startup */
|
|
8
|
-
patchStartup(serverId: string, worldId: string, body: Archon.Content.v1.PatchRuntimeOptions): Promise<void>;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonPropertiesV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/** GET /v1/servers/:server_id/worlds/:world_id/properties */
|
|
6
|
-
getProperties(serverId: string, worldId: string): Promise<Archon.Content.v1.PropertiesFields>;
|
|
7
|
-
/** PATCH /v1/servers/:server_id/worlds/:world_id/properties */
|
|
8
|
-
patchProperties(serverId: string, worldId: string, body: Archon.Content.v1.PatchPropertiesFields): Promise<Archon.Content.v1.PropertiesFields>;
|
|
9
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonServerUsersV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get list of users with access to a server
|
|
7
|
-
* GET /v1/servers/:server_id/users
|
|
8
|
-
*/
|
|
9
|
-
list(serverId: string): Promise<Archon.ServerUsers.v1.ServerUser[]>;
|
|
10
|
-
/**
|
|
11
|
-
* Add a user to a server
|
|
12
|
-
* POST /v1/servers/:server_id/users
|
|
13
|
-
*/
|
|
14
|
-
add(serverId: string, user: Archon.ServerUsers.v1.AddServerUserRequest): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Re-send an invite to a pending server user.
|
|
17
|
-
* POST /v1/servers/:server_id/users/:user_id/reinvite
|
|
18
|
-
*/
|
|
19
|
-
reinvite(serverId: string, userId: string): Promise<Archon.ServerUsers.v1.ReinviteResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* Remove a user from a server
|
|
22
|
-
* DELETE /v1/servers/:server_id/users/:user_id
|
|
23
|
-
*/
|
|
24
|
-
delete(serverId: string, userId: string): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Update a user's server role
|
|
27
|
-
* PATCH /v1/servers/:server_id/users/:user_id
|
|
28
|
-
*/
|
|
29
|
-
update(serverId: string, userId: string, role: Archon.ServerUsers.v1.AssignableServerUserRole): Promise<void>;
|
|
30
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { UploadHandle, UploadProgress } from '../../../types/upload';
|
|
3
|
-
import type { Archon } from '../types';
|
|
4
|
-
export declare class ArchonServersV0Module extends AbstractModule {
|
|
5
|
-
getModuleID(): string;
|
|
6
|
-
/**
|
|
7
|
-
* Get a specific server by ID
|
|
8
|
-
* GET /modrinth/v0/servers/:id
|
|
9
|
-
*/
|
|
10
|
-
get(serverId: string): Promise<Archon.Servers.v0.Server>;
|
|
11
|
-
/**
|
|
12
|
-
* Get list of servers for the authenticated user
|
|
13
|
-
* GET /modrinth/v0/servers
|
|
14
|
-
*/
|
|
15
|
-
list(options?: Archon.Servers.v0.GetServersOptions): Promise<Archon.Servers.v0.ServerGetResponse>;
|
|
16
|
-
/**
|
|
17
|
-
* Check stock availability for a region
|
|
18
|
-
* POST /modrinth/v0/stock?region=:region
|
|
19
|
-
*/
|
|
20
|
-
checkStock(region: string, request: Archon.Servers.v0.StockRequest): Promise<Archon.Servers.v0.StockResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Check stock availability (without region filter)
|
|
23
|
-
* POST /modrinth/v0/stock
|
|
24
|
-
*/
|
|
25
|
-
checkStockGlobal(request: Archon.Servers.v0.StockRequest): Promise<Archon.Servers.v0.StockResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Get filesystem authentication credentials for a server
|
|
28
|
-
* Returns URL and JWT token for accessing the server's filesystem via Kyros
|
|
29
|
-
* GET /modrinth/v0/servers/:id/fs
|
|
30
|
-
*/
|
|
31
|
-
getFilesystemAuth(serverId: string): Promise<Archon.Servers.v0.JWTAuth>;
|
|
32
|
-
/**
|
|
33
|
-
* Get WebSocket authentication credentials for a server
|
|
34
|
-
* GET /modrinth/v0/servers/:id/ws
|
|
35
|
-
*/
|
|
36
|
-
getWebSocketAuth(serverId: string): Promise<Archon.Websocket.v0.WSAuth>;
|
|
37
|
-
/**
|
|
38
|
-
* Send a power action to a server (Start, Stop, Restart, Kill)
|
|
39
|
-
* POST /modrinth/v0/servers/:id/power
|
|
40
|
-
*/
|
|
41
|
-
power(serverId: string, action: 'Start' | 'Stop' | 'Restart' | 'Kill'): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Reinstall a server with a new loader or modpack
|
|
44
|
-
* POST /modrinth/v0/servers/:id/reinstall
|
|
45
|
-
*/
|
|
46
|
-
reinstall(serverId: string, request: Archon.Servers.v0.ReinstallRequest, hardReset?: boolean): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Get authentication credentials for .mrpack file upload
|
|
49
|
-
* GET /modrinth/v0/servers/:id/reinstallFromMrpack
|
|
50
|
-
*/
|
|
51
|
-
getReinstallMrpackAuth(serverId: string): Promise<Archon.Servers.v0.MrpackReinstallAuth>;
|
|
52
|
-
/**
|
|
53
|
-
* Reinstall a server from a .mrpack file with progress tracking
|
|
54
|
-
*
|
|
55
|
-
* Two-step flow: fetches upload auth, then uploads the .mrpack file to the node.
|
|
56
|
-
*
|
|
57
|
-
* @param serverId - Server ID
|
|
58
|
-
* @param file - .mrpack file to upload
|
|
59
|
-
* @param hardReset - Whether to erase all server data
|
|
60
|
-
* @param options - Optional progress callback
|
|
61
|
-
* @returns Promise resolving to an UploadHandle with progress tracking and cancellation
|
|
62
|
-
*/
|
|
63
|
-
reinstallFromMrpack(serverId: string, file: File, hardReset?: boolean, options?: {
|
|
64
|
-
onProgress?: (progress: UploadProgress) => void;
|
|
65
|
-
}): Promise<UploadHandle<void>>;
|
|
66
|
-
/**
|
|
67
|
-
* Update a server's name
|
|
68
|
-
* POST /modrinth/v0/servers/:id/name
|
|
69
|
-
*/
|
|
70
|
-
updateName(serverId: string, name: string): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Get allocations for a server
|
|
73
|
-
* GET /modrinth/v0/servers/:id/allocations
|
|
74
|
-
*/
|
|
75
|
-
getAllocations(serverId: string): Promise<Archon.Servers.v0.Allocation[]>;
|
|
76
|
-
/**
|
|
77
|
-
* Reserve a new allocation for a server
|
|
78
|
-
* POST /modrinth/v0/servers/:id/allocations?name=...
|
|
79
|
-
*/
|
|
80
|
-
reserveAllocation(serverId: string, name: string): Promise<Archon.Servers.v0.Allocation>;
|
|
81
|
-
/**
|
|
82
|
-
* Update an allocation's name
|
|
83
|
-
* PUT /modrinth/v0/servers/:id/allocations/:port?name=...
|
|
84
|
-
*/
|
|
85
|
-
updateAllocation(serverId: string, port: number, name: string): Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Delete an allocation
|
|
88
|
-
* DELETE /modrinth/v0/servers/:id/allocations/:port
|
|
89
|
-
*/
|
|
90
|
-
deleteAllocation(serverId: string, port: number): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Check if a subdomain is available
|
|
93
|
-
* GET /modrinth/v0/subdomains/:subdomain/isavailable
|
|
94
|
-
*/
|
|
95
|
-
checkSubdomainAvailability(subdomain: string): Promise<{
|
|
96
|
-
available: boolean;
|
|
97
|
-
}>;
|
|
98
|
-
/**
|
|
99
|
-
* Change a server's subdomain
|
|
100
|
-
* POST /modrinth/v0/servers/:id/subdomain
|
|
101
|
-
*/
|
|
102
|
-
changeSubdomain(serverId: string, subdomain: string): Promise<void>;
|
|
103
|
-
/**
|
|
104
|
-
* Get startup configuration for a server
|
|
105
|
-
* GET /modrinth/v0/servers/:id/startup
|
|
106
|
-
*/
|
|
107
|
-
getStartupConfig(serverId: string): Promise<Archon.Servers.v0.StartupConfig>;
|
|
108
|
-
/**
|
|
109
|
-
* Update startup configuration for a server
|
|
110
|
-
* POST /modrinth/v0/servers/:id/startup
|
|
111
|
-
*/
|
|
112
|
-
updateStartupConfig(serverId: string, config: {
|
|
113
|
-
invocation: string | null;
|
|
114
|
-
jdk_version: string | null;
|
|
115
|
-
jdk_build: string | null;
|
|
116
|
-
}): Promise<void>;
|
|
117
|
-
/**
|
|
118
|
-
* Dismiss a server notice
|
|
119
|
-
* POST /modrinth/v0/servers/:id/notices/:noticeId/dismiss
|
|
120
|
-
*/
|
|
121
|
-
dismissNotice(serverId: string, noticeId: number): Promise<void>;
|
|
122
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonServersV1Module extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get list of servers for the authenticated user
|
|
7
|
-
* GET /v1/servers
|
|
8
|
-
*/
|
|
9
|
-
list(): Promise<Archon.Servers.v1.ServerFull[]>;
|
|
10
|
-
/**
|
|
11
|
-
* Get full server details including worlds, backups, and content
|
|
12
|
-
* GET /v1/servers/:server_id
|
|
13
|
-
*/
|
|
14
|
-
get(serverId: string): Promise<Archon.Servers.v1.ServerFull>;
|
|
15
|
-
/**
|
|
16
|
-
* Get available regions
|
|
17
|
-
* GET /v1/regions
|
|
18
|
-
*/
|
|
19
|
-
getRegions(): Promise<Archon.Servers.v1.Region[]>;
|
|
20
|
-
/**
|
|
21
|
-
* End the intro flow for a server
|
|
22
|
-
* DELETE /v1/servers/:id/flows/intro
|
|
23
|
-
*/
|
|
24
|
-
endIntro(serverId: string): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Reset a world to onboarding
|
|
27
|
-
* POST /v1/servers/:id/worlds/:wid/onboard
|
|
28
|
-
*/
|
|
29
|
-
resetToOnboarding(serverId: string, worldId: string): Promise<void>;
|
|
30
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AbstractModule } from '../../../core/abstract-module';
|
|
2
|
-
import type { Archon } from '../types';
|
|
3
|
-
export declare class ArchonTransfersInternalModule extends AbstractModule {
|
|
4
|
-
getModuleID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Schedule transfers for specific servers.
|
|
7
|
-
* POST /_internal/transfers/schedule/servers
|
|
8
|
-
*/
|
|
9
|
-
scheduleServers(request: Archon.Transfers.Internal.ScheduleServerTransfersRequest): Promise<Archon.Transfers.Internal.ScheduleTransfersResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Schedule transfers for all servers on specific nodes.
|
|
12
|
-
* POST /_internal/transfers/schedule/nodes
|
|
13
|
-
*/
|
|
14
|
-
scheduleNodes(request: Archon.Transfers.Internal.ScheduleNodeTransfersRequest): Promise<Archon.Transfers.Internal.ScheduleTransfersResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* Get transfer batch history.
|
|
17
|
-
* GET /_internal/transfers/history
|
|
18
|
-
*/
|
|
19
|
-
history(options?: Archon.Transfers.Internal.TransferHistoryQuery): Promise<Archon.Transfers.Internal.TransferHistoryResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* Cancel pending transfer batches.
|
|
22
|
-
* POST /_internal/transfers/cancel
|
|
23
|
-
*/
|
|
24
|
-
cancel(request: Archon.Transfers.Internal.CancelTransfersRequest): Promise<Archon.Transfers.Internal.CancelTransfersResponse>;
|
|
25
|
-
}
|