mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-07 00:45:08 +01:00
23 lines
No EOL
454 B
TypeScript
23 lines
No EOL
454 B
TypeScript
import {Observable} from "lstream";
|
|
|
|
export interface StorageUpdateEvent {
|
|
path: string;
|
|
timestamp: number
|
|
}
|
|
|
|
export interface Repository extends Observable<StorageUpdateEvent> {
|
|
|
|
set(path: string, content: string): Promise<void>;
|
|
|
|
get(path: string): Promise<Response>;
|
|
|
|
remove(path: string): Promise<void>;
|
|
|
|
list(path: string): Promise<{
|
|
name: string,
|
|
path: string,
|
|
type: string}[]>;
|
|
|
|
exists(path: string): Promise<boolean>;
|
|
|
|
} |