show in/out schema

This commit is contained in:
aecsocket
2026-07-22 20:14:57 +01:00
parent 28154689f4
commit ea42c644f3
6 changed files with 707 additions and 90 deletions
@@ -17,6 +17,30 @@ export class LabrinthTechReviewInternalModule extends AbstractModule {
)
}
public async getRuleSchema(): Promise<Labrinth.TechReview.Internal.DelphiRuleSchemaResponse> {
return this.client.request<Labrinth.TechReview.Internal.DelphiRuleSchemaResponse>(
'/moderation/tech-review/rules/schema',
{
api: 'labrinth',
version: 'internal',
method: 'GET',
},
)
}
public async getRuleAffectedDetails(
id: number,
): Promise<Labrinth.TechReview.Internal.DelphiRuleAffectedDetail[]> {
return this.client.request<Labrinth.TechReview.Internal.DelphiRuleAffectedDetail[]>(
`/moderation/tech-review/rules/${id}/effects`,
{
api: 'labrinth',
version: 'internal',
method: 'GET',
},
)
}
public async testRule(
request: Labrinth.TechReview.Internal.TestDelphiRuleRequest,
): Promise<Labrinth.TechReview.Internal.TestDelphiRuleResponse> {
@@ -2235,6 +2235,26 @@ export namespace Labrinth {
updated_at: string
created_by: number | null
updated_by: number | null
affected_details_count: number
affected_details: DelphiRuleAffectedDetail[]
}
export type DelphiRuleAffectedDetail = {
detail_id: string
issue_id: string
project_id: string | null
project_name: string | null
project_icon_url: string | null
version_id: string | null
version_name: string | null
version_number: string | null
issue_type: string
key: string
jar: string | null
file_path: string
original_severity: DelphiSeverity
severity: DelphiSeverity | null
hidden: boolean
}
export type WriteDelphiRule = {
@@ -2261,6 +2281,14 @@ export namespace Labrinth {
hidden: boolean
}
export type DelphiRuleSchema = Record<string, unknown>
export type DelphiRuleSchemaResponse = {
input: DelphiRuleSchema
output: DelphiRuleSchema
components: Record<string, DelphiRuleSchema>
}
export type TestDelphiRuleResponse = {
effects: Array<DelphiRuleEffect | null>
}