import { Plug } from "@plugos/plugos/plug"; import { AttachmentMeta, PageMeta } from "../types"; export interface SpacePrimitives { // Pages fetchPageList(): Promise<{ pages: Set; nowTimestamp: number }>; readPage(name: string): Promise<{ text: string; meta: PageMeta }>; getPageMeta(name: string): Promise; writePage( name: string, text: string, selfUpdate?: boolean, lastModified?: number ): Promise; deletePage(name: string): Promise; // Attachments fetchAttachmentList(): Promise<{ attachments: Set; nowTimestamp: number; }>; readAttachment( name: string ): Promise<{ buffer: ArrayBuffer; meta: AttachmentMeta }>; getAttachmentMeta(name: string): Promise; writeAttachment( name: string, blob: ArrayBuffer, selfUpdate?: boolean, lastModified?: number ): Promise; deleteAttachment(name: string): Promise; // Plugs proxySyscall(plug: Plug, name: string, args: any[]): Promise; invokeFunction( plug: Plug, env: string, name: string, args: any[] ): Promise; }