@modrinth/api-client 0.63.0 → 0.64.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 +124 -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
|
@@ -4499,6 +4499,110 @@ export declare namespace Labrinth {
|
|
|
4499
4499
|
}
|
|
4500
4500
|
export namespace TechReview {
|
|
4501
4501
|
export namespace Internal {
|
|
4502
|
+
export type DelphiRule = {
|
|
4503
|
+
id: number;
|
|
4504
|
+
name: string;
|
|
4505
|
+
rule: string;
|
|
4506
|
+
priority: number;
|
|
4507
|
+
on_issue_types: string[];
|
|
4508
|
+
revision: number;
|
|
4509
|
+
current_revision?: number;
|
|
4510
|
+
created_at: string;
|
|
4511
|
+
updated_at: string;
|
|
4512
|
+
created_by: number | null;
|
|
4513
|
+
updated_by: number | null;
|
|
4514
|
+
affected_details_count: number;
|
|
4515
|
+
affected_details: DelphiRuleAffectedDetail[];
|
|
4516
|
+
};
|
|
4517
|
+
export type DelphiRuleAffectedDetail = {
|
|
4518
|
+
detail_id: string;
|
|
4519
|
+
issue_id: string;
|
|
4520
|
+
project_id: string | null;
|
|
4521
|
+
project_name: string | null;
|
|
4522
|
+
project_icon_url: string | null;
|
|
4523
|
+
version_id: string | null;
|
|
4524
|
+
version_name: string | null;
|
|
4525
|
+
version_number: string | null;
|
|
4526
|
+
issue_type: string;
|
|
4527
|
+
key: string;
|
|
4528
|
+
jar: string | null;
|
|
4529
|
+
file_path: string;
|
|
4530
|
+
original_severity: DelphiSeverity;
|
|
4531
|
+
severity: DelphiSeverity;
|
|
4532
|
+
};
|
|
4533
|
+
export type GetRuleAffectedDetailsRequest = {
|
|
4534
|
+
limit?: number;
|
|
4535
|
+
page?: number;
|
|
4536
|
+
};
|
|
4537
|
+
export type GetRuleAffectedDetailsResponse = {
|
|
4538
|
+
total: number;
|
|
4539
|
+
details: DelphiRuleAffectedDetail[];
|
|
4540
|
+
};
|
|
4541
|
+
export type WriteDelphiRule = {
|
|
4542
|
+
name: string;
|
|
4543
|
+
rule: string;
|
|
4544
|
+
priority: number;
|
|
4545
|
+
on_issue_types: string[];
|
|
4546
|
+
};
|
|
4547
|
+
export type DelphiIssueTypeSchemaResponse = Record<string, unknown>;
|
|
4548
|
+
export type TestDelphiRuleRequest = {
|
|
4549
|
+
rule: string;
|
|
4550
|
+
inputs: RuleInput[];
|
|
4551
|
+
};
|
|
4552
|
+
export type DelphiRuleEffect = {
|
|
4553
|
+
severity: DelphiSeverity;
|
|
4554
|
+
};
|
|
4555
|
+
export type DelphiRuleSchema = Record<string, unknown>;
|
|
4556
|
+
export type DelphiRuleSchemaResponse = {
|
|
4557
|
+
input: DelphiRuleSchema;
|
|
4558
|
+
output: DelphiRuleSchema;
|
|
4559
|
+
components: Record<string, DelphiRuleSchema>;
|
|
4560
|
+
};
|
|
4561
|
+
export type RuleInput = {
|
|
4562
|
+
schema_version: number;
|
|
4563
|
+
trace: RuleTrace;
|
|
4564
|
+
file_traces: RuleTrace[];
|
|
4565
|
+
scan: {
|
|
4566
|
+
delphi_version: number;
|
|
4567
|
+
};
|
|
4568
|
+
artifact: {
|
|
4569
|
+
size: number | null;
|
|
4570
|
+
hashes: Record<string, string>;
|
|
4571
|
+
};
|
|
4572
|
+
project: {
|
|
4573
|
+
id: string | null;
|
|
4574
|
+
types: string[];
|
|
4575
|
+
};
|
|
4576
|
+
version: {
|
|
4577
|
+
id: string | null;
|
|
4578
|
+
loaders: string[];
|
|
4579
|
+
};
|
|
4580
|
+
file: {
|
|
4581
|
+
id: string | null;
|
|
4582
|
+
};
|
|
4583
|
+
};
|
|
4584
|
+
export type RuleTrace = {
|
|
4585
|
+
key: string;
|
|
4586
|
+
issue_type: string;
|
|
4587
|
+
severity: DelphiSeverity;
|
|
4588
|
+
jar: string | null;
|
|
4589
|
+
file_path: string;
|
|
4590
|
+
data: Record<string, unknown>;
|
|
4591
|
+
};
|
|
4592
|
+
export type TestDelphiRuleResponse = {
|
|
4593
|
+
effects: Array<DelphiRuleEffect | null>;
|
|
4594
|
+
};
|
|
4595
|
+
export type DelphiRuleScanPhase = 'scanning' | 'publishing' | 'complete';
|
|
4596
|
+
export type DelphiRuleScanEvent = {
|
|
4597
|
+
phase: DelphiRuleScanPhase;
|
|
4598
|
+
revision: number;
|
|
4599
|
+
scanned: number;
|
|
4600
|
+
total: number;
|
|
4601
|
+
effects: number;
|
|
4602
|
+
};
|
|
4603
|
+
export type DelphiRuleScanErrorEvent = {
|
|
4604
|
+
message: string;
|
|
4605
|
+
};
|
|
4502
4606
|
export type SearchProjectsRequest = {
|
|
4503
4607
|
limit?: number;
|
|
4504
4608
|
page?: number;
|
|
@@ -4602,6 +4706,9 @@ export declare namespace Labrinth {
|
|
|
4602
4706
|
download_url: string;
|
|
4603
4707
|
issues: FileIssue[];
|
|
4604
4708
|
};
|
|
4709
|
+
export type GetIssueRequest = {
|
|
4710
|
+
include_hidden?: boolean;
|
|
4711
|
+
};
|
|
4605
4712
|
export type FileIssue = {
|
|
4606
4713
|
id: string;
|
|
4607
4714
|
report_id: string;
|
|
@@ -4701,7 +4808,7 @@ export declare namespace Labrinth {
|
|
|
4701
4808
|
members: User[];
|
|
4702
4809
|
};
|
|
4703
4810
|
export type FlagReason = 'delphi';
|
|
4704
|
-
export type DelphiSeverity = 'low' | 'medium' | 'high' | 'severe';
|
|
4811
|
+
export type DelphiSeverity = 'hidden' | 'low' | 'medium' | 'high' | 'severe' | 'malware';
|
|
4705
4812
|
export type DelphiReportIssueStatus = 'pending' | 'safe' | 'unsafe';
|
|
4706
4813
|
export type ProjectReportResponse = {
|
|
4707
4814
|
project_report: ProjectReport | null;
|
|
@@ -6137,6 +6244,16 @@ declare class LabrinthTeamsV3Module extends AbstractModule {
|
|
|
6137
6244
|
|
|
6138
6245
|
declare class LabrinthTechReviewInternalModule extends AbstractModule {
|
|
6139
6246
|
getModuleID(): string;
|
|
6247
|
+
getRules(): Promise<Labrinth.TechReview.Internal.DelphiRule[]>;
|
|
6248
|
+
getRuleSchema(): Promise<Labrinth.TechReview.Internal.DelphiRuleSchemaResponse>;
|
|
6249
|
+
getIssueTypeSchema(): Promise<Labrinth.TechReview.Internal.DelphiIssueTypeSchemaResponse>;
|
|
6250
|
+
getDetailRuleInput(detailId: string): Promise<Labrinth.TechReview.Internal.RuleInput>;
|
|
6251
|
+
getRuleAffectedDetails(id: number, params?: Labrinth.TechReview.Internal.GetRuleAffectedDetailsRequest): Promise<Labrinth.TechReview.Internal.GetRuleAffectedDetailsResponse>;
|
|
6252
|
+
testRule(request: Labrinth.TechReview.Internal.TestDelphiRuleRequest): Promise<Labrinth.TechReview.Internal.TestDelphiRuleResponse>;
|
|
6253
|
+
createRule(rule: Labrinth.TechReview.Internal.WriteDelphiRule): Promise<Labrinth.TechReview.Internal.DelphiRule>;
|
|
6254
|
+
updateRule(id: number, rule: Labrinth.TechReview.Internal.WriteDelphiRule): Promise<Labrinth.TechReview.Internal.DelphiRule>;
|
|
6255
|
+
deleteRule(id: number): Promise<void>;
|
|
6256
|
+
scanRules(signal?: AbortSignal): Promise<ReadableStream<Uint8Array>>;
|
|
6140
6257
|
/**
|
|
6141
6258
|
* Search for projects awaiting technical review.
|
|
6142
6259
|
*
|
|
@@ -6178,6 +6295,7 @@ declare class LabrinthTechReviewInternalModule extends AbstractModule {
|
|
|
6178
6295
|
* Get detailed information about a specific issue.
|
|
6179
6296
|
*
|
|
6180
6297
|
* @param issueId - The issue ID
|
|
6298
|
+
* @param params - Options controlling which issue details are returned
|
|
6181
6299
|
* @returns Issue with all its details
|
|
6182
6300
|
*
|
|
6183
6301
|
* @example
|
|
@@ -6186,7 +6304,7 @@ declare class LabrinthTechReviewInternalModule extends AbstractModule {
|
|
|
6186
6304
|
* console.log(issue.issue_type, issue.status)
|
|
6187
6305
|
* ```
|
|
6188
6306
|
*/
|
|
6189
|
-
getIssue(issueId: string): Promise<Labrinth.TechReview.Internal.FileIssue>;
|
|
6307
|
+
getIssue(issueId: string, params?: Labrinth.TechReview.Internal.GetIssueRequest): Promise<Labrinth.TechReview.Internal.FileIssue>;
|
|
6190
6308
|
/**
|
|
6191
6309
|
* Update the status of a technical review issue detail.
|
|
6192
6310
|
*
|
|
@@ -6808,6 +6926,10 @@ export declare type ModrinthErrorResponse = {
|
|
|
6808
6926
|
* Human-readable error description
|
|
6809
6927
|
*/
|
|
6810
6928
|
description: string;
|
|
6929
|
+
/**
|
|
6930
|
+
* Structured details about the error
|
|
6931
|
+
*/
|
|
6932
|
+
details?: unknown;
|
|
6811
6933
|
/**
|
|
6812
6934
|
* Optional context about where the error occurred
|
|
6813
6935
|
*/
|