mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 17:14:50 +00:00
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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user