import type { Env, Logger, CryptoRuntime, AppContext, EnvFactoryOpts, Result } from "@adviser/cement"; export type ToUInt8 = Uint8Array | Result; export type PromiseToUInt8 = ToUInt8 | Promise | Promise>; export interface FPStats { isFile(): boolean; isDirectory(): boolean; isBlockDevice(): boolean; isCharacterDevice(): boolean; isSymbolicLink(): boolean; isFIFO(): boolean; isSocket(): boolean; uid: number | Falsy; gid: number | Falsy; size: number | Falsy; atime: Date | Falsy; mtime: Date | Falsy; ctime: Date | Falsy; birthtime: Date | Falsy; } export type Falsy = false | null | undefined; export interface SysFileSystem { start(): Promise; mkdir(path: string, options?: { recursive: boolean; }): Promise; readdir(path: string): Promise; rm(path: string, options?: { recursive: boolean; }): Promise; copyFile(source: string, destination: string): Promise; readfile(path: string): Promise; stat(path: string): Promise; unlink(path: string): Promise; writefile(path: string, data: Uint8Array | string): Promise; } export interface PathOps { join(...args: string[]): string; dirname(path: string): string; basename(path: string): string; } export interface BaseXXEndeCoder { encode(input: string | ToUInt8): string; decodeUint8(input: string): Uint8Array; decode(input: string): string; } export interface TextEndeCoder { id(): string; encode(input: string): Uint8Array; decode(input: ToUInt8): string; readonly base64: BaseXXEndeCoder; readonly base58: BaseXXEndeCoder; } export interface TextEndeCodable { txt: TextEndeCoder; } export interface SuperThisOpts { readonly logger: Logger; readonly pathOps: PathOps; readonly crypto: CryptoRuntime; readonly env: Partial; readonly txt: TextEndeCoder; readonly ctx: AppContext; } export interface SuperThis { readonly logger: Logger; readonly loggerCollector?: Logger; readonly env: Env; readonly pathOps: PathOps; readonly ctx: AppContext; readonly txt: TextEndeCoder; timeOrderedNextId(time?: number): { str: string; toString: () => string; }; nextId(bytes?: number): { str: string; bin: Uint8Array; toString: () => string; }; start(): Promise; clone(override: Partial): SuperThis; } export type DocObject = NonNullable; export type DocTypes = DocObject;