Advance M8-M11 parity workflows
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import type { LODCacheRecord } from "./lod";
|
||||
import type { SimulationCacheManifestIR } from "./simulation-cache";
|
||||
import type { RecentProjectIssue, RecentProjectRecord } from "./recent-projects";
|
||||
import type { StorageBudgetBreakdown } from "./storage-budget";
|
||||
import type { ErrorCode } from "./error";
|
||||
import type { TexturePaintTileBindingRequestIR, TexturePaintTileBindingResultIR, TexturePaintTileCommitIR, TexturePaintTileCommitResultIR } from "./texture-paint-asset";
|
||||
|
||||
export interface StorageSmokeResult {
|
||||
backend: "indexeddb";
|
||||
@@ -18,12 +21,27 @@ export interface StorageInfoResult {
|
||||
stores: string[];
|
||||
}
|
||||
|
||||
export interface StorageBudgetResult extends StorageBudgetBreakdown {}
|
||||
|
||||
export interface StorageRecentProjectsResult {
|
||||
projects: RecentProjectRecord[];
|
||||
quarantined: number;
|
||||
issues: RecentProjectIssue[];
|
||||
}
|
||||
|
||||
export interface StorageProjectResult {
|
||||
projectId: string;
|
||||
scenePath: string;
|
||||
directories: string[];
|
||||
}
|
||||
|
||||
export interface StorageProjectCleanupResult {
|
||||
projectId: string;
|
||||
removed: number;
|
||||
bytes: number;
|
||||
paths: string[];
|
||||
}
|
||||
|
||||
export interface StorageSaveResult {
|
||||
projectId: string;
|
||||
bytes: number;
|
||||
@@ -176,6 +194,35 @@ export interface StorageSimulationCacheFrameReadResult extends StorageSimulation
|
||||
data: ArrayBuffer;
|
||||
}
|
||||
|
||||
export interface StorageSimulationCachePlaybackReadyResult extends StorageSimulationCacheResult {
|
||||
verifiedAt: string;
|
||||
}
|
||||
|
||||
export interface StorageSimulationCachePlaybackReleaseResult {
|
||||
projectId: string;
|
||||
cacheKey: string;
|
||||
released: true;
|
||||
}
|
||||
|
||||
export interface StorageSimulationCachePruneResult {
|
||||
projectId: string;
|
||||
maxBytes: number;
|
||||
beforeBytes: number;
|
||||
remainingBytes: number;
|
||||
removedBytes: number;
|
||||
removed: number;
|
||||
cacheKeys: string[];
|
||||
protectedCacheKeys: string[];
|
||||
budgetSatisfied: boolean;
|
||||
}
|
||||
|
||||
export interface StorageSimulationCacheQuarantineIssue {
|
||||
cacheKey: string;
|
||||
code: ErrorCode;
|
||||
reason: string;
|
||||
quarantinedAt: string;
|
||||
}
|
||||
|
||||
export interface StorageSimulationCacheListResult {
|
||||
projectId: string;
|
||||
caches: Array<{
|
||||
@@ -183,14 +230,23 @@ export interface StorageSimulationCacheListResult {
|
||||
manifest: SimulationCacheManifestIR;
|
||||
path: string;
|
||||
createdAt: string;
|
||||
lastAccessAt: string;
|
||||
}>;
|
||||
quarantined: number;
|
||||
issues: StorageSimulationCacheQuarantineIssue[];
|
||||
}
|
||||
|
||||
export interface StorageRequest {
|
||||
requestId: string;
|
||||
command:
|
||||
| { type: "smoke" }
|
||||
| { type: "crashForTest" }
|
||||
| { type: "info" }
|
||||
| { type: "getBudget"; projectId: string }
|
||||
| { type: "cleanupProject"; projectId: string }
|
||||
| { type: "listRecentProjects" }
|
||||
| { type: "touchRecentProject"; project: RecentProjectRecord }
|
||||
| { type: "removeRecentProject"; projectId: string }
|
||||
| { type: "ensureProject"; projectId: string }
|
||||
| { type: "saveProject"; projectId: string; revision: number; buffer: ArrayBuffer; faultAt?: "after-stage" | "after-scene-commit" | "before-metadata-commit" | "quota" }
|
||||
| { type: "recoverProject"; projectId: string }
|
||||
@@ -204,6 +260,8 @@ export interface StorageRequest {
|
||||
| { type: "putAsset"; projectId: string; data: ArrayBuffer; mimeType: string; sourcePath?: string }
|
||||
| { type: "readAsset"; projectId: string; sha256: string }
|
||||
| { type: "listAssets"; projectId: string }
|
||||
| { type: "commitTexturePaintTile"; commit: TexturePaintTileCommitIR }
|
||||
| { type: "readTexturePaintTileBinding"; request: TexturePaintTileBindingRequestIR }
|
||||
| { type: "saveLOD"; projectId: string; cacheKey: string; data: ArrayBuffer }
|
||||
| { type: "putLODManifest"; projectId: string; manifest: LODCacheRecord }
|
||||
| { type: "getLODManifest"; projectId: string; cacheKey: string }
|
||||
@@ -212,15 +270,19 @@ export interface StorageRequest {
|
||||
| { type: "deleteLOD"; projectId: string; cacheKey: string }
|
||||
| { type: "pruneLOD"; projectId: string; maxBytes: number }
|
||||
| { type: "putSimulationCache"; projectId: string; manifest: SimulationCacheManifestIR; data: ArrayBuffer }
|
||||
| { type: "prepareSimulationCachePlayback"; projectId: string; cacheKey: string }
|
||||
| { type: "releaseSimulationCachePlayback"; projectId: string; cacheKey: string }
|
||||
| { type: "readSimulationCache"; projectId: string; cacheKey: string }
|
||||
| { type: "readSimulationCacheFrame"; projectId: string; cacheKey: string; frame: number }
|
||||
| { type: "listSimulationCaches"; projectId: string };
|
||||
| { type: "listSimulationCaches"; projectId: string }
|
||||
| { type: "pruneSimulationCaches"; projectId: string; maxBytes: number; protectedCacheKeys?: string[] }
|
||||
| { type: "cancelRequest"; targetRequestId: string };
|
||||
}
|
||||
|
||||
export interface StorageResponse {
|
||||
requestId: string;
|
||||
ok: boolean;
|
||||
result?: StorageSmokeResult | StorageInfoResult | StorageProjectResult | StorageSaveResult | StorageRecoveryResult | StorageProjectReadResult | StorageOperationResult | StorageOperationListResult | StorageOperationPruneResult | StorageSnapshotResult | StorageSnapshotListResult | StorageSnapshotReadResult | StorageAssetPutResult | StorageAssetReadResult | StorageAssetListResult | StorageLODResult | StorageLODManifestResult | StorageLODManifestListResult | StorageLODReadResult | StorageLODPruneResult | StorageSimulationCacheResult | StorageSimulationCacheReadResult | StorageSimulationCacheFrameReadResult | StorageSimulationCacheListResult;
|
||||
result?: StorageSmokeResult | StorageInfoResult | StorageBudgetResult | StorageRecentProjectsResult | StorageProjectResult | StorageProjectCleanupResult | StorageSaveResult | StorageRecoveryResult | StorageProjectReadResult | StorageOperationResult | StorageOperationListResult | StorageOperationPruneResult | StorageSnapshotResult | StorageSnapshotListResult | StorageSnapshotReadResult | StorageAssetPutResult | StorageAssetReadResult | StorageAssetListResult | TexturePaintTileCommitResultIR | TexturePaintTileBindingResultIR | StorageLODResult | StorageLODManifestResult | StorageLODManifestListResult | StorageLODReadResult | StorageLODPruneResult | StorageSimulationCacheResult | StorageSimulationCacheReadResult | StorageSimulationCacheFrameReadResult | StorageSimulationCachePlaybackReadyResult | StorageSimulationCachePlaybackReleaseResult | StorageSimulationCachePruneResult | StorageSimulationCacheListResult;
|
||||
error?: string;
|
||||
errorCode?: ErrorCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user