File size: 902 Bytes
21dd449 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
export interface ApiIndexTreeEntry {
type: "file" | "directory" | "unknown";
size: number;
path: string;
oid: string;
lfs?: {
oid: string;
size: number;
/** Size of the raw pointer file, 100~200 bytes */
pointerSize: number;
};
lastCommit?: {
date: string;
id: string;
title: string;
};
security?: ApiFileScanResult;
}
export interface ApiFileScanResult {
/** namespaced by repo type (models/, datasets/, spaces/) */
repositoryId: string;
blobId: string;
name: string;
safe: boolean;
avScan?: ApiAVScan;
pickleImportScan?: ApiPickleImportScan;
}
interface ApiAVScan {
virusFound: boolean;
virusNames?: string[];
}
type ApiSafetyLevel = "innocuous" | "suspicious" | "dangerous";
interface ApiPickleImport {
module: string;
name: string;
safety: ApiSafetyLevel;
}
interface ApiPickleImportScan {
highestSafetyLevel: ApiSafetyLevel;
imports: ApiPickleImport[];
}
|