27 lines
801 B
TypeScript
27 lines
801 B
TypeScript
export interface PluginPageFileRequestResult {
|
|
status: string;
|
|
message: string;
|
|
jobId?: string;
|
|
}
|
|
|
|
export interface PluginPageFileReadSnapshot {
|
|
serverInstanceId: string;
|
|
pluginId: string;
|
|
key: string;
|
|
state: "ready" | "pending" | "not-read" | "unavailable" | string;
|
|
content?: string;
|
|
version?: number;
|
|
checksum?: string;
|
|
sizeBytes?: number;
|
|
jobId?: string;
|
|
readAt?: string;
|
|
reason?: string;
|
|
}
|
|
|
|
export interface PluginPageWorkspaceActions {
|
|
refreshWorkspace?: () => Promise<unknown>;
|
|
requestFile?: (fileKey: string) => Promise<PluginPageFileRequestResult>;
|
|
getFileSnapshot?: (fileKey: string) => Promise<PluginPageFileReadSnapshot>;
|
|
writeFile?: (fileKey: string, content: string, options?: { expectedChecksum?: string }) => Promise<PluginPageFileRequestResult>;
|
|
}
|