fix: attribution scanning details (#6651)

* key override file sources on file path, allow deleting groups

* dont scan modrinth files

* delete attr group button

* return what override files already exist on platform

* intl:extract

* uppercase queries

* fix dupe migration key
This commit is contained in:
aecsocket
2026-07-12 09:04:54 +00:00
committed by GitHub
parent 1741d12b7b
commit e1556a8ee3
15 changed files with 346 additions and 106 deletions
@@ -64,6 +64,21 @@ export class LabrinthAttributionInternalModule extends AbstractModule {
})
}
/**
* Delete an attribution group and all files inside it.
* DELETE /_internal/attribution/group/{group_id}
*
* @param groupId - The base62 attribution group id (as returned from listProjectAttribution).
*/
public async deleteGroup(groupId: string): Promise<void> {
const numericId = decodeBase62Id(groupId)
return this.client.request<void>(`/attribution/group/${numericId}`, {
api: 'labrinth',
version: 'internal',
method: 'DELETE',
})
}
/**
* Reassign a file (by sha1) to another attribution group within the same project.
* POST /_internal/attribution/assign
@@ -373,6 +373,14 @@ export namespace Labrinth {
date_created: string
}
export type OverrideFileOnPlatform = {
file_path: string
sha1: string
version_id: string
platform_version_id: string
platform_project_id: string
}
export type AttributionGroup = {
id: string
flame_project: FlameProject | null
@@ -381,6 +389,7 @@ export namespace Labrinth {
attributed_by: string | null
files: AttributionFile[]
versions: AttributionVersionInfo[]
override_files_on_platform: OverrideFileOnPlatform[]
}
export type UpdateGroupRequest = {