@modrinth/api-client 0.95.0 → 0.97.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 +47 -85
- package/dist/index.js +7 -7
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1081,12 +1081,32 @@ export declare namespace Archon {
|
|
|
1081
1081
|
status: BackupStatus;
|
|
1082
1082
|
locked: boolean;
|
|
1083
1083
|
automated: boolean;
|
|
1084
|
+
rotates_at?: string;
|
|
1084
1085
|
history: BackupQueueOperation[];
|
|
1085
1086
|
};
|
|
1086
1087
|
export type BackupsQueueResponse = {
|
|
1087
1088
|
active_operations: ActiveOperation[];
|
|
1088
1089
|
backups: BackupQueueBackup[];
|
|
1089
1090
|
};
|
|
1091
|
+
export type WorldBackupOptions = {
|
|
1092
|
+
split_automatic: number;
|
|
1093
|
+
split_manual: number;
|
|
1094
|
+
limit: number;
|
|
1095
|
+
interval: number;
|
|
1096
|
+
};
|
|
1097
|
+
export type BackupsQueueWithOptionsResponse = BackupsQueueResponse & {
|
|
1098
|
+
options: WorldBackupOptions;
|
|
1099
|
+
next_auto_backup_at: string | null;
|
|
1100
|
+
};
|
|
1101
|
+
export type PatchWorldBackupOptions = {
|
|
1102
|
+
split_automatic?: number;
|
|
1103
|
+
split_manual?: number;
|
|
1104
|
+
interval?: number;
|
|
1105
|
+
};
|
|
1106
|
+
export type PatchWorldBackupOptionsResponse = {
|
|
1107
|
+
applied: boolean;
|
|
1108
|
+
backup_ids?: string[];
|
|
1109
|
+
};
|
|
1090
1110
|
}
|
|
1091
1111
|
}
|
|
1092
1112
|
export namespace Sync {
|
|
@@ -1432,6 +1452,10 @@ declare class ArchonBackupsQueueV1Module extends AbstractModule {
|
|
|
1432
1452
|
getModuleID(): string;
|
|
1433
1453
|
/** GET /v1/servers/:server_id/worlds/:world_id/backups-queue */
|
|
1434
1454
|
list(serverId: string, worldId: string): Promise<Archon.BackupsQueue.v1.BackupsQueueResponse>;
|
|
1455
|
+
/** GET /v1/servers/:server_id/worlds/:world_id/backups-queue/with-options */
|
|
1456
|
+
listWithOptions(serverId: string, worldId: string): Promise<Archon.BackupsQueue.v1.BackupsQueueWithOptionsResponse>;
|
|
1457
|
+
/** PATCH /v1/servers/:server_id/worlds/:world_id/backups-queue/with-options */
|
|
1458
|
+
patchOptions(serverId: string, worldId: string, request: Archon.BackupsQueue.v1.PatchWorldBackupOptions, acknowledgeRotation?: boolean): Promise<Archon.BackupsQueue.v1.PatchWorldBackupOptionsResponse>;
|
|
1435
1459
|
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue */
|
|
1436
1460
|
create(serverId: string, worldId: string, request: Archon.BackupsQueue.v1.BackupRequest): Promise<Archon.BackupsQueue.v1.PostBackupQueueResponse>;
|
|
1437
1461
|
/** POST /v1/servers/:server_id/worlds/:world_id/backups-queue/history/create/:operation_id/ack */
|
|
@@ -2314,6 +2338,14 @@ export declare namespace Kyros {
|
|
|
2314
2338
|
}
|
|
2315
2339
|
}
|
|
2316
2340
|
}
|
|
2341
|
+
export namespace Backups {
|
|
2342
|
+
export namespace v1 {
|
|
2343
|
+
export type BackupDumpFormat = 'zip';
|
|
2344
|
+
export interface BackupDownloadAuthorization {
|
|
2345
|
+
token: string;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2317
2349
|
export namespace Files {
|
|
2318
2350
|
export namespace v1 {
|
|
2319
2351
|
export interface FileDownloadAuthorization {
|
|
@@ -2373,6 +2405,18 @@ export declare namespace Kyros {
|
|
|
2373
2405
|
}
|
|
2374
2406
|
}
|
|
2375
2407
|
|
|
2408
|
+
declare class KyrosBackupsV1Module extends AbstractModule {
|
|
2409
|
+
getModuleID(): string;
|
|
2410
|
+
/**
|
|
2411
|
+
* Authorize a short-lived, single-use backup download.
|
|
2412
|
+
*/
|
|
2413
|
+
authorizeDownload(nodeUrlHost: string, worldId: string, backupId: string, format?: Kyros.Backups.v1.BackupDumpFormat): Promise<Kyros.Backups.v1.BackupDownloadAuthorization>;
|
|
2414
|
+
/**
|
|
2415
|
+
* Build the browser URL for a previously authorized backup download.
|
|
2416
|
+
*/
|
|
2417
|
+
getDownloadUrl(nodeUrlHost: string, worldId: string, backupId: string, token: string): string;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2376
2420
|
declare class KyrosContentV1Module extends AbstractModule {
|
|
2377
2421
|
getModuleID(): string;
|
|
2378
2422
|
/**
|
|
@@ -2806,24 +2850,6 @@ export declare namespace Labrinth {
|
|
|
2806
2850
|
};
|
|
2807
2851
|
}
|
|
2808
2852
|
}
|
|
2809
|
-
export namespace Affiliate {
|
|
2810
|
-
export namespace Internal {
|
|
2811
|
-
export type AffiliateCode = {
|
|
2812
|
-
id: string;
|
|
2813
|
-
created_at: string | null;
|
|
2814
|
-
created_by: string | null;
|
|
2815
|
-
affiliate: string;
|
|
2816
|
-
source_name: string;
|
|
2817
|
-
};
|
|
2818
|
-
export type CreateRequest = {
|
|
2819
|
-
affiliate?: string;
|
|
2820
|
-
source_name: string;
|
|
2821
|
-
};
|
|
2822
|
-
export type PatchRequest = {
|
|
2823
|
-
source_name: string;
|
|
2824
|
-
};
|
|
2825
|
-
}
|
|
2826
|
-
}
|
|
2827
2853
|
export namespace Attribution {
|
|
2828
2854
|
export namespace Internal {
|
|
2829
2855
|
export type AttributionPermissionKind = 'license' | 'my_project' | 'special_permissions' | 'globally_allowed' | 'no_permission';
|
|
@@ -3010,9 +3036,6 @@ export declare namespace Labrinth {
|
|
|
3010
3036
|
project_downloads?: Metrics<ProjectDownloadsField, ProjectDownloadsFilters>;
|
|
3011
3037
|
project_playtime?: Metrics<ProjectPlaytimeField, ProjectPlaytimeFilters>;
|
|
3012
3038
|
project_revenue?: Metrics<ProjectRevenueField, ProjectRevenueFilters>;
|
|
3013
|
-
affiliate_code_clicks?: Metrics<AffiliateCodeClicksField, AffiliateCodeClicksFilters>;
|
|
3014
|
-
affiliate_code_conversions?: Metrics<AffiliateCodeConversionsField, AffiliateCodeConversionsFilters>;
|
|
3015
|
-
affiliate_code_revenue?: Metrics<AffiliateCodeRevenueField, AffiliateCodeRevenueFilters>;
|
|
3016
3039
|
};
|
|
3017
3040
|
export type Metrics<BucketBy, FilterBy> = {
|
|
3018
3041
|
bucket_by?: BucketBy[];
|
|
@@ -3023,9 +3046,6 @@ export declare namespace Labrinth {
|
|
|
3023
3046
|
export type ProjectPlaytimeField = 'project_id' | 'version_id' | 'loader' | 'game_version' | 'country';
|
|
3024
3047
|
export type ProjectRevenueField = 'project_id' | 'user_id';
|
|
3025
3048
|
export type DownloadReason = 'standalone' | 'dependency' | 'modpack' | 'update';
|
|
3026
|
-
export type AffiliateCodeClicksField = 'affiliate_code_id';
|
|
3027
|
-
export type AffiliateCodeConversionsField = 'affiliate_code_id';
|
|
3028
|
-
export type AffiliateCodeRevenueField = 'affiliate_code_id';
|
|
3029
3049
|
export type ProjectViewsFilters = {
|
|
3030
3050
|
domain?: string[];
|
|
3031
3051
|
site_path?: string[];
|
|
@@ -3052,15 +3072,6 @@ export declare namespace Labrinth {
|
|
|
3052
3072
|
export type ProjectRevenueFilters = {
|
|
3053
3073
|
user_id?: string[];
|
|
3054
3074
|
};
|
|
3055
|
-
export type AffiliateCodeClicksFilters = {
|
|
3056
|
-
affiliate_code_id?: string[];
|
|
3057
|
-
};
|
|
3058
|
-
export type AffiliateCodeConversionsFilters = {
|
|
3059
|
-
affiliate_code_id?: string[];
|
|
3060
|
-
};
|
|
3061
|
-
export type AffiliateCodeRevenueFilters = {
|
|
3062
|
-
affiliate_code_id?: string[];
|
|
3063
|
-
};
|
|
3064
3075
|
export type FetchResponse = {
|
|
3065
3076
|
metrics: TimeSlice[];
|
|
3066
3077
|
projects: Record<string, Projects.v3.Project>;
|
|
@@ -3113,7 +3124,7 @@ export declare namespace Labrinth {
|
|
|
3113
3124
|
status_from: Projects.v2.ProjectStatus;
|
|
3114
3125
|
status_to: Projects.v2.ProjectStatus;
|
|
3115
3126
|
};
|
|
3116
|
-
export type AnalyticsData = ProjectAnalytics
|
|
3127
|
+
export type AnalyticsData = ProjectAnalytics;
|
|
3117
3128
|
export type ProjectAnalytics = {
|
|
3118
3129
|
source_project: string;
|
|
3119
3130
|
} & ProjectMetrics;
|
|
@@ -3156,25 +3167,6 @@ export declare namespace Labrinth {
|
|
|
3156
3167
|
user_id?: string;
|
|
3157
3168
|
revenue: string;
|
|
3158
3169
|
};
|
|
3159
|
-
export type AffiliateCodeAnalytics = {
|
|
3160
|
-
source_affiliate_code: string;
|
|
3161
|
-
} & AffiliateCodeMetrics;
|
|
3162
|
-
export type AffiliateCodeMetrics = ({
|
|
3163
|
-
metric_kind: 'clicks';
|
|
3164
|
-
} & AffiliateCodeClicks) | ({
|
|
3165
|
-
metric_kind: 'conversions';
|
|
3166
|
-
} & AffiliateCodeConversions) | ({
|
|
3167
|
-
metric_kind: 'revenue';
|
|
3168
|
-
} & AffiliateCodeRevenue);
|
|
3169
|
-
export type AffiliateCodeClicks = {
|
|
3170
|
-
clicks: number;
|
|
3171
|
-
};
|
|
3172
|
-
export type AffiliateCodeConversions = {
|
|
3173
|
-
conversions: number;
|
|
3174
|
-
};
|
|
3175
|
-
export type AffiliateCodeRevenue = {
|
|
3176
|
-
revenue: string;
|
|
3177
|
-
};
|
|
3178
3170
|
}
|
|
3179
3171
|
}
|
|
3180
3172
|
export namespace Auth {
|
|
@@ -5235,35 +5227,6 @@ export declare namespace Labrinth {
|
|
|
5235
5227
|
}
|
|
5236
5228
|
}
|
|
5237
5229
|
|
|
5238
|
-
declare class LabrinthAffiliateInternalModule extends AbstractModule {
|
|
5239
|
-
getModuleID(): string;
|
|
5240
|
-
/**
|
|
5241
|
-
* Get all affiliate codes for the authenticated user (or all if admin)
|
|
5242
|
-
* GET /_internal/affiliate
|
|
5243
|
-
*/
|
|
5244
|
-
getAll(): Promise<Labrinth.Affiliate.Internal.AffiliateCode[]>;
|
|
5245
|
-
/**
|
|
5246
|
-
* Create a new affiliate code
|
|
5247
|
-
* PUT /_internal/affiliate
|
|
5248
|
-
*/
|
|
5249
|
-
create(data: Labrinth.Affiliate.Internal.CreateRequest): Promise<Labrinth.Affiliate.Internal.AffiliateCode>;
|
|
5250
|
-
/**
|
|
5251
|
-
* Get a specific affiliate code by ID
|
|
5252
|
-
* GET /_internal/affiliate/{id}
|
|
5253
|
-
*/
|
|
5254
|
-
get(id: string): Promise<Labrinth.Affiliate.Internal.AffiliateCode>;
|
|
5255
|
-
/**
|
|
5256
|
-
* Delete an affiliate code
|
|
5257
|
-
* DELETE /_internal/affiliate/{id}
|
|
5258
|
-
*/
|
|
5259
|
-
delete(id: string): Promise<void>;
|
|
5260
|
-
/**
|
|
5261
|
-
* Update an affiliate code's source name
|
|
5262
|
-
* PATCH /_internal/affiliate/{id}
|
|
5263
|
-
*/
|
|
5264
|
-
patch(id: string, data: Labrinth.Affiliate.Internal.PatchRequest): Promise<void>;
|
|
5265
|
-
}
|
|
5266
|
-
|
|
5267
5230
|
declare class LabrinthAnalyticsInternalModule extends AbstractModule {
|
|
5268
5231
|
getModuleID(): string;
|
|
5269
5232
|
/**
|
|
@@ -5286,8 +5249,7 @@ declare class LabrinthAnalyticsInternalModule extends AbstractModule {
|
|
|
5286
5249
|
declare class LabrinthAnalyticsV3Module extends AbstractModule {
|
|
5287
5250
|
getModuleID(): string;
|
|
5288
5251
|
/**
|
|
5289
|
-
* Fetch analytics data for the authenticated user's accessible projects
|
|
5290
|
-
* and affiliate codes.
|
|
5252
|
+
* Fetch analytics data for the authenticated user's accessible projects.
|
|
5291
5253
|
*
|
|
5292
5254
|
* @param data - Analytics request body defining time range and requested metrics
|
|
5293
5255
|
* @returns Promise resolving to the analytics response, with time slices in `metrics`
|
|
@@ -7384,12 +7346,12 @@ declare const MODULE_REGISTRY: {
|
|
|
7384
7346
|
readonly mclogs_insights_v1: typeof MclogsInsightsV1Module;
|
|
7385
7347
|
readonly mclogs_logs_v1: typeof MclogsLogsV1Module;
|
|
7386
7348
|
readonly launchermeta_manifest_v0: typeof LauncherMetaManifestV0Module;
|
|
7349
|
+
readonly kyros_backups_v1: typeof KyrosBackupsV1Module;
|
|
7387
7350
|
readonly kyros_content_v1: typeof KyrosContentV1Module;
|
|
7388
7351
|
readonly kyros_files_v0: typeof KyrosFilesV0Module;
|
|
7389
7352
|
readonly kyros_files_v1: typeof KyrosFilesV1Module;
|
|
7390
7353
|
readonly kyros_logs_v1: typeof KyrosLogsV1Module;
|
|
7391
7354
|
readonly kyros_upload_sessions_v1: typeof KyrosUploadSessionsV1Module;
|
|
7392
|
-
readonly labrinth_affiliate_internal: typeof LabrinthAffiliateInternalModule;
|
|
7393
7355
|
readonly labrinth_analytics_internal: typeof LabrinthAnalyticsInternalModule;
|
|
7394
7356
|
readonly labrinth_analytics_v3: typeof LabrinthAnalyticsV3Module;
|
|
7395
7357
|
readonly labrinth_auth_internal: typeof LabrinthAuthInternalModule;
|