75 lines
1.5 KiB
TypeScript
75 lines
1.5 KiB
TypeScript
export interface ParsedFile {
|
|
filename: string
|
|
buffer: Buffer
|
|
isModel: boolean
|
|
}
|
|
|
|
export interface PushFile {
|
|
path: string
|
|
contentBase64: string
|
|
}
|
|
|
|
export type GitModelMode = 'draco-glb' | 'keep-gltf'
|
|
|
|
export type DriveAction = 'new' | 'replace'
|
|
|
|
export type FileChange = 'new' | 'changed' | 'unchanged'
|
|
|
|
type FileDiffStatus = 'changed' | 'new' | 'deleted'
|
|
|
|
export type AssetCategory = 'color' | 'diffuse' | 'roughness' | 'normal' | 'metalness' | 'height' | 'opacity' | 'orm' | 'ao' | 'assets'
|
|
|
|
export interface FileDiff {
|
|
name: string
|
|
status: FileDiffStatus
|
|
}
|
|
|
|
export interface RemoteFile {
|
|
name: string
|
|
size: number
|
|
}
|
|
|
|
export interface PreparedAssetSummary {
|
|
filename: string
|
|
kind: 'model' | 'texture' | 'asset'
|
|
category?: AssetCategory
|
|
compressed: boolean
|
|
}
|
|
|
|
export interface StagingUploadResult {
|
|
stagingId: string
|
|
folderName: string
|
|
filesCount: number
|
|
}
|
|
|
|
export interface CheckUploadResult {
|
|
exists: boolean
|
|
diffs: FileDiff[]
|
|
warning?: string
|
|
}
|
|
|
|
export interface DriveUploadResult {
|
|
success: boolean
|
|
error?: string
|
|
}
|
|
|
|
export interface GitUploadResult {
|
|
success: boolean
|
|
filename?: string
|
|
warning?: string
|
|
error?: string
|
|
}
|
|
|
|
export interface PreparedGitAssetsResult {
|
|
filesToPush: PushFile[]
|
|
modelFilename: string
|
|
assetSummaries: PreparedAssetSummary[]
|
|
compressed: boolean
|
|
deliveryMode: GitModelMode
|
|
compressionError?: string
|
|
}
|
|
|
|
export interface PreparedStageAssetsResult extends PreparedGitAssetsResult {
|
|
folderName: string
|
|
}
|