@modrinth/api-client 0.63.0 → 0.65.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 +137 -2
- package/dist/index.js +8 -8
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3409,6 +3409,18 @@ export declare namespace Labrinth {
|
|
|
3409
3409
|
donation: boolean;
|
|
3410
3410
|
url: string;
|
|
3411
3411
|
};
|
|
3412
|
+
export type NormalizedProjectNagKind = 'minecraft-title-clause' | 'project-name-non-standard-text' | 'project-name-profanity' | 'project-name-slur' | 'project-name-version' | 'project-summary-links' | 'project-summary-matches-title' | 'project-summary-non-english' | 'project-summary-non-standard-text' | 'project-summary-profanity' | 'project-summary-slur' | 'project-summary-spam' | 'summary-special-formatting' | 'summary-too-short' | 'add-icon' | 'feature-gallery-image' | 'upload-gallery-image' | 'gallery-text-non-standard' | 'gallery-text-profanity' | 'gallery-text-slur' | 'add-description' | 'adjacent-headers' | 'description-ends-with-header' | 'description-too-short' | 'long-headers' | 'missing-alt-text' | 'project-description-banned-link' | 'project-description-non-english' | 'project-description-non-standard-text' | 'project-description-profanity' | 'project-description-slur' | 'project-description-spam' | 'add-custom-license-details' | 'invalid-license-url' | 'select-license' | 'add-links' | 'add-links-server' | 'banned-link-usage' | 'gpl-license-source-required' | 'identical-links' | 'misused-discord-link' | 'verify-external-links' | 'review-permissions' | 'add-java-address' | 'all-languages' | 'select-compatibility' | 'select-country' | 'select-language' | 'too-many-languages' | 'all-tags-selected' | 'multiple-resolution-tags' | 'select-tags' | 'too-many-tags' | 'too-many-tags-server' | 'select-environment' | 'upload-version' | 'check-disclosures' | 'disclosures-special-formatting' | 'moderator-feedback';
|
|
3413
|
+
export type ReplaceHyphensWithUnderscores<T extends string> = T extends `${infer Head}-${infer Tail}` ? `${Head}_${ReplaceHyphensWithUnderscores<Tail>}` : T;
|
|
3414
|
+
export type ProjectNagKind = ReplaceHyphensWithUnderscores<NormalizedProjectNagKind>;
|
|
3415
|
+
export type ProjectNagSeverity = 'required' | 'warning' | 'suggestion';
|
|
3416
|
+
export type ProjectNag = {
|
|
3417
|
+
kind: ProjectNagKind;
|
|
3418
|
+
severity: ProjectNagSeverity;
|
|
3419
|
+
details: Record<string, unknown>;
|
|
3420
|
+
};
|
|
3421
|
+
export type ProjectValidationResponse = {
|
|
3422
|
+
nags: ProjectNag[];
|
|
3423
|
+
};
|
|
3412
3424
|
export type Project = {
|
|
3413
3425
|
id: string;
|
|
3414
3426
|
slug?: string;
|
|
@@ -4499,6 +4511,110 @@ export declare namespace Labrinth {
|
|
|
4499
4511
|
}
|
|
4500
4512
|
export namespace TechReview {
|
|
4501
4513
|
export namespace Internal {
|
|
4514
|
+
export type DelphiRule = {
|
|
4515
|
+
id: number;
|
|
4516
|
+
name: string;
|
|
4517
|
+
rule: string;
|
|
4518
|
+
priority: number;
|
|
4519
|
+
on_issue_types: string[];
|
|
4520
|
+
revision: number;
|
|
4521
|
+
current_revision?: number;
|
|
4522
|
+
created_at: string;
|
|
4523
|
+
updated_at: string;
|
|
4524
|
+
created_by: number | null;
|
|
4525
|
+
updated_by: number | null;
|
|
4526
|
+
affected_details_count: number;
|
|
4527
|
+
affected_details: DelphiRuleAffectedDetail[];
|
|
4528
|
+
};
|
|
4529
|
+
export type DelphiRuleAffectedDetail = {
|
|
4530
|
+
detail_id: string;
|
|
4531
|
+
issue_id: string;
|
|
4532
|
+
project_id: string | null;
|
|
4533
|
+
project_name: string | null;
|
|
4534
|
+
project_icon_url: string | null;
|
|
4535
|
+
version_id: string | null;
|
|
4536
|
+
version_name: string | null;
|
|
4537
|
+
version_number: string | null;
|
|
4538
|
+
issue_type: string;
|
|
4539
|
+
key: string;
|
|
4540
|
+
jar: string | null;
|
|
4541
|
+
file_path: string;
|
|
4542
|
+
original_severity: DelphiSeverity;
|
|
4543
|
+
severity: DelphiSeverity;
|
|
4544
|
+
};
|
|
4545
|
+
export type GetRuleAffectedDetailsRequest = {
|
|
4546
|
+
limit?: number;
|
|
4547
|
+
page?: number;
|
|
4548
|
+
};
|
|
4549
|
+
export type GetRuleAffectedDetailsResponse = {
|
|
4550
|
+
total: number;
|
|
4551
|
+
details: DelphiRuleAffectedDetail[];
|
|
4552
|
+
};
|
|
4553
|
+
export type WriteDelphiRule = {
|
|
4554
|
+
name: string;
|
|
4555
|
+
rule: string;
|
|
4556
|
+
priority: number;
|
|
4557
|
+
on_issue_types: string[];
|
|
4558
|
+
};
|
|
4559
|
+
export type DelphiIssueTypeSchemaResponse = Record<string, unknown>;
|
|
4560
|
+
export type TestDelphiRuleRequest = {
|
|
4561
|
+
rule: string;
|
|
4562
|
+
inputs: RuleInput[];
|
|
4563
|
+
};
|
|
4564
|
+
export type DelphiRuleEffect = {
|
|
4565
|
+
severity: DelphiSeverity;
|
|
4566
|
+
};
|
|
4567
|
+
export type DelphiRuleSchema = Record<string, unknown>;
|
|
4568
|
+
export type DelphiRuleSchemaResponse = {
|
|
4569
|
+
input: DelphiRuleSchema;
|
|
4570
|
+
output: DelphiRuleSchema;
|
|
4571
|
+
components: Record<string, DelphiRuleSchema>;
|
|
4572
|
+
};
|
|
4573
|
+
export type RuleInput = {
|
|
4574
|
+
schema_version: number;
|
|
4575
|
+
trace: RuleTrace;
|
|
4576
|
+
file_traces: RuleTrace[];
|
|
4577
|
+
scan: {
|
|
4578
|
+
delphi_version: number;
|
|
4579
|
+
};
|
|
4580
|
+
artifact: {
|
|
4581
|
+
size: number | null;
|
|
4582
|
+
hashes: Record<string, string>;
|
|
4583
|
+
};
|
|
4584
|
+
project: {
|
|
4585
|
+
id: string | null;
|
|
4586
|
+
types: string[];
|
|
4587
|
+
};
|
|
4588
|
+
version: {
|
|
4589
|
+
id: string | null;
|
|
4590
|
+
loaders: string[];
|
|
4591
|
+
};
|
|
4592
|
+
file: {
|
|
4593
|
+
id: string | null;
|
|
4594
|
+
};
|
|
4595
|
+
};
|
|
4596
|
+
export type RuleTrace = {
|
|
4597
|
+
key: string;
|
|
4598
|
+
issue_type: string;
|
|
4599
|
+
severity: DelphiSeverity;
|
|
4600
|
+
jar: string | null;
|
|
4601
|
+
file_path: string;
|
|
4602
|
+
data: Record<string, unknown>;
|
|
4603
|
+
};
|
|
4604
|
+
export type TestDelphiRuleResponse = {
|
|
4605
|
+
effects: Array<DelphiRuleEffect | null>;
|
|
4606
|
+
};
|
|
4607
|
+
export type DelphiRuleScanPhase = 'scanning' | 'publishing' | 'complete';
|
|
4608
|
+
export type DelphiRuleScanEvent = {
|
|
4609
|
+
phase: DelphiRuleScanPhase;
|
|
4610
|
+
revision: number;
|
|
4611
|
+
scanned: number;
|
|
4612
|
+
total: number;
|
|
4613
|
+
effects: number;
|
|
4614
|
+
};
|
|
4615
|
+
export type DelphiRuleScanErrorEvent = {
|
|
4616
|
+
message: string;
|
|
4617
|
+
};
|
|
4502
4618
|
export type SearchProjectsRequest = {
|
|
4503
4619
|
limit?: number;
|
|
4504
4620
|
page?: number;
|
|
@@ -4602,6 +4718,9 @@ export declare namespace Labrinth {
|
|
|
4602
4718
|
download_url: string;
|
|
4603
4719
|
issues: FileIssue[];
|
|
4604
4720
|
};
|
|
4721
|
+
export type GetIssueRequest = {
|
|
4722
|
+
include_hidden?: boolean;
|
|
4723
|
+
};
|
|
4605
4724
|
export type FileIssue = {
|
|
4606
4725
|
id: string;
|
|
4607
4726
|
report_id: string;
|
|
@@ -4701,7 +4820,7 @@ export declare namespace Labrinth {
|
|
|
4701
4820
|
members: User[];
|
|
4702
4821
|
};
|
|
4703
4822
|
export type FlagReason = 'delphi';
|
|
4704
|
-
export type DelphiSeverity = 'low' | 'medium' | 'high' | 'severe';
|
|
4823
|
+
export type DelphiSeverity = 'hidden' | 'low' | 'medium' | 'high' | 'severe' | 'malware';
|
|
4705
4824
|
export type DelphiReportIssueStatus = 'pending' | 'safe' | 'unsafe';
|
|
4706
4825
|
export type ProjectReportResponse = {
|
|
4707
4826
|
project_report: ProjectReport | null;
|
|
@@ -5758,6 +5877,7 @@ declare class LabrinthProjectsV3Module extends AbstractModule {
|
|
|
5758
5877
|
* ```
|
|
5759
5878
|
*/
|
|
5760
5879
|
get(id: string): Promise<Labrinth.Projects.v3.Project>;
|
|
5880
|
+
validate(id: string): Promise<Labrinth.Projects.v3.ProjectValidationResponse>;
|
|
5761
5881
|
/**
|
|
5762
5882
|
* Get a project's dependencies (v3)
|
|
5763
5883
|
*
|
|
@@ -6137,6 +6257,16 @@ declare class LabrinthTeamsV3Module extends AbstractModule {
|
|
|
6137
6257
|
|
|
6138
6258
|
declare class LabrinthTechReviewInternalModule extends AbstractModule {
|
|
6139
6259
|
getModuleID(): string;
|
|
6260
|
+
getRules(): Promise<Labrinth.TechReview.Internal.DelphiRule[]>;
|
|
6261
|
+
getRuleSchema(): Promise<Labrinth.TechReview.Internal.DelphiRuleSchemaResponse>;
|
|
6262
|
+
getIssueTypeSchema(): Promise<Labrinth.TechReview.Internal.DelphiIssueTypeSchemaResponse>;
|
|
6263
|
+
getDetailRuleInput(detailId: string): Promise<Labrinth.TechReview.Internal.RuleInput>;
|
|
6264
|
+
getRuleAffectedDetails(id: number, params?: Labrinth.TechReview.Internal.GetRuleAffectedDetailsRequest): Promise<Labrinth.TechReview.Internal.GetRuleAffectedDetailsResponse>;
|
|
6265
|
+
testRule(request: Labrinth.TechReview.Internal.TestDelphiRuleRequest): Promise<Labrinth.TechReview.Internal.TestDelphiRuleResponse>;
|
|
6266
|
+
createRule(rule: Labrinth.TechReview.Internal.WriteDelphiRule): Promise<Labrinth.TechReview.Internal.DelphiRule>;
|
|
6267
|
+
updateRule(id: number, rule: Labrinth.TechReview.Internal.WriteDelphiRule): Promise<Labrinth.TechReview.Internal.DelphiRule>;
|
|
6268
|
+
deleteRule(id: number): Promise<void>;
|
|
6269
|
+
scanRules(signal?: AbortSignal): Promise<ReadableStream<Uint8Array>>;
|
|
6140
6270
|
/**
|
|
6141
6271
|
* Search for projects awaiting technical review.
|
|
6142
6272
|
*
|
|
@@ -6178,6 +6308,7 @@ declare class LabrinthTechReviewInternalModule extends AbstractModule {
|
|
|
6178
6308
|
* Get detailed information about a specific issue.
|
|
6179
6309
|
*
|
|
6180
6310
|
* @param issueId - The issue ID
|
|
6311
|
+
* @param params - Options controlling which issue details are returned
|
|
6181
6312
|
* @returns Issue with all its details
|
|
6182
6313
|
*
|
|
6183
6314
|
* @example
|
|
@@ -6186,7 +6317,7 @@ declare class LabrinthTechReviewInternalModule extends AbstractModule {
|
|
|
6186
6317
|
* console.log(issue.issue_type, issue.status)
|
|
6187
6318
|
* ```
|
|
6188
6319
|
*/
|
|
6189
|
-
getIssue(issueId: string): Promise<Labrinth.TechReview.Internal.FileIssue>;
|
|
6320
|
+
getIssue(issueId: string, params?: Labrinth.TechReview.Internal.GetIssueRequest): Promise<Labrinth.TechReview.Internal.FileIssue>;
|
|
6190
6321
|
/**
|
|
6191
6322
|
* Update the status of a technical review issue detail.
|
|
6192
6323
|
*
|
|
@@ -6808,6 +6939,10 @@ export declare type ModrinthErrorResponse = {
|
|
|
6808
6939
|
* Human-readable error description
|
|
6809
6940
|
*/
|
|
6810
6941
|
description: string;
|
|
6942
|
+
/**
|
|
6943
|
+
* Structured details about the error
|
|
6944
|
+
*/
|
|
6945
|
+
details?: unknown;
|
|
6811
6946
|
/**
|
|
6812
6947
|
* Optional context about where the error occurred
|
|
6813
6948
|
*/
|